Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(637)

Unified Diff: webrtc/call/rtx_receive_stream_unittest.cc

Issue 3008773002: Use RtxReceiveStream. (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/call/rtx_receive_stream_unittest.cc
diff --git a/webrtc/call/rtx_receive_stream_unittest.cc b/webrtc/call/rtx_receive_stream_unittest.cc
index e9c82105212adec197b49f6298c1e345b5df3be5..f0c0d653b8f6bf56e5e9be8125a122795be84a28 100644
--- a/webrtc/call/rtx_receive_stream_unittest.cc
+++ b/webrtc/call/rtx_receive_stream_unittest.cc
@@ -25,6 +25,7 @@ using ::testing::StrictMock;
constexpr int kMediaPayloadType = 100;
constexpr int kRtxPayloadType = 98;
+constexpr int kOtherPayloadType = 90;
constexpr uint32_t kMediaSSRC = 0x3333333;
constexpr uint16_t kMediaSeqno = 0x5657;
@@ -54,9 +55,9 @@ constexpr uint8_t kRtxPacketWithCVO[] = {
0xee,
};
-std::map<int, int> PayloadTypeMapping() {
+std::map<int, int> PayloadTypeMapping(int payload_type = kRtxPayloadType) {
std::map<int, int> m;
- m[kRtxPayloadType] = kMediaPayloadType;
+ m[payload_type] = kMediaPayloadType;
return m;
}
@@ -86,7 +87,8 @@ TEST(RtxReceiveStreamTest, RestoresPacketPayload) {
TEST(RtxReceiveStreamTest, IgnoresUnknownPayloadType) {
StrictMock<MockRtpPacketSink> media_sink;
- RtxReceiveStream rtx_sink(&media_sink, std::map<int, int>(), kMediaSSRC);
+ RtxReceiveStream rtx_sink(&media_sink, PayloadTypeMapping(kOtherPayloadType),
danilchap 2017/08/29 13:33:06 suggestion: {{kUnknownPayloadType, kMediaPayloadTy
nisse-webrtc 2017/08/29 13:51:35 If I change to a map initializer here, should I do
+ kMediaSSRC);
RtpPacketReceived rtx_packet;
EXPECT_TRUE(rtx_packet.Parse(rtc::ArrayView<const uint8_t>(kRtxPacket)));
rtx_sink.OnRtpPacket(rtx_packet);

Powered by Google App Engine
This is Rietveld 408576698