OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 2771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2782 VideoReceiveStream::Decoder decoder; | 2782 VideoReceiveStream::Decoder decoder; |
2783 decoder.decoder = &fake_decoder; | 2783 decoder.decoder = &fake_decoder; |
2784 decoder.payload_type = 123; | 2784 decoder.payload_type = 123; |
2785 decoder.payload_name = "FAKE"; | 2785 decoder.payload_name = "FAKE"; |
2786 receive_config.decoders.push_back(decoder); | 2786 receive_config.decoders.push_back(decoder); |
2787 VideoReceiveStream* receive_stream = | 2787 VideoReceiveStream* receive_stream = |
2788 call->CreateVideoReceiveStream(receive_config); | 2788 call->CreateVideoReceiveStream(receive_config); |
2789 call->DestroyVideoReceiveStream(receive_stream); | 2789 call->DestroyVideoReceiveStream(receive_stream); |
2790 } | 2790 } |
2791 } | 2791 } |
2792 | |
2793 void VerifyEmptyNackConfig(const NackConfig& config) { | |
2794 EXPECT_EQ(0, config.rtp_history_ms) | |
2795 << "Enabling NACK requires rtcp-fb: nack negotiation."; | |
2796 } | |
2797 | |
2798 void VerifyEmptyFecConfig(const FecConfig& config) { | |
2799 EXPECT_EQ(-1, config.ulpfec_payload_type) | |
2800 << "Enabling FEC requires rtpmap: ulpfec negotiation."; | |
2801 EXPECT_EQ(-1, config.red_payload_type) | |
2802 << "Enabling FEC requires rtpmap: red negotiation."; | |
2803 EXPECT_EQ(-1, config.red_rtx_payload_type) | |
2804 << "Enabling RTX in FEC requires rtpmap: rtx negotiation."; | |
2805 } | |
2806 | |
2807 TEST_F(EndToEndTest, DefaultSendConfigDoesNotContainExtensions) { | |
mflodman
2015/06/05 11:50:03
I'd prefer another name than Extensions, since thi
pbos-webrtc
2015/06/05 12:01:56
Done.
| |
2808 VideoSendStream::Config default_send_config; | |
2809 EXPECT_EQ(0, default_send_config.rtp.nack.rtp_history_ms) | |
2810 << "Enabling NACK require rtcp-fb: nack negotiation."; | |
2811 EXPECT_TRUE(default_send_config.rtp.rtx.ssrcs.empty()) | |
2812 << "Enabling RTX requires rtpmap: rtx negotiation."; | |
2813 EXPECT_TRUE(default_send_config.rtp.extensions.empty()) | |
2814 << "Enabling RTP extensions require negotiation."; | |
2815 | |
2816 VerifyEmptyNackConfig(default_send_config.rtp.nack); | |
2817 VerifyEmptyFecConfig(default_send_config.rtp.fec); | |
2818 } | |
2819 | |
2820 TEST_F(EndToEndTest, DefaultReceiveConfigDoesNotContainExtensions) { | |
2821 VideoReceiveStream::Config default_receive_config; | |
2822 EXPECT_EQ(newapi::kRtcpCompound, default_receive_config.rtp.rtcp_mode) | |
2823 << "Reduced-size RTCP require rtcp-rsize to be negotiated."; | |
2824 EXPECT_FALSE(default_receive_config.rtp.remb) | |
2825 << "REMB require rtcp-fb: goog-remb to be negotiated."; | |
2826 EXPECT_FALSE( | |
2827 default_receive_config.rtp.rtcp_xr.receiver_reference_time_report) | |
2828 << "RTCP XR settings require rtcp-xr to be negotiated."; | |
2829 EXPECT_TRUE(default_receive_config.rtp.rtx.empty()) | |
2830 << "Enabling RTX requires rtpmap: rtx negotiation."; | |
2831 EXPECT_TRUE(default_receive_config.rtp.extensions.empty()) | |
2832 << "Enabling RTP extensions require negotiation."; | |
2833 | |
2834 VerifyEmptyNackConfig(default_receive_config.rtp.nack); | |
2835 VerifyEmptyFecConfig(default_receive_config.rtp.fec); | |
2836 } | |
2837 | |
2792 } // namespace webrtc | 2838 } // namespace webrtc |
OLD | NEW |