Index: webrtc/common_types.h |
diff --git a/webrtc/common_types.h b/webrtc/common_types.h |
index 587b90d753ce3f3eb092dfd01edb8b1b68303719..467afc90fef2636be1a128aa97dd2050578b2734 100644 |
--- a/webrtc/common_types.h |
+++ b/webrtc/common_types.h |
@@ -682,7 +682,11 @@ enum VideoCodecMode { |
}; |
// Common video codec properties |
-struct VideoCodec { |
+class VideoCodec { |
+ public: |
+ VideoCodec(); |
+ |
+ // Public variables. TODO(hta): Make them private with accessors. |
tommi
2016/05/23 17:05:09
nit: TODO on a line of its own
hta-webrtc
2016/05/23 17:19:33
Done.
|
VideoCodecType codecType; |
char plName[kPayloadNameSize]; |
unsigned char plType; |
@@ -697,8 +701,6 @@ struct VideoCodec { |
unsigned char maxFramerate; |
- VideoCodecUnion codecSpecific; |
- |
unsigned int qpMax; |
unsigned char numberOfSimulcastStreams; |
SimulcastStream simulcastStream[kMaxSimulcastStreams]; |
@@ -708,6 +710,22 @@ 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; |
+ |
+ private: |
+ // TODO(hta): Consider replacing the union with a pointer type. |
+ // This will allow removing the VideoCodec* types from this file. |
+ VideoCodecUnion codec_specific_; |
}; |
// Bandwidth over-use detector options. These are used to drive |