OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2009 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2009 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 | 10 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
94 enum Flags { | 94 enum Flags { |
95 RTCP_MUX = 0x1, | 95 RTCP_MUX = 0x1, |
96 RTCP_MUX_REQUIRED = 0x2, | 96 RTCP_MUX_REQUIRED = 0x2, |
97 SECURE = 0x4, | 97 SECURE = 0x4, |
98 SSRC_MUX = 0x8, | 98 SSRC_MUX = 0x8, |
99 DTLS = 0x10, | 99 DTLS = 0x10, |
100 GCM_CIPHER = 0x20, | 100 GCM_CIPHER = 0x20, |
101 // Use BaseChannel with PacketTransportInternal rather than | 101 // Use BaseChannel with PacketTransportInternal rather than |
102 // DtlsTransportInternal. | 102 // DtlsTransportInternal. |
103 RAW_PACKET_TRANSPORT = 0x40, | 103 RAW_PACKET_TRANSPORT = 0x40, |
104 ENCRYPTED_HEADERS = 0x80, | |
104 }; | 105 }; |
105 | 106 |
106 ChannelTest(bool verify_playout, | 107 ChannelTest(bool verify_playout, |
107 rtc::ArrayView<const uint8_t> rtp_data, | 108 rtc::ArrayView<const uint8_t> rtp_data, |
108 rtc::ArrayView<const uint8_t> rtcp_data, | 109 rtc::ArrayView<const uint8_t> rtcp_data, |
109 NetworkIsWorker network_is_worker) | 110 NetworkIsWorker network_is_worker) |
110 : verify_playout_(verify_playout), | 111 : verify_playout_(verify_playout), |
111 rtp_packet_(rtp_data.data(), rtp_data.size()), | 112 rtp_packet_(rtp_data.data(), rtp_data.size()), |
112 rtcp_packet_(rtcp_data.data(), rtcp_data.size()) { | 113 rtcp_packet_(rtcp_data.data(), rtcp_data.size()) { |
113 if (network_is_worker == NetworkIsWorker::Yes) { | 114 if (network_is_worker == NetworkIsWorker::Yes) { |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
258 rtc::PacketTransportInternal* fake_rtp_packet_transport, | 259 rtc::PacketTransportInternal* fake_rtp_packet_transport, |
259 rtc::PacketTransportInternal* fake_rtcp_packet_transport, | 260 rtc::PacketTransportInternal* fake_rtcp_packet_transport, |
260 int flags) { | 261 int flags) { |
261 rtc::Thread* signaling_thread = rtc::Thread::Current(); | 262 rtc::Thread* signaling_thread = rtc::Thread::Current(); |
262 typename T::Channel* channel = new typename T::Channel( | 263 typename T::Channel* channel = new typename T::Channel( |
263 worker_thread, network_thread, signaling_thread, engine, ch, | 264 worker_thread, network_thread, signaling_thread, engine, ch, |
264 cricket::CN_AUDIO, (flags & RTCP_MUX_REQUIRED) != 0, | 265 cricket::CN_AUDIO, (flags & RTCP_MUX_REQUIRED) != 0, |
265 (flags & SECURE) != 0); | 266 (flags & SECURE) != 0); |
266 rtc::CryptoOptions crypto_options; | 267 rtc::CryptoOptions crypto_options; |
267 crypto_options.enable_gcm_crypto_suites = (flags & GCM_CIPHER) != 0; | 268 crypto_options.enable_gcm_crypto_suites = (flags & GCM_CIPHER) != 0; |
269 crypto_options.enable_encrypted_rtp_header_extensions = | |
270 (flags & ENCRYPTED_HEADERS) != 0; | |
268 channel->SetCryptoOptions(crypto_options); | 271 channel->SetCryptoOptions(crypto_options); |
269 if (!channel->NeedsRtcpTransport()) { | 272 if (!channel->NeedsRtcpTransport()) { |
270 fake_rtcp_dtls_transport = nullptr; | 273 fake_rtcp_dtls_transport = nullptr; |
271 } | 274 } |
272 if (!channel->Init_w(fake_rtp_dtls_transport, fake_rtcp_dtls_transport, | 275 if (!channel->Init_w(fake_rtp_dtls_transport, fake_rtcp_dtls_transport, |
273 fake_rtp_packet_transport, | 276 fake_rtp_packet_transport, |
274 fake_rtcp_packet_transport)) { | 277 fake_rtcp_packet_transport)) { |
275 delete channel; | 278 delete channel; |
276 channel = NULL; | 279 channel = NULL; |
277 } | 280 } |
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
885 EXPECT_TRUE(channel2_->SetRemoteContent(&content4, CA_ANSWER, NULL)); | 888 EXPECT_TRUE(channel2_->SetRemoteContent(&content4, CA_ANSWER, NULL)); |
886 EXPECT_EQ(0u, media_channel2_->recv_streams().size()); | 889 EXPECT_EQ(0u, media_channel2_->recv_streams().size()); |
887 | 890 |
888 EXPECT_TRUE(channel1_->secure()); | 891 EXPECT_TRUE(channel1_->secure()); |
889 EXPECT_TRUE(channel2_->secure()); | 892 EXPECT_TRUE(channel2_->secure()); |
890 SendCustomRtp2(kSsrc2, 0); | 893 SendCustomRtp2(kSsrc2, 0); |
891 WaitForThreads(); | 894 WaitForThreads(); |
892 EXPECT_TRUE(CheckCustomRtp1(kSsrc2, 0)); | 895 EXPECT_TRUE(CheckCustomRtp1(kSsrc2, 0)); |
893 } | 896 } |
894 | 897 |
898 // Test that encrypted header extensions are working and can be changed when | |
899 // sending a new OFFER/ANSWER. | |
900 void TestChangeEncryptedHeaderExtensions(int flags) { | |
901 struct PacketListener : public sigslot::has_slots<> { | |
902 PacketListener() {} | |
903 void OnReadPacket(rtc::PacketTransportInternal* transport, | |
904 const char* data, size_t size, const rtc::PacketTime& time, | |
905 int flags) { | |
906 CompareHeaderExtensions( | |
907 reinterpret_cast<const char*>(kPcmuFrameWithExtensions), data, | |
908 encrypted_headers, false); | |
909 } | |
910 // This expects both packets to be based on kPcmuFrameWithExtensions. | |
911 // Header extensions with an id in "encrypted_headers" are expected to be | |
912 // different in the packets unless "expect_equal" is set to "true". | |
913 void CompareHeaderExtensions(const char* packet1, const char* packet2, | |
914 const std::vector<int> encrypted_headers, | |
915 bool expect_equal) { | |
Taylor Brandstetter
2017/04/01 00:28:59
Since this is only called with "false" in this fil
joachim
2017/04/17 10:46:09
Moved to "webrtc/media/base/fakertp.cc" to avoid c
| |
916 // RTP extension headers are the same. | |
917 EXPECT_EQ(0, memcmp(packet1 + 12, packet2 + 12, 4)); | |
918 // Check for one-byte header extensions. | |
919 EXPECT_EQ('\xBE', packet1[12]); | |
920 EXPECT_EQ('\xDE', packet1[13]); | |
921 // Determine position and size of extension headers. | |
922 size_t extension_words = packet1[14] << 8 | packet1[15]; | |
923 const char* extension_data1 = packet1 + 12 + 4; | |
924 const char* extension_end1 = extension_data1 + extension_words * 4; | |
925 const char* extension_data2 = packet2 + 12 + 4; | |
926 while (extension_data1 < extension_end1) { | |
927 uint8_t id = (*extension_data1 & 0xf0) >> 4; | |
928 uint8_t len = (*extension_data1 & 0x0f) +1; | |
929 extension_data1++; | |
930 extension_data2++; | |
931 EXPECT_LE(extension_data1, extension_end1); | |
932 if (id == 15) { | |
933 // Finished parsing. | |
934 break; | |
935 } | |
936 | |
937 // The header extension doesn't get encrypted if the id not in the | |
938 // list of header extensions to encrypt. | |
939 if (expect_equal || | |
940 std::find(encrypted_headers.begin(), encrypted_headers.end(), id) | |
941 == encrypted_headers.end()) { | |
942 EXPECT_EQ(0, memcmp(extension_data1, extension_data2, len)); | |
943 } else { | |
944 EXPECT_NE(0, memcmp(extension_data1, extension_data2, len)); | |
945 } | |
946 | |
947 extension_data1 += len; | |
948 extension_data2 += len; | |
949 // Skip padding. | |
950 while (extension_data1 < extension_end1 && *extension_data1 == 0) { | |
951 extension_data1++; | |
952 extension_data2++; | |
953 } | |
954 } | |
955 } | |
956 std::vector<int> encrypted_headers; | |
957 } packet_listener1, packet_listener2; | |
958 | |
959 cricket::StreamParams stream1; | |
960 stream1.groupid = "group1"; | |
961 stream1.id = "stream1"; | |
962 stream1.ssrcs.push_back(kSsrc1); | |
963 stream1.cname = "stream1_cname"; | |
964 | |
965 cricket::StreamParams stream2; | |
966 stream2.groupid = "group1"; | |
967 stream2.id = "stream2"; | |
968 stream2.ssrcs.push_back(kSsrc2); | |
969 stream2.cname = "stream2_cname"; | |
970 | |
971 // Use SRTP when testing encrypted extensions. | |
972 int channel_flags = flags | SECURE | ENCRYPTED_HEADERS; | |
973 // Enable SDES if channel is not using DTLS. | |
974 int content_flags = (channel_flags & DTLS) == 0 ? SECURE : 0; | |
975 | |
976 // kPcmuFrameWithExtensions contains RTP extension headers with ids 1-4. | |
977 // Make sure to use URIs that are supported for encryption. | |
978 cricket::RtpHeaderExtensions extensions1; | |
979 extensions1.push_back( | |
980 RtpExtension(RtpExtension::kAudioLevelUri, 10)); | |
981 extensions1.push_back( | |
982 RtpExtension(RtpExtension::kAudioLevelUri, 1, true)); | |
983 | |
984 cricket::RtpHeaderExtensions extensions2; | |
985 extensions2.push_back( | |
986 RtpExtension(RtpExtension::kAudioLevelUri, 10)); | |
987 extensions2.push_back( | |
988 RtpExtension(RtpExtension::kAudioLevelUri, 2, true)); | |
989 extensions2.push_back( | |
990 RtpExtension(RtpExtension::kVideoRotationUri, 3)); | |
991 extensions2.push_back( | |
992 RtpExtension(RtpExtension::kTimestampOffsetUri, 4, true)); | |
993 | |
994 // Setup a call where channel 1 send |stream1| to channel 2. | |
995 CreateChannels(channel_flags, channel_flags); | |
996 fake_rtp_dtls_transport1_->fake_ice_transport()->SignalReadPacket.connect( | |
997 &packet_listener1, &PacketListener::OnReadPacket); | |
998 fake_rtp_dtls_transport2_->fake_ice_transport()->SignalReadPacket.connect( | |
999 &packet_listener2, &PacketListener::OnReadPacket); | |
1000 | |
1001 typename T::Content content1; | |
1002 CreateContent(content_flags, kPcmuCodec, kH264Codec, &content1); | |
1003 content1.AddStream(stream1); | |
1004 content1.set_rtp_header_extensions(extensions1); | |
1005 EXPECT_TRUE(channel1_->SetLocalContent(&content1, CA_OFFER, NULL)); | |
1006 EXPECT_TRUE(channel1_->Enable(true)); | |
1007 EXPECT_EQ(1u, media_channel1_->send_streams().size()); | |
1008 | |
1009 EXPECT_TRUE(channel2_->SetRemoteContent(&content1, CA_OFFER, NULL)); | |
1010 EXPECT_EQ(1u, media_channel2_->recv_streams().size()); | |
1011 ConnectFakeTransports(); | |
1012 | |
1013 // Channel 2 sends back |stream2|. | |
1014 typename T::Content content2; | |
1015 CreateContent(content_flags, kPcmuCodec, kH264Codec, &content2); | |
1016 content2.AddStream(stream2); | |
1017 content2.set_rtp_header_extensions(extensions1); | |
1018 EXPECT_TRUE(channel1_->SetRemoteContent(&content2, CA_ANSWER, NULL)); | |
1019 EXPECT_EQ(1u, media_channel1_->recv_streams().size()); | |
1020 EXPECT_TRUE(channel2_->SetLocalContent(&content2, CA_ANSWER, NULL)); | |
1021 EXPECT_TRUE(channel2_->Enable(true)); | |
1022 EXPECT_EQ(1u, media_channel2_->send_streams().size()); | |
1023 | |
1024 packet_listener1.encrypted_headers.push_back(1); | |
1025 packet_listener2.encrypted_headers.push_back(1); | |
1026 | |
1027 SendCustomRtp1(kSsrc1, 0); | |
1028 SendCustomRtp2(kSsrc2, 0); | |
1029 WaitForThreads(); | |
1030 EXPECT_TRUE(CheckCustomRtp2(kSsrc1, 0)); | |
1031 EXPECT_TRUE(CheckCustomRtp1(kSsrc2, 0)); | |
1032 | |
1033 // Let channel 2 update the encrypted header extensions. | |
1034 typename T::Content content3; | |
1035 CreateContent(content_flags, kPcmuCodec, kH264Codec, &content3); | |
1036 content3.AddStream(stream2); | |
1037 content3.set_rtp_header_extensions(extensions2); | |
1038 EXPECT_TRUE(channel2_->SetLocalContent(&content3, CA_OFFER, NULL)); | |
1039 ASSERT_EQ(1u, media_channel2_->send_streams().size()); | |
1040 EXPECT_EQ(stream2, media_channel2_->send_streams()[0]); | |
1041 | |
1042 EXPECT_TRUE(channel1_->SetRemoteContent(&content3, CA_OFFER, NULL)); | |
1043 ASSERT_EQ(1u, media_channel1_->recv_streams().size()); | |
1044 EXPECT_EQ(stream2, media_channel1_->recv_streams()[0]); | |
1045 | |
1046 // Channel 1 replies with the same extensions. | |
1047 typename T::Content content4; | |
1048 CreateContent(content_flags, kPcmuCodec, kH264Codec, &content4); | |
1049 content4.AddStream(stream1); | |
1050 content4.set_rtp_header_extensions(extensions2); | |
1051 EXPECT_TRUE(channel1_->SetLocalContent(&content4, CA_ANSWER, NULL)); | |
1052 EXPECT_EQ(1u, media_channel1_->send_streams().size()); | |
1053 | |
1054 EXPECT_TRUE(channel2_->SetRemoteContent(&content4, CA_ANSWER, NULL)); | |
1055 EXPECT_EQ(1u, media_channel2_->recv_streams().size()); | |
1056 | |
1057 packet_listener1.encrypted_headers.clear(); | |
1058 packet_listener1.encrypted_headers.push_back(2); | |
1059 packet_listener1.encrypted_headers.push_back(4); | |
1060 packet_listener2.encrypted_headers.clear(); | |
1061 packet_listener2.encrypted_headers.push_back(2); | |
1062 packet_listener2.encrypted_headers.push_back(4); | |
1063 | |
1064 SendCustomRtp1(kSsrc1, 0); | |
1065 SendCustomRtp2(kSsrc2, 0); | |
1066 WaitForThreads(); | |
1067 EXPECT_TRUE(CheckCustomRtp2(kSsrc1, 0)); | |
1068 EXPECT_TRUE(CheckCustomRtp1(kSsrc2, 0)); | |
1069 } | |
Taylor Brandstetter
2017/04/01 00:28:59
Once we decide how to resolve the other comments:
joachim
2017/04/17 10:46:09
Acknowledged - though I need to find out how to do
Taylor Brandstetter
2017/04/19 06:48:39
Well, ConnectFakeTransports is what simulates DTLS
joachim
2017/04/19 23:40:19
Done. Also added a check for correct encrypted ext
| |
1070 | |
895 // Test that we only start playout and sending at the right times. | 1071 // Test that we only start playout and sending at the right times. |
896 void TestPlayoutAndSendingStates() { | 1072 void TestPlayoutAndSendingStates() { |
897 CreateChannels(0, 0); | 1073 CreateChannels(0, 0); |
898 if (verify_playout_) { | 1074 if (verify_playout_) { |
899 EXPECT_FALSE(media_channel1_->playout()); | 1075 EXPECT_FALSE(media_channel1_->playout()); |
900 } | 1076 } |
901 EXPECT_FALSE(media_channel1_->sending()); | 1077 EXPECT_FALSE(media_channel1_->sending()); |
902 if (verify_playout_) { | 1078 if (verify_playout_) { |
903 EXPECT_FALSE(media_channel2_->playout()); | 1079 EXPECT_FALSE(media_channel2_->playout()); |
904 } | 1080 } |
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2101 : Base(true, kPcmuFrame, kRtcpReport, NetworkIsWorker::Yes) {} | 2277 : Base(true, kPcmuFrame, kRtcpReport, NetworkIsWorker::Yes) {} |
2102 }; | 2278 }; |
2103 | 2279 |
2104 class VoiceChannelDoubleThreadTest : public ChannelTest<VoiceTraits> { | 2280 class VoiceChannelDoubleThreadTest : public ChannelTest<VoiceTraits> { |
2105 public: | 2281 public: |
2106 typedef ChannelTest<VoiceTraits> Base; | 2282 typedef ChannelTest<VoiceTraits> Base; |
2107 VoiceChannelDoubleThreadTest() | 2283 VoiceChannelDoubleThreadTest() |
2108 : Base(true, kPcmuFrame, kRtcpReport, NetworkIsWorker::No) {} | 2284 : Base(true, kPcmuFrame, kRtcpReport, NetworkIsWorker::No) {} |
2109 }; | 2285 }; |
2110 | 2286 |
2287 class VoiceChannelWithEncryptedRtpHeaderExtensionsSingleThreadTest | |
2288 : public ChannelTest<VoiceTraits> { | |
2289 public: | |
2290 typedef ChannelTest<VoiceTraits> Base; | |
2291 VoiceChannelWithEncryptedRtpHeaderExtensionsSingleThreadTest() | |
2292 : Base(true, kPcmuFrameWithExtensions, kRtcpReport, | |
2293 NetworkIsWorker::Yes) {} | |
2294 }; | |
2295 | |
2296 class VoiceChannelWithEncryptedRtpHeaderExtensionsDoubleThreadTest | |
2297 : public ChannelTest<VoiceTraits> { | |
2298 public: | |
2299 typedef ChannelTest<VoiceTraits> Base; | |
2300 VoiceChannelWithEncryptedRtpHeaderExtensionsDoubleThreadTest() | |
2301 : Base(true, kPcmuFrameWithExtensions, kRtcpReport, | |
2302 NetworkIsWorker::No) {} | |
2303 }; | |
2304 | |
2111 // override to add NULL parameter | 2305 // override to add NULL parameter |
2112 template <> | 2306 template <> |
2113 cricket::VideoChannel* ChannelTest<VideoTraits>::CreateChannel( | 2307 cricket::VideoChannel* ChannelTest<VideoTraits>::CreateChannel( |
2114 rtc::Thread* worker_thread, | 2308 rtc::Thread* worker_thread, |
2115 rtc::Thread* network_thread, | 2309 rtc::Thread* network_thread, |
2116 cricket::MediaEngineInterface* engine, | 2310 cricket::MediaEngineInterface* engine, |
2117 cricket::FakeVideoMediaChannel* ch, | 2311 cricket::FakeVideoMediaChannel* ch, |
2118 cricket::DtlsTransportInternal* fake_rtp_dtls_transport, | 2312 cricket::DtlsTransportInternal* fake_rtp_dtls_transport, |
2119 cricket::DtlsTransportInternal* fake_rtcp_dtls_transport, | 2313 cricket::DtlsTransportInternal* fake_rtcp_dtls_transport, |
2120 rtc::PacketTransportInternal* fake_rtp_packet_transport, | 2314 rtc::PacketTransportInternal* fake_rtp_packet_transport, |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2240 } | 2434 } |
2241 | 2435 |
2242 TEST_F(VoiceChannelSingleThreadTest, TestUpdateRemoteStreamsInContent) { | 2436 TEST_F(VoiceChannelSingleThreadTest, TestUpdateRemoteStreamsInContent) { |
2243 Base::TestUpdateStreamsInRemoteContent(); | 2437 Base::TestUpdateStreamsInRemoteContent(); |
2244 } | 2438 } |
2245 | 2439 |
2246 TEST_F(VoiceChannelSingleThreadTest, TestChangeStreamParamsInContent) { | 2440 TEST_F(VoiceChannelSingleThreadTest, TestChangeStreamParamsInContent) { |
2247 Base::TestChangeStreamParamsInContent(); | 2441 Base::TestChangeStreamParamsInContent(); |
2248 } | 2442 } |
2249 | 2443 |
2444 TEST_F(VoiceChannelWithEncryptedRtpHeaderExtensionsSingleThreadTest, | |
2445 TestChangeEncryptedHeaderExtensionsDtls) { | |
2446 int flags = DTLS; | |
2447 Base::TestChangeEncryptedHeaderExtensions(flags); | |
2448 } | |
2449 | |
2450 TEST_F(VoiceChannelWithEncryptedRtpHeaderExtensionsSingleThreadTest, | |
2451 TestChangeEncryptedHeaderExtensionsDtlsGcm) { | |
2452 int flags = DTLS | GCM_CIPHER; | |
2453 Base::TestChangeEncryptedHeaderExtensions(flags); | |
2454 } | |
2455 | |
2456 TEST_F(VoiceChannelWithEncryptedRtpHeaderExtensionsSingleThreadTest, | |
2457 TestChangeEncryptedHeaderExtensionsSDES) { | |
2458 int flags = 0; | |
2459 Base::TestChangeEncryptedHeaderExtensions(flags); | |
2460 } | |
2461 | |
2250 TEST_F(VoiceChannelSingleThreadTest, TestPlayoutAndSendingStates) { | 2462 TEST_F(VoiceChannelSingleThreadTest, TestPlayoutAndSendingStates) { |
2251 Base::TestPlayoutAndSendingStates(); | 2463 Base::TestPlayoutAndSendingStates(); |
2252 } | 2464 } |
2253 | 2465 |
2254 TEST_F(VoiceChannelSingleThreadTest, TestMuteStream) { | 2466 TEST_F(VoiceChannelSingleThreadTest, TestMuteStream) { |
2255 CreateChannels(0, 0); | 2467 CreateChannels(0, 0); |
2256 // Test that we can Mute the default channel even though the sending SSRC | 2468 // Test that we can Mute the default channel even though the sending SSRC |
2257 // is unknown. | 2469 // is unknown. |
2258 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); | 2470 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); |
2259 EXPECT_TRUE(channel1_->SetAudioSend(0, false, nullptr, nullptr)); | 2471 EXPECT_TRUE(channel1_->SetAudioSend(0, false, nullptr, nullptr)); |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2573 } | 2785 } |
2574 | 2786 |
2575 TEST_F(VoiceChannelDoubleThreadTest, TestUpdateRemoteStreamsInContent) { | 2787 TEST_F(VoiceChannelDoubleThreadTest, TestUpdateRemoteStreamsInContent) { |
2576 Base::TestUpdateStreamsInRemoteContent(); | 2788 Base::TestUpdateStreamsInRemoteContent(); |
2577 } | 2789 } |
2578 | 2790 |
2579 TEST_F(VoiceChannelDoubleThreadTest, TestChangeStreamParamsInContent) { | 2791 TEST_F(VoiceChannelDoubleThreadTest, TestChangeStreamParamsInContent) { |
2580 Base::TestChangeStreamParamsInContent(); | 2792 Base::TestChangeStreamParamsInContent(); |
2581 } | 2793 } |
2582 | 2794 |
2795 TEST_F(VoiceChannelWithEncryptedRtpHeaderExtensionsDoubleThreadTest, | |
2796 TestChangeEncryptedHeaderExtensionsDtls) { | |
2797 int flags = DTLS; | |
2798 Base::TestChangeEncryptedHeaderExtensions(flags); | |
2799 } | |
2800 | |
2801 TEST_F(VoiceChannelWithEncryptedRtpHeaderExtensionsDoubleThreadTest, | |
2802 TestChangeEncryptedHeaderExtensionsDtlsGcm) { | |
2803 int flags = DTLS | GCM_CIPHER; | |
2804 Base::TestChangeEncryptedHeaderExtensions(flags); | |
2805 } | |
2806 | |
2807 TEST_F(VoiceChannelWithEncryptedRtpHeaderExtensionsDoubleThreadTest, | |
2808 TestChangeEncryptedHeaderExtensionsSDES) { | |
2809 int flags = 0; | |
2810 Base::TestChangeEncryptedHeaderExtensions(flags); | |
2811 } | |
2812 | |
2583 TEST_F(VoiceChannelDoubleThreadTest, TestPlayoutAndSendingStates) { | 2813 TEST_F(VoiceChannelDoubleThreadTest, TestPlayoutAndSendingStates) { |
2584 Base::TestPlayoutAndSendingStates(); | 2814 Base::TestPlayoutAndSendingStates(); |
2585 } | 2815 } |
2586 | 2816 |
2587 TEST_F(VoiceChannelDoubleThreadTest, TestMuteStream) { | 2817 TEST_F(VoiceChannelDoubleThreadTest, TestMuteStream) { |
2588 CreateChannels(0, 0); | 2818 CreateChannels(0, 0); |
2589 // Test that we can Mute the default channel even though the sending SSRC | 2819 // Test that we can Mute the default channel even though the sending SSRC |
2590 // is unknown. | 2820 // is unknown. |
2591 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); | 2821 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); |
2592 EXPECT_TRUE(channel1_->SetAudioSend(0, false, nullptr, nullptr)); | 2822 EXPECT_TRUE(channel1_->SetAudioSend(0, false, nullptr, nullptr)); |
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3785 ASSERT_TRUE(voice_channel_.Init_w(nullptr, nullptr, &fake_rtp_dtls_transport_, | 4015 ASSERT_TRUE(voice_channel_.Init_w(nullptr, nullptr, &fake_rtp_dtls_transport_, |
3786 &fake_rtcp_dtls_transport_)); | 4016 &fake_rtcp_dtls_transport_)); |
3787 EXPECT_DEATH(voice_channel_.SetTransports(&fake_rtp_dtls_transport_, | 4017 EXPECT_DEATH(voice_channel_.SetTransports(&fake_rtp_dtls_transport_, |
3788 &fake_rtp_dtls_transport_), | 4018 &fake_rtp_dtls_transport_), |
3789 ""); | 4019 ""); |
3790 } | 4020 } |
3791 | 4021 |
3792 #endif // RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) | 4022 #endif // RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) |
3793 | 4023 |
3794 // TODO(pthatcher): TestSetReceiver? | 4024 // TODO(pthatcher): TestSetReceiver? |
OLD | NEW |