Index: webrtc/common_types.h |
diff --git a/webrtc/common_types.h b/webrtc/common_types.h |
index b1842ef59598e78e86f99f71d495661b0d1a9483..c3e9a84c3cc729b5cb3e1b1287731cc102aa3ba0 100644 |
--- a/webrtc/common_types.h |
+++ b/webrtc/common_types.h |
@@ -593,7 +593,11 @@ struct SpatialLayer { |
enum VideoCodecMode { kRealtimeVideo, kScreensharing }; |
// Common video codec properties |
-struct VideoCodec { |
+class VideoCodec { |
+ public: |
+ VideoCodec(); |
+ |
+ // Public variables. TODO(hta): Make them private with accessors. |
VideoCodecType codecType; |
char plName[kPayloadNameSize]; |
unsigned char plType; |
@@ -608,8 +612,6 @@ struct VideoCodec { |
unsigned char maxFramerate; |
- VideoCodecUnion codecSpecific; |
- |
unsigned int qpMax; |
unsigned char numberOfSimulcastStreams; |
SimulcastStream simulcastStream[kMaxSimulcastStreams]; |
@@ -620,6 +622,23 @@ struct VideoCodec { |
bool operator==(const VideoCodec& other) const = delete; |
bool operator!=(const VideoCodec& other) const = delete; |
+ |
+ // Accessors for codec specific information. |
+ // There is a const version of each that returns a reference, |
+ // and a non-const version that returns a pointer, in order |
+ // to allow modification of the parameters. |
+ VideoCodecVP8* VP8(); |
+ const VideoCodecVP8& VP8() const; |
+ VideoCodecVP9* VP9(); |
+ const VideoCodecVP9& VP9() const; |
+ VideoCodecH264* H264(); |
+ const VideoCodecH264& H264() const; |
+ |
+ // This variable will be declared private and renamed to codec_specific_ |
+ // once Chromium is not accessing it. |
+ // TODO(hta): Consider replacing the union with a pointer type. |
+ // This will allow removing the VideoCodec* types from this file. |
+ VideoCodecUnion codecSpecific; |
}; |
// Bandwidth over-use detector options. These are used to drive |