Refactoring: Hide VideoCodec.codecSpecific as "private"

This refactoring allows runtime checks that functions that access
codec specific information are using the correct union member.
The API also allows replacing the union with another implementation
without changes at calling sites.

BUG=webrtc:6603

Review-Url: https://codereview.webrtc.org/2001533003
Cr-Commit-Position: refs/heads/master@{#14775}
This commit is contained in:
hta
2016-10-25 09:05:06 -07:00
committed by Commit bot
parent 189f9b1b65
commit 257dc39841
18 changed files with 185 additions and 145 deletions

View File

@ -412,7 +412,7 @@ class TestVideoSenderWithVp8 : public TestVideoSender {
VideoCodingModule::Codec(kVideoCodecVP8, &codec);
codec.width = width;
codec.height = height;
codec.codecSpecific.VP8.numberOfTemporalLayers = temporal_layers;
codec.VP8()->numberOfTemporalLayers = temporal_layers;
return codec;
}
@ -477,7 +477,7 @@ TEST_F(TestVideoSenderWithVp8, MAYBE_FixedTemporalLayersStrategy) {
TEST_F(TestVideoSenderWithVp8, MAYBE_RealTimeTemporalLayersStrategy) {
VideoCodec codec = MakeVp8VideoCodec(352, 288, 3);
RealTimeTemporalLayersFactory realtime_tl_factory;
codec.codecSpecific.VP8.tl_factory = &realtime_tl_factory;
codec.VP8()->tl_factory = &realtime_tl_factory;
codec.minBitrate = 10;
codec.startBitrate = codec_bitrate_kbps_;
codec.maxBitrate = codec_bitrate_kbps_;