зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1045468: WebRTC should support SVC NAL(NAL type 14) for H264 r=jesup
This commit is contained in:
Родитель
e008079af7
Коммит
0c857fc7bc
|
@ -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
|
// 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
|
// through to this point, instead of trying to generate it from the packets
|
||||||
if (type == kH264NALU_SPS || type == kH264NALU_PPS ||
|
if (type == kH264NALU_SPS || type == kH264NALU_PPS ||
|
||||||
type == kH264NALU_SEI) {
|
type == kH264NALU_SEI||type == kh264NALU_PREFIX) {
|
||||||
*last_packet = false;
|
*last_packet = false;
|
||||||
} else {
|
} else {
|
||||||
*last_packet = true;
|
*last_packet = true;
|
||||||
|
|
|
@ -40,6 +40,7 @@ class RtpFormatH264 {
|
||||||
kH264NALU_SEI = 6,
|
kH264NALU_SEI = 6,
|
||||||
kH264NALU_SPS = 7,
|
kH264NALU_SPS = 7,
|
||||||
kH264NALU_PPS = 8,
|
kH264NALU_PPS = 8,
|
||||||
|
kh264NALU_PREFIX = 14,
|
||||||
kH264NALU_STAPA = 24,
|
kH264NALU_STAPA = 24,
|
||||||
kH264NALU_FUA = 28
|
kH264NALU_FUA = 28
|
||||||
};
|
};
|
||||||
|
|
|
@ -300,6 +300,10 @@ int32_t RTPReceiverVideo::ReceiveH264Codec(WebRtcRTPHeader* rtp_header,
|
||||||
rtp_header->header.timestamp = timestamp - 10;
|
rtp_header->header.timestamp = timestamp - 10;
|
||||||
rtp_header->frameType = kVideoFrameKey;
|
rtp_header->frameType = kVideoFrameKey;
|
||||||
break;
|
break;
|
||||||
|
case RtpFormatH264::kh264NALU_PREFIX:
|
||||||
|
rtp_header->header.timestamp = timestamp - 5;
|
||||||
|
rtp_header->frameType = kVideoFrameKey;
|
||||||
|
break;
|
||||||
case RtpFormatH264::kH264NALU_IDR:
|
case RtpFormatH264::kH264NALU_IDR:
|
||||||
rtp_header->frameType = kVideoFrameKey;
|
rtp_header->frameType = kVideoFrameKey;
|
||||||
break;
|
break;
|
||||||
|
@ -342,6 +346,9 @@ int32_t RTPReceiverVideo::ReceiveH264Codec(WebRtcRTPHeader* rtp_header,
|
||||||
case RtpFormatH264::kH264NALU_PPS:
|
case RtpFormatH264::kH264NALU_PPS:
|
||||||
rtp_header->header.timestamp -= 10;
|
rtp_header->header.timestamp -= 10;
|
||||||
// fall through
|
// fall through
|
||||||
|
case RtpFormatH264::kh264NALU_PREFIX:
|
||||||
|
rtp_header->header.timestamp -= 5;
|
||||||
|
// fall through
|
||||||
case RtpFormatH264::kH264NALU_IDR:
|
case RtpFormatH264::kH264NALU_IDR:
|
||||||
rtp_header->frameType = kVideoFrameKey;
|
rtp_header->frameType = kVideoFrameKey;
|
||||||
break;
|
break;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче