Bug 1045468: WebRTC should support SVC NAL(NAL type 14) for H264 r=jesup

This commit is contained in:
Ethan Hugg 2014-07-31 06:45:08 -07:00
Родитель e008079af7
Коммит 0c857fc7bc
3 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -91,7 +91,7 @@ int RtpFormatH264::NextPacket(uint8_t* buffer,
// the encoder is the last NAL of the frame. We need that to be passed
// through to this point, instead of trying to generate it from the packets
if (type == kH264NALU_SPS || type == kH264NALU_PPS ||
type == kH264NALU_SEI) {
type == kH264NALU_SEI||type == kh264NALU_PREFIX) {
*last_packet = false;
} else {
*last_packet = true;

Просмотреть файл

@ -40,6 +40,7 @@ class RtpFormatH264 {
kH264NALU_SEI = 6,
kH264NALU_SPS = 7,
kH264NALU_PPS = 8,
kh264NALU_PREFIX = 14,
kH264NALU_STAPA = 24,
kH264NALU_FUA = 28
};

Просмотреть файл

@ -300,6 +300,10 @@ int32_t RTPReceiverVideo::ReceiveH264Codec(WebRtcRTPHeader* rtp_header,
rtp_header->header.timestamp = timestamp - 10;
rtp_header->frameType = kVideoFrameKey;
break;
case RtpFormatH264::kh264NALU_PREFIX:
rtp_header->header.timestamp = timestamp - 5;
rtp_header->frameType = kVideoFrameKey;
break;
case RtpFormatH264::kH264NALU_IDR:
rtp_header->frameType = kVideoFrameKey;
break;
@ -342,6 +346,9 @@ int32_t RTPReceiverVideo::ReceiveH264Codec(WebRtcRTPHeader* rtp_header,
case RtpFormatH264::kH264NALU_PPS:
rtp_header->header.timestamp -= 10;
// fall through
case RtpFormatH264::kh264NALU_PREFIX:
rtp_header->header.timestamp -= 5;
// fall through
case RtpFormatH264::kH264NALU_IDR:
rtp_header->frameType = kVideoFrameKey;
break;