Removing VideoCodecDerived and moving methods inside VideoCodec.

VideoCodecDerived added to handle changes to talk (fakewebrtcvideoengine.h).

R=mflodman@webrtc.org
TBR=mflodman@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/10569004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5784 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mallinath@webrtc.org 2014-03-25 18:44:58 +00:00
parent 39f8ddae70
commit 681d448d88
2 changed files with 3 additions and 9 deletions

View File

@ -658,13 +658,7 @@ struct VideoCodec {
// When using an external encoder/decoder this allows to pass // When using an external encoder/decoder this allows to pass
// extra options without requiring webrtc to be aware of them. // extra options without requiring webrtc to be aware of them.
Config* extra_options; Config* extra_options;
};
// TODO(mallinath) - Remove this and push these two methods inside VideoCodec.
// This is done to handle operator== defined in fakewebrtcvideoengine.h
// This modification allows us to commit this CL directly and not with libjingle
// push.
struct VideoCodecDerived : public VideoCodec {
bool operator==(const VideoCodec& other) const { bool operator==(const VideoCodec& other) const {
bool ret = codecType == other.codecType && bool ret = codecType == other.codecType &&
(STR_CASE_CMP(plName, other.plName) == 0) && (STR_CASE_CMP(plName, other.plName) == 0) &&

View File

@ -60,7 +60,7 @@ void SetSimulcastSettings(webrtc::VideoCodec* video_codec) {
// This test compares two VideoCodecInst objects except codec specific and // This test compares two VideoCodecInst objects except codec specific and
// simulcast streams. // simulcast streams.
TEST(ViECodecTest, TestCompareCodecs) { TEST(ViECodecTest, TestCompareCodecs) {
VideoCodecDerived codec1, codec2; VideoCodec codec1, codec2;
memset(&codec1, 0, sizeof(VideoCodec)); memset(&codec1, 0, sizeof(VideoCodec));
memset(&codec2, 0, sizeof(VideoCodec)); memset(&codec2, 0, sizeof(VideoCodec));
@ -119,7 +119,7 @@ TEST(ViECodecTest, TestCompareCodecs) {
// Test VP8 specific comparision. // Test VP8 specific comparision.
TEST(ViECodecTest, TestCompareVP8CodecSpecific) { TEST(ViECodecTest, TestCompareVP8CodecSpecific) {
VideoCodecDerived codec1, codec2; VideoCodec codec1, codec2;
memset(&codec1, 0, sizeof(VideoCodec)); memset(&codec1, 0, sizeof(VideoCodec));
memset(&codec2, 0, sizeof(VideoCodec)); memset(&codec2, 0, sizeof(VideoCodec));
@ -179,7 +179,7 @@ TEST(ViECodecTest, TestCompareVP8CodecSpecific) {
// This test compares simulcast stream information in VideoCodec. // This test compares simulcast stream information in VideoCodec.
TEST(ViECodecTest, TestCompareSimulcastStreams) { TEST(ViECodecTest, TestCompareSimulcastStreams) {
VideoCodecDerived codec1, codec2; VideoCodec codec1, codec2;
memset(&codec1, 0, sizeof(VideoCodec)); memset(&codec1, 0, sizeof(VideoCodec));
memset(&codec2, 0, sizeof(VideoCodec)); memset(&codec2, 0, sizeof(VideoCodec));