Reland "Add stereo codec header and pass it through RTP"

This is a reland of 20f2133d5dbd1591b89425b24db3b1e09fbcf0b1
Original change's description:
> Add stereo codec header and pass it through RTP
>
> - Defines CodecSpecificInfoStereo that carries stereo specific header info from
> encoded image.
> - Defines RTPVideoHeaderStereo that carries the above info to packetizer,
> see module_common_types.h.
> - Adds an RTPPacketizer and RTPDepacketizer that supports passing specific stereo
> header.
> - Uses new data containers in StereoAdapter classes.
>
> This CL is the step 3 for adding alpha channel support over the wire in webrtc.
> See https://webrtc-review.googlesource.com/c/src/+/7800 for the experimental
> CL that gives an idea about how it will come together.
> Design Doc: https://goo.gl/sFeSUT
>
> Bug: webrtc:7671
> Change-Id: Ia932568fdd7065ba104afd2bc0ecf25a765748ab
> Reviewed-on: https://webrtc-review.googlesource.com/22900
> Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
> Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20920}

TBR=danilchap@webrtc.org, sprang@webrtc.org, niklas.enbom@webrtc.org

Bug: webrtc:7671
Change-Id: If8f0c7e6e3a2a704f19161f0e8bf1880906e7fe0
Reviewed-on: https://webrtc-review.googlesource.com/27160
Reviewed-by: Emircan Uysaler <emircan@webrtc.org>
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20946}
This commit is contained in:
Emircan Uysaler
2017-11-28 09:45:25 -08:00
committed by Commit Bot
parent f72ab8395a
commit 90612a681b
27 changed files with 658 additions and 75 deletions

View File

@ -193,6 +193,28 @@ void VCMEncodedFrame::CopyCodecSpecific(const RTPVideoHeader* header) {
_codecSpecificInfo.codecType = kVideoCodecH264;
break;
}
case kRtpVideoStereo: {
_codecSpecificInfo.codecType = kVideoCodecStereo;
VideoCodecType associated_codec_type = kVideoCodecUnknown;
switch (header->codecHeader.stereo.associated_codec_type) {
case kRtpVideoVp8:
associated_codec_type = kVideoCodecVP8;
break;
case kRtpVideoVp9:
associated_codec_type = kVideoCodecVP9;
break;
case kRtpVideoH264:
associated_codec_type = kVideoCodecH264;
break;
default:
RTC_NOTREACHED();
}
_codecSpecificInfo.codecSpecific.stereo.associated_codec_type =
associated_codec_type;
_codecSpecificInfo.codecSpecific.stereo.indices =
header->codecHeader.stereo.indices;
break;
}
default: {
_codecSpecificInfo.codecType = kVideoCodecUnknown;
break;