Implement H264 simulcast support and generalize SimulcastEncoderAdapter use for H264 & VP8.
* Move SimulcastEncoderAdapter out under modules/video_coding
* Move SimulcastRateAllocator back out to modules/video_coding/utility
* Move TemporalLayers and ScreenshareLayers to modules/video_coding/utility
* Move any VP8 specific code - such as temporal layer bitrate budgeting -
under codec type dependent conditionals.
* Plumb the simulcast index for H264 in the codec specific and RTP format data structures.
Bug: webrtc:5840
Change-Id: Ieced8a00e38f273c1a6cfd0f5431a87d07b8f44e
Reviewed-on: https://webrtc-review.googlesource.com/64100
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23705}
diff --git a/modules/video_coding/include/video_codec_interface.h b/modules/video_coding/include/video_codec_interface.h
index 1b5e155..d5c4223 100644
--- a/modules/video_coding/include/video_codec_interface.h
+++ b/modules/video_coding/include/video_codec_interface.h
@@ -70,6 +70,7 @@
struct CodecSpecificInfoH264 {
H264PacketizationMode packetization_mode;
+ uint8_t simulcast_idx;
};
union CodecSpecificInfoUnion {
@@ -83,7 +84,9 @@
// must be fitted with a copy-constructor. This is because it is copied
// in the copy-constructor of VCMEncodedFrame.
struct CodecSpecificInfo {
- CodecSpecificInfo() : codecType(kVideoCodecUnknown), codec_name(nullptr) {}
+ CodecSpecificInfo() : codecType(kVideoCodecUnknown), codec_name(nullptr) {
+ memset(&codecSpecific, 0, sizeof(codecSpecific));
+ }
VideoCodecType codecType;
const char* codec_name;
CodecSpecificInfoUnion codecSpecific;