Index: webrtc/common_types.cc |
diff --git a/webrtc/common_types.cc b/webrtc/common_types.cc |
index 7b99f3c5a83859d17a6891b99c49dc4d218808ee..4f2915a629b6a66b87180203c25c1453b5f8b4f3 100644 |
--- a/webrtc/common_types.cc |
+++ b/webrtc/common_types.cc |
@@ -8,6 +8,7 @@ |
* be found in the AUTHORS file in the root of the source tree. |
*/ |
+#include "webrtc/base/checks.h" |
#include "webrtc/common_types.h" |
#include <string.h> |
@@ -48,4 +49,52 @@ RTPHeader::RTPHeader() |
memset(&arrOfCSRCs, 0, sizeof(arrOfCSRCs)); |
tommi
2016/05/23 17:05:08
can we get rid of this memset as well?
hta-webrtc
2016/05/23 17:19:33
If the tests still pass....
|
} |
+VideoCodec::VideoCodec() |
+ : codecType(kVideoCodecUnknown), |
+ plName(), |
+ plType(0), |
+ width(0), |
+ height(0), |
+ startBitrate(0), |
+ maxBitrate(0), |
+ minBitrate(0), |
+ targetBitrate(0), |
+ maxFramerate(0), |
+ qpMax(0), |
+ numberOfSimulcastStreams(0), |
+ simulcastStream(), |
+ spatialLayers(), |
+ mode(kRealtimeVideo), |
+ codec_specific_() {} |
+ |
+VideoCodecVP8* VideoCodec::VP8() { |
+ RTC_DCHECK_EQ(codecType, kVideoCodecVP8); |
+ return &codec_specific_.VP8; |
+} |
+ |
+const VideoCodecVP8& VideoCodec::VP8() const { |
+ RTC_DCHECK_EQ(codecType, kVideoCodecVP8); |
+ return codec_specific_.VP8; |
+} |
+ |
+VideoCodecVP9* VideoCodec::VP9() { |
+ RTC_DCHECK_EQ(codecType, kVideoCodecVP9); |
+ return &codec_specific_.VP9; |
+} |
+ |
+const VideoCodecVP9& VideoCodec::VP9() const { |
+ RTC_DCHECK_EQ(codecType, kVideoCodecVP9); |
+ return codec_specific_.VP9; |
+} |
+ |
+VideoCodecH264* VideoCodec::H264() { |
+ RTC_DCHECK_EQ(codecType, kVideoCodecH264); |
+ return &codec_specific_.H264; |
+} |
+ |
+const VideoCodecH264& VideoCodec::H264() const { |
+ RTC_DCHECK_EQ(codecType, kVideoCodecH264); |
+ return codec_specific_.H264; |
+} |
+ |
} // namespace webrtc |