Removing `preference` field from `cricket::Codec`.
This field only existed as an implementation detail for getting the
codecs sorted, so it doesn't need to be in the public interface.
It cluttered the code and undesirably affected codec comparisons,
causing the video encoder to be reconfigured if a codec's preference
changed but nothing else did.
BUG=webrtc:5690
Review URL: https://codereview.webrtc.org/1845673002
Cr-Commit-Position: refs/heads/master@{#12349}
diff --git a/webrtc/pc/channelmanager_unittest.cc b/webrtc/pc/channelmanager_unittest.cc
index 1eb0919..8cb066b 100644
--- a/webrtc/pc/channelmanager_unittest.cc
+++ b/webrtc/pc/channelmanager_unittest.cc
@@ -22,14 +22,12 @@
namespace cricket {
static const AudioCodec kAudioCodecs[] = {
- AudioCodec(97, "voice", 1, 2, 3, 0),
- AudioCodec(111, "OPUS", 48000, 32000, 2, 0),
+ AudioCodec(97, "voice", 1, 2, 3), AudioCodec(111, "OPUS", 48000, 32000, 2),
};
static const VideoCodec kVideoCodecs[] = {
- VideoCodec(99, "H264", 100, 200, 300, 0),
- VideoCodec(100, "VP8", 100, 200, 300, 0),
- VideoCodec(96, "rtx", 100, 200, 300, 0),
+ VideoCodec(99, "H264", 100, 200, 300),
+ VideoCodec(100, "VP8", 100, 200, 300), VideoCodec(96, "rtx", 100, 200, 300),
};
class ChannelManagerTest : public testing::Test {
@@ -198,7 +196,7 @@
TEST_F(ChannelManagerTest, SetVideoRtxEnabled) {
std::vector<VideoCodec> codecs;
- const VideoCodec rtx_codec(96, "rtx", 0, 0, 0, 0);
+ const VideoCodec rtx_codec(96, "rtx", 0, 0, 0);
// By default RTX is disabled.
cm_->GetSupportedVideoCodecs(&codecs);