Index: webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc |
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc |
index 979c41e52a0d93ce176dad0c812bb133126282ef..173abbb14b53b78ff9eb86c5ec2361860c12fc2a 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc |
+++ b/webrtc/modules/rtp_rtcp/source/rtp_payload_registry_unittest.cc |
@@ -14,7 +14,6 @@ |
#include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" |
#include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" |
#include "webrtc/modules/rtp_rtcp/source/byte_io.h" |
-#include "webrtc/modules/rtp_rtcp/source/mock/mock_rtp_payload_strategy.h" |
#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" |
#include "webrtc/test/gmock.h" |
#include "webrtc/test/gtest.h" |
@@ -28,116 +27,72 @@ using ::testing::_; |
static const char* kTypicalPayloadName = "name"; |
static const size_t kTypicalChannels = 1; |
-static const int kTypicalFrequency = 44000; |
-static const int kTypicalRate = 32 * 1024; |
+static const uint32_t kTypicalFrequency = 44000; |
+static const uint32_t kTypicalRate = 32 * 1024; |
static const CodecInst kTypicalAudioCodec = {-1 /* pltype */, "name", |
kTypicalFrequency, 0 /* pacsize */, |
kTypicalChannels, kTypicalRate}; |
-class RtpPayloadRegistryTest : public ::testing::Test { |
- public: |
- void SetUp() { |
- // Note: the payload registry takes ownership of the strategy. |
- mock_payload_strategy_ = new testing::NiceMock<MockRTPPayloadStrategy>(); |
- rtp_payload_registry_.reset(new RTPPayloadRegistry(mock_payload_strategy_)); |
- } |
- |
- protected: |
- RtpUtility::Payload* ExpectReturnOfTypicalAudioPayload(uint8_t payload_type, |
- uint32_t rate) { |
- bool audio = true; |
- RtpUtility::Payload returned_payload = { |
- "name", |
- audio, |
- {// Initialize the audio struct in this case. |
- {kTypicalFrequency, kTypicalChannels, rate}}}; |
- |
- // Note: we return a new payload since the payload registry takes ownership |
- // of the created object. |
- RtpUtility::Payload* returned_payload_on_heap = |
- new RtpUtility::Payload(returned_payload); |
- EXPECT_CALL(*mock_payload_strategy_, |
- CreatePayloadType(StrEq(kTypicalPayloadName), payload_type, |
- kTypicalFrequency, kTypicalChannels, rate)) |
- .WillOnce(Return(returned_payload_on_heap)); |
- return returned_payload_on_heap; |
- } |
- |
- std::unique_ptr<RTPPayloadRegistry> rtp_payload_registry_; |
- testing::NiceMock<MockRTPPayloadStrategy>* mock_payload_strategy_; |
-}; |
- |
-TEST_F(RtpPayloadRegistryTest, |
- RegistersAndRemembersVideoPayloadsUntilDeregistered) { |
+TEST(RtpPayloadRegistryTest, |
+ RegistersAndRemembersVideoPayloadsUntilDeregistered) { |
+ RTPPayloadRegistry rtp_payload_registry; |
const uint8_t payload_type = 97; |
- RtpUtility::Payload returned_video_payload = { |
- "VP8", false /* audio */, {{kRtpVideoVp8}}}; |
- // Note: The payload registry takes ownership of this object in |
- // RegisterReceivePayload. |
- RtpUtility::Payload* returned_video_payload_on_heap = |
- new RtpUtility::Payload(returned_video_payload); |
- EXPECT_CALL( |
- *mock_payload_strategy_, |
- CreatePayloadType(StrEq("VP8"), payload_type, kVideoPayloadTypeFrequency, |
- 0 /* channels */, 0 /* rate */)) |
- .WillOnce(Return(returned_video_payload_on_heap)); |
- |
VideoCodec video_codec; |
video_codec.codecType = kVideoCodecVP8; |
strcpy(video_codec.plName, "VP8"); |
video_codec.plType = payload_type; |
- EXPECT_EQ(0, rtp_payload_registry_->RegisterReceivePayload(video_codec)); |
+ EXPECT_EQ(0, rtp_payload_registry.RegisterReceivePayload(video_codec)); |
const RtpUtility::Payload* retrieved_payload = |
- rtp_payload_registry_->PayloadTypeToPayload(payload_type); |
+ rtp_payload_registry.PayloadTypeToPayload(payload_type); |
EXPECT_TRUE(retrieved_payload); |
- // We should get back the exact pointer to the payload returned by the |
- // payload strategy. |
- EXPECT_EQ(returned_video_payload_on_heap, retrieved_payload); |
+ // We should get back the corresponding payload that we registered. |
+ EXPECT_STREQ("VP8", retrieved_payload->name); |
+ EXPECT_FALSE(retrieved_payload->audio); |
+ EXPECT_EQ(kRtpVideoVp8, retrieved_payload->typeSpecific.Video.videoCodecType); |
// Now forget about it and verify it's gone. |
- EXPECT_EQ(0, rtp_payload_registry_->DeRegisterReceivePayload(payload_type)); |
- EXPECT_FALSE(rtp_payload_registry_->PayloadTypeToPayload(payload_type)); |
+ EXPECT_EQ(0, rtp_payload_registry.DeRegisterReceivePayload(payload_type)); |
+ EXPECT_FALSE(rtp_payload_registry.PayloadTypeToPayload(payload_type)); |
} |
-TEST_F(RtpPayloadRegistryTest, |
- RegistersAndRemembersAudioPayloadsUntilDeregistered) { |
+TEST(RtpPayloadRegistryTest, |
+ RegistersAndRemembersAudioPayloadsUntilDeregistered) { |
+ RTPPayloadRegistry rtp_payload_registry; |
uint8_t payload_type = 97; |
- RtpUtility::Payload* returned_payload_on_heap = |
- ExpectReturnOfTypicalAudioPayload(payload_type, kTypicalRate); |
- |
bool new_payload_created = false; |
CodecInst audio_codec = kTypicalAudioCodec; |
audio_codec.pltype = payload_type; |
- EXPECT_EQ(0, rtp_payload_registry_->RegisterReceivePayload( |
+ EXPECT_EQ(0, rtp_payload_registry.RegisterReceivePayload( |
audio_codec, &new_payload_created)); |
EXPECT_TRUE(new_payload_created) << "A new payload WAS created."; |
const RtpUtility::Payload* retrieved_payload = |
- rtp_payload_registry_->PayloadTypeToPayload(payload_type); |
+ rtp_payload_registry.PayloadTypeToPayload(payload_type); |
EXPECT_TRUE(retrieved_payload); |
- // We should get back the exact pointer to the payload returned by the |
- // payload strategy. |
- EXPECT_EQ(returned_payload_on_heap, retrieved_payload); |
+ // We should get back the corresponding payload that we registered. |
+ EXPECT_STREQ(kTypicalPayloadName, retrieved_payload->name); |
+ EXPECT_TRUE(retrieved_payload->audio); |
+ EXPECT_EQ(kTypicalFrequency, retrieved_payload->typeSpecific.Audio.frequency); |
+ EXPECT_EQ(kTypicalChannels, retrieved_payload->typeSpecific.Audio.channels); |
+ EXPECT_EQ(kTypicalRate, retrieved_payload->typeSpecific.Audio.rate); |
// Now forget about it and verify it's gone. |
- EXPECT_EQ(0, rtp_payload_registry_->DeRegisterReceivePayload(payload_type)); |
- EXPECT_FALSE(rtp_payload_registry_->PayloadTypeToPayload(payload_type)); |
+ EXPECT_EQ(0, rtp_payload_registry.DeRegisterReceivePayload(payload_type)); |
+ EXPECT_FALSE(rtp_payload_registry.PayloadTypeToPayload(payload_type)); |
} |
-TEST_F(RtpPayloadRegistryTest, AudioRedWorkProperly) { |
+TEST(RtpPayloadRegistryTest, AudioRedWorkProperly) { |
const uint8_t kRedPayloadType = 127; |
const int kRedSampleRate = 8000; |
const size_t kRedChannels = 1; |
const int kRedBitRate = 0; |
- // This creates an audio RTP payload strategy. |
- rtp_payload_registry_.reset( |
- new RTPPayloadRegistry(RTPPayloadStrategy::CreateStrategy(true))); |
+ RTPPayloadRegistry rtp_payload_registry; |
bool new_payload_created = false; |
CodecInst red_audio_codec; |
@@ -146,170 +101,170 @@ TEST_F(RtpPayloadRegistryTest, AudioRedWorkProperly) { |
red_audio_codec.plfreq = kRedSampleRate; |
red_audio_codec.channels = kRedChannels; |
red_audio_codec.rate = kRedBitRate; |
- EXPECT_EQ(0, rtp_payload_registry_->RegisterReceivePayload( |
+ EXPECT_EQ(0, rtp_payload_registry.RegisterReceivePayload( |
red_audio_codec, &new_payload_created)); |
EXPECT_TRUE(new_payload_created); |
- EXPECT_EQ(kRedPayloadType, rtp_payload_registry_->red_payload_type()); |
+ EXPECT_EQ(kRedPayloadType, rtp_payload_registry.red_payload_type()); |
const RtpUtility::Payload* retrieved_payload = |
- rtp_payload_registry_->PayloadTypeToPayload(kRedPayloadType); |
+ rtp_payload_registry.PayloadTypeToPayload(kRedPayloadType); |
EXPECT_TRUE(retrieved_payload); |
EXPECT_TRUE(retrieved_payload->audio); |
EXPECT_STRCASEEQ("red", retrieved_payload->name); |
// Sample rate is correctly registered. |
EXPECT_EQ(kRedSampleRate, |
- rtp_payload_registry_->GetPayloadTypeFrequency(kRedPayloadType)); |
+ rtp_payload_registry.GetPayloadTypeFrequency(kRedPayloadType)); |
} |
-TEST_F(RtpPayloadRegistryTest, |
- DoesNotAcceptSamePayloadTypeTwiceExceptIfPayloadIsCompatible) { |
+TEST(RtpPayloadRegistryTest, |
+ DoesNotAcceptSamePayloadTypeTwiceExceptIfPayloadIsCompatible) { |
uint8_t payload_type = 97; |
+ RTPPayloadRegistry rtp_payload_registry; |
bool ignored = false; |
- RtpUtility::Payload* first_payload_on_heap = |
- ExpectReturnOfTypicalAudioPayload(payload_type, kTypicalRate); |
CodecInst audio_codec = kTypicalAudioCodec; |
audio_codec.pltype = payload_type; |
EXPECT_EQ( |
- 0, rtp_payload_registry_->RegisterReceivePayload(audio_codec, &ignored)); |
- |
- EXPECT_EQ( |
- -1, rtp_payload_registry_->RegisterReceivePayload(audio_codec, &ignored)) |
- << "Adding same codec twice = bad."; |
+ 0, rtp_payload_registry.RegisterReceivePayload(audio_codec, &ignored)); |
- RtpUtility::Payload* second_payload_on_heap = |
- ExpectReturnOfTypicalAudioPayload(payload_type - 1, kTypicalRate); |
CodecInst audio_codec_2 = kTypicalAudioCodec; |
+ audio_codec_2.pltype = payload_type; |
+ // Make |audio_codec_2| incompatible with |audio_codec| by changing |
+ // the frequency. |
+ audio_codec_2.plfreq = kTypicalFrequency + 1; |
+ EXPECT_EQ(-1, rtp_payload_registry.RegisterReceivePayload(audio_codec_2, |
+ &ignored)) |
+ << "Adding incompatible codec with same payload type = bad."; |
+ |
+ // Change payload type. |
audio_codec_2.pltype = payload_type - 1; |
EXPECT_EQ( |
- 0, rtp_payload_registry_->RegisterReceivePayload(audio_codec_2, &ignored)) |
+ 0, rtp_payload_registry.RegisterReceivePayload(audio_codec_2, &ignored)) |
<< "With a different payload type is fine though."; |
// Ensure both payloads are preserved. |
const RtpUtility::Payload* retrieved_payload = |
- rtp_payload_registry_->PayloadTypeToPayload(payload_type); |
+ rtp_payload_registry.PayloadTypeToPayload(payload_type); |
EXPECT_TRUE(retrieved_payload); |
- EXPECT_EQ(first_payload_on_heap, retrieved_payload); |
+ EXPECT_STREQ(kTypicalPayloadName, retrieved_payload->name); |
+ EXPECT_EQ(true, retrieved_payload->audio); |
danilchap
2016/11/24 13:24:36
EXPECT_TRUE
magjed_webrtc
2016/11/24 14:29:29
Done.
|
+ EXPECT_EQ(kTypicalFrequency, retrieved_payload->typeSpecific.Audio.frequency); |
+ EXPECT_EQ(kTypicalChannels, retrieved_payload->typeSpecific.Audio.channels); |
+ EXPECT_EQ(kTypicalRate, retrieved_payload->typeSpecific.Audio.rate); |
+ |
retrieved_payload = |
- rtp_payload_registry_->PayloadTypeToPayload(payload_type - 1); |
+ rtp_payload_registry.PayloadTypeToPayload(payload_type - 1); |
EXPECT_TRUE(retrieved_payload); |
- EXPECT_EQ(second_payload_on_heap, retrieved_payload); |
+ EXPECT_STREQ(kTypicalPayloadName, retrieved_payload->name); |
+ EXPECT_EQ(true, retrieved_payload->audio); |
danilchap
2016/11/24 13:24:36
EXPECT_TRUE
magjed_webrtc
2016/11/24 14:29:29
Done.
|
+ EXPECT_EQ(kTypicalFrequency + 1, |
+ retrieved_payload->typeSpecific.Audio.frequency); |
+ EXPECT_EQ(kTypicalChannels, retrieved_payload->typeSpecific.Audio.channels); |
+ EXPECT_EQ(kTypicalRate, retrieved_payload->typeSpecific.Audio.rate); |
// Ok, update the rate for one of the codecs. If either the incoming rate or |
// the stored rate is zero it's not really an error to register the same |
// codec twice, and in that case roughly the following happens. |
- ON_CALL(*mock_payload_strategy_, PayloadIsCompatible(_, _, _, _)) |
- .WillByDefault(Return(true)); |
- EXPECT_CALL(*mock_payload_strategy_, |
- UpdatePayloadRate(first_payload_on_heap, kTypicalRate)); |
EXPECT_EQ( |
- 0, rtp_payload_registry_->RegisterReceivePayload(audio_codec, &ignored)); |
+ 0, rtp_payload_registry.RegisterReceivePayload(audio_codec, &ignored)); |
} |
-TEST_F(RtpPayloadRegistryTest, |
- RemovesCompatibleCodecsOnRegistryIfCodecsMustBeUnique) { |
- ON_CALL(*mock_payload_strategy_, PayloadIsCompatible(_, _, _, _)) |
- .WillByDefault(Return(true)); |
- ON_CALL(*mock_payload_strategy_, CodecsMustBeUnique()) |
- .WillByDefault(Return(true)); |
- |
+TEST(RtpPayloadRegistryTest, |
+ RemovesCompatibleCodecsOnRegistryIfCodecsMustBeUnique) { |
uint8_t payload_type = 97; |
+ RTPPayloadRegistry rtp_payload_registry; |
bool ignored = false; |
- ExpectReturnOfTypicalAudioPayload(payload_type, kTypicalRate); |
CodecInst audio_codec = kTypicalAudioCodec; |
audio_codec.pltype = payload_type; |
EXPECT_EQ( |
- 0, rtp_payload_registry_->RegisterReceivePayload(audio_codec, &ignored)); |
- ExpectReturnOfTypicalAudioPayload(payload_type - 1, kTypicalRate); |
+ 0, rtp_payload_registry.RegisterReceivePayload(audio_codec, &ignored)); |
CodecInst audio_codec_2 = kTypicalAudioCodec; |
audio_codec_2.pltype = payload_type - 1; |
- EXPECT_EQ(0, rtp_payload_registry_->RegisterReceivePayload(audio_codec_2, |
+ EXPECT_EQ(0, rtp_payload_registry.RegisterReceivePayload(audio_codec_2, |
&ignored)); |
- EXPECT_FALSE(rtp_payload_registry_->PayloadTypeToPayload(payload_type)) |
+ EXPECT_FALSE(rtp_payload_registry.PayloadTypeToPayload(payload_type)) |
<< "The first payload should be " |
"deregistered because the only thing that differs is payload type."; |
- EXPECT_TRUE(rtp_payload_registry_->PayloadTypeToPayload(payload_type - 1)) |
+ EXPECT_TRUE(rtp_payload_registry.PayloadTypeToPayload(payload_type - 1)) |
<< "The second payload should still be registered though."; |
- // Now ensure non-compatible codecs aren't removed. |
- ON_CALL(*mock_payload_strategy_, PayloadIsCompatible(_, _, _, _)) |
- .WillByDefault(Return(false)); |
- ExpectReturnOfTypicalAudioPayload(payload_type + 1, kTypicalRate); |
+ // Now ensure non-compatible codecs aren't removed. Make |audio_codec_3| |
+ // incompatible by changing the frequency. |
CodecInst audio_codec_3 = kTypicalAudioCodec; |
audio_codec_3.pltype = payload_type + 1; |
- EXPECT_EQ(0, rtp_payload_registry_->RegisterReceivePayload(audio_codec_3, |
+ audio_codec_3.plfreq = kTypicalFrequency + 1; |
+ EXPECT_EQ(0, rtp_payload_registry.RegisterReceivePayload(audio_codec_3, |
&ignored)); |
- EXPECT_TRUE(rtp_payload_registry_->PayloadTypeToPayload(payload_type - 1)) |
+ EXPECT_TRUE(rtp_payload_registry.PayloadTypeToPayload(payload_type - 1)) |
<< "Not compatible; both payloads should be kept."; |
- EXPECT_TRUE(rtp_payload_registry_->PayloadTypeToPayload(payload_type + 1)) |
+ EXPECT_TRUE(rtp_payload_registry.PayloadTypeToPayload(payload_type + 1)) |
<< "Not compatible; both payloads should be kept."; |
} |
-TEST_F(RtpPayloadRegistryTest, |
- LastReceivedCodecTypesAreResetWhenRegisteringNewPayloadTypes) { |
- rtp_payload_registry_->set_last_received_payload_type(17); |
- EXPECT_EQ(17, rtp_payload_registry_->last_received_payload_type()); |
+TEST(RtpPayloadRegistryTest, |
+ LastReceivedCodecTypesAreResetWhenRegisteringNewPayloadTypes) { |
+ RTPPayloadRegistry rtp_payload_registry; |
+ rtp_payload_registry.set_last_received_payload_type(17); |
+ EXPECT_EQ(17, rtp_payload_registry.last_received_payload_type()); |
- bool media_type_unchanged = rtp_payload_registry_->ReportMediaPayloadType(18); |
+ bool media_type_unchanged = rtp_payload_registry.ReportMediaPayloadType(18); |
EXPECT_FALSE(media_type_unchanged); |
- media_type_unchanged = rtp_payload_registry_->ReportMediaPayloadType(18); |
+ media_type_unchanged = rtp_payload_registry.ReportMediaPayloadType(18); |
EXPECT_TRUE(media_type_unchanged); |
bool ignored; |
- ExpectReturnOfTypicalAudioPayload(34, kTypicalRate); |
CodecInst audio_codec = kTypicalAudioCodec; |
audio_codec.pltype = 34; |
EXPECT_EQ( |
- 0, rtp_payload_registry_->RegisterReceivePayload(audio_codec, &ignored)); |
+ 0, rtp_payload_registry.RegisterReceivePayload(audio_codec, &ignored)); |
- EXPECT_EQ(-1, rtp_payload_registry_->last_received_payload_type()); |
- media_type_unchanged = rtp_payload_registry_->ReportMediaPayloadType(18); |
+ EXPECT_EQ(-1, rtp_payload_registry.last_received_payload_type()); |
+ media_type_unchanged = rtp_payload_registry.ReportMediaPayloadType(18); |
EXPECT_FALSE(media_type_unchanged); |
} |
class ParameterizedRtpPayloadRegistryTest |
- : public RtpPayloadRegistryTest, |
- public ::testing::WithParamInterface<int> {}; |
+ : public ::testing::TestWithParam<int> {}; |
TEST_P(ParameterizedRtpPayloadRegistryTest, |
FailsToRegisterKnownPayloadsWeAreNotInterestedIn) { |
- int payload_type = GetParam(); |
+ RTPPayloadRegistry rtp_payload_registry; |
bool ignored; |
CodecInst audio_codec; |
strcpy(audio_codec.plname, "whatever"); |
- audio_codec.pltype = static_cast<uint8_t>(payload_type); |
- audio_codec.plfreq = 19; |
+ audio_codec.pltype = GetParam(); |
+ audio_codec.plfreq = 1900; |
audio_codec.channels = 1; |
audio_codec.rate = 17; |
EXPECT_EQ( |
- -1, rtp_payload_registry_->RegisterReceivePayload(audio_codec, &ignored)); |
+ -1, rtp_payload_registry.RegisterReceivePayload(audio_codec, &ignored)); |
} |
INSTANTIATE_TEST_CASE_P(TestKnownBadPayloadTypes, |
ParameterizedRtpPayloadRegistryTest, |
testing::Values(64, 72, 73, 74, 75, 76, 77, 78, 79)); |
-class RtpPayloadRegistryGenericTest |
- : public RtpPayloadRegistryTest, |
- public ::testing::WithParamInterface<int> {}; |
+class RtpPayloadRegistryGenericTest : public ::testing::TestWithParam<int> {}; |
TEST_P(RtpPayloadRegistryGenericTest, RegisterGenericReceivePayloadType) { |
+ RTPPayloadRegistry rtp_payload_registry; |
+ |
bool ignored; |
CodecInst audio_codec; |
// Dummy values, except for payload_type. |
strcpy(audio_codec.plname, "generic-codec"); |
audio_codec.pltype = GetParam(); |
- audio_codec.plfreq = 19; |
+ audio_codec.plfreq = 1900; |
audio_codec.channels = 1; |
audio_codec.rate = 17; |
EXPECT_EQ( |
- 0, rtp_payload_registry_->RegisterReceivePayload(audio_codec, &ignored)); |
+ 0, rtp_payload_registry.RegisterReceivePayload(audio_codec, &ignored)); |
} |
// Generates an RTX packet for the given length and original sequence number. |
@@ -384,29 +339,31 @@ void TestRtxPacket(RTPPayloadRegistry* rtp_payload_registry, |
<< "The restored packet should have the correct ssrc."; |
} |
-TEST_F(RtpPayloadRegistryTest, MultipleRtxPayloadTypes) { |
+TEST(RtpPayloadRegistryTest, MultipleRtxPayloadTypes) { |
+ RTPPayloadRegistry rtp_payload_registry; |
// Set the incoming payload type to 90. |
RTPHeader header; |
header.payloadType = 90; |
header.ssrc = 1; |
- rtp_payload_registry_->SetIncomingPayloadType(header); |
- rtp_payload_registry_->SetRtxSsrc(100); |
+ rtp_payload_registry.SetIncomingPayloadType(header); |
+ rtp_payload_registry.SetRtxSsrc(100); |
// Map two RTX payload types. |
- rtp_payload_registry_->SetRtxPayloadType(105, 95); |
- rtp_payload_registry_->SetRtxPayloadType(106, 96); |
+ rtp_payload_registry.SetRtxPayloadType(105, 95); |
+ rtp_payload_registry.SetRtxPayloadType(106, 96); |
- TestRtxPacket(rtp_payload_registry_.get(), 105, 95, true); |
- TestRtxPacket(rtp_payload_registry_.get(), 106, 96, true); |
+ TestRtxPacket(&rtp_payload_registry, 105, 95, true); |
+ TestRtxPacket(&rtp_payload_registry, 106, 96, true); |
} |
-TEST_F(RtpPayloadRegistryTest, InvalidRtxConfiguration) { |
- rtp_payload_registry_->SetRtxSsrc(100); |
+TEST(RtpPayloadRegistryTest, InvalidRtxConfiguration) { |
+ RTPPayloadRegistry rtp_payload_registry; |
+ rtp_payload_registry.SetRtxSsrc(100); |
// Fails because no mappings exist and the incoming payload type isn't known. |
- TestRtxPacket(rtp_payload_registry_.get(), 105, 0, false); |
+ TestRtxPacket(&rtp_payload_registry, 105, 0, false); |
// Succeeds when the mapping is used, but fails for the implicit fallback. |
- rtp_payload_registry_->SetRtxPayloadType(105, 95); |
- TestRtxPacket(rtp_payload_registry_.get(), 105, 95, true); |
- TestRtxPacket(rtp_payload_registry_.get(), 106, 0, false); |
+ rtp_payload_registry.SetRtxPayloadType(105, 95); |
+ TestRtxPacket(&rtp_payload_registry, 105, 95, true); |
+ TestRtxPacket(&rtp_payload_registry, 106, 0, false); |
} |
INSTANTIATE_TEST_CASE_P(TestDynamicRange, |