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 2778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2789 | 2789 |
2790 TEST_F(VideoChannelSingleThreadTest, TestPlayoutAndSendingStates) { | 2790 TEST_F(VideoChannelSingleThreadTest, TestPlayoutAndSendingStates) { |
2791 Base::TestPlayoutAndSendingStates(); | 2791 Base::TestPlayoutAndSendingStates(); |
2792 } | 2792 } |
2793 | 2793 |
2794 TEST_F(VideoChannelSingleThreadTest, TestMuteStream) { | 2794 TEST_F(VideoChannelSingleThreadTest, TestMuteStream) { |
2795 CreateChannels(0, 0); | 2795 CreateChannels(0, 0); |
2796 // Test that we can Mute the default channel even though the sending SSRC | 2796 // Test that we can Mute the default channel even though the sending SSRC |
2797 // is unknown. | 2797 // is unknown. |
2798 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); | 2798 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); |
2799 EXPECT_TRUE(channel1_->SetVideoSend(0, false, nullptr)); | 2799 EXPECT_TRUE(channel1_->SetVideoSend(0, false, nullptr, nullptr)); |
2800 EXPECT_TRUE(media_channel1_->IsStreamMuted(0)); | 2800 EXPECT_TRUE(media_channel1_->IsStreamMuted(0)); |
2801 EXPECT_TRUE(channel1_->SetVideoSend(0, true, nullptr)); | 2801 EXPECT_TRUE(channel1_->SetVideoSend(0, true, nullptr, nullptr)); |
2802 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); | 2802 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); |
2803 // Test that we can not mute an unknown SSRC. | 2803 // Test that we can not mute an unknown SSRC. |
2804 EXPECT_FALSE(channel1_->SetVideoSend(kSsrc1, false, nullptr)); | 2804 EXPECT_FALSE(channel1_->SetVideoSend(kSsrc1, false, nullptr, nullptr)); |
2805 SendInitiate(); | 2805 SendInitiate(); |
2806 // After the local session description has been set, we can mute a stream | 2806 // After the local session description has been set, we can mute a stream |
2807 // with its SSRC. | 2807 // with its SSRC. |
2808 EXPECT_TRUE(channel1_->SetVideoSend(kSsrc1, false, nullptr)); | 2808 EXPECT_TRUE(channel1_->SetVideoSend(kSsrc1, false, nullptr, nullptr)); |
2809 EXPECT_TRUE(media_channel1_->IsStreamMuted(kSsrc1)); | 2809 EXPECT_TRUE(media_channel1_->IsStreamMuted(kSsrc1)); |
2810 EXPECT_TRUE(channel1_->SetVideoSend(kSsrc1, true, nullptr)); | 2810 EXPECT_TRUE(channel1_->SetVideoSend(kSsrc1, true, nullptr, nullptr)); |
2811 EXPECT_FALSE(media_channel1_->IsStreamMuted(kSsrc1)); | 2811 EXPECT_FALSE(media_channel1_->IsStreamMuted(kSsrc1)); |
2812 } | 2812 } |
2813 | 2813 |
2814 TEST_F(VideoChannelSingleThreadTest, TestMediaContentDirection) { | 2814 TEST_F(VideoChannelSingleThreadTest, TestMediaContentDirection) { |
2815 Base::TestMediaContentDirection(); | 2815 Base::TestMediaContentDirection(); |
2816 } | 2816 } |
2817 | 2817 |
2818 TEST_F(VideoChannelSingleThreadTest, TestNetworkRouteChanges) { | 2818 TEST_F(VideoChannelSingleThreadTest, TestNetworkRouteChanges) { |
2819 Base::TestNetworkRouteChanges(); | 2819 Base::TestNetworkRouteChanges(); |
2820 } | 2820 } |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3033 | 3033 |
3034 TEST_F(VideoChannelDoubleThreadTest, TestPlayoutAndSendingStates) { | 3034 TEST_F(VideoChannelDoubleThreadTest, TestPlayoutAndSendingStates) { |
3035 Base::TestPlayoutAndSendingStates(); | 3035 Base::TestPlayoutAndSendingStates(); |
3036 } | 3036 } |
3037 | 3037 |
3038 TEST_F(VideoChannelDoubleThreadTest, TestMuteStream) { | 3038 TEST_F(VideoChannelDoubleThreadTest, TestMuteStream) { |
3039 CreateChannels(0, 0); | 3039 CreateChannels(0, 0); |
3040 // Test that we can Mute the default channel even though the sending SSRC | 3040 // Test that we can Mute the default channel even though the sending SSRC |
3041 // is unknown. | 3041 // is unknown. |
3042 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); | 3042 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); |
3043 EXPECT_TRUE(channel1_->SetVideoSend(0, false, nullptr)); | 3043 EXPECT_TRUE(channel1_->SetVideoSend(0, false, nullptr, nullptr)); |
3044 EXPECT_TRUE(media_channel1_->IsStreamMuted(0)); | 3044 EXPECT_TRUE(media_channel1_->IsStreamMuted(0)); |
3045 EXPECT_TRUE(channel1_->SetVideoSend(0, true, nullptr)); | 3045 EXPECT_TRUE(channel1_->SetVideoSend(0, true, nullptr, nullptr)); |
3046 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); | 3046 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); |
3047 // Test that we can not mute an unknown SSRC. | 3047 // Test that we can not mute an unknown SSRC. |
3048 EXPECT_FALSE(channel1_->SetVideoSend(kSsrc1, false, nullptr)); | 3048 EXPECT_FALSE(channel1_->SetVideoSend(kSsrc1, false, nullptr, nullptr)); |
3049 SendInitiate(); | 3049 SendInitiate(); |
3050 // After the local session description has been set, we can mute a stream | 3050 // After the local session description has been set, we can mute a stream |
3051 // with its SSRC. | 3051 // with its SSRC. |
3052 EXPECT_TRUE(channel1_->SetVideoSend(kSsrc1, false, nullptr)); | 3052 EXPECT_TRUE(channel1_->SetVideoSend(kSsrc1, false, nullptr, nullptr)); |
3053 EXPECT_TRUE(media_channel1_->IsStreamMuted(kSsrc1)); | 3053 EXPECT_TRUE(media_channel1_->IsStreamMuted(kSsrc1)); |
3054 EXPECT_TRUE(channel1_->SetVideoSend(kSsrc1, true, nullptr)); | 3054 EXPECT_TRUE(channel1_->SetVideoSend(kSsrc1, true, nullptr, nullptr)); |
3055 EXPECT_FALSE(media_channel1_->IsStreamMuted(kSsrc1)); | 3055 EXPECT_FALSE(media_channel1_->IsStreamMuted(kSsrc1)); |
3056 } | 3056 } |
3057 | 3057 |
3058 TEST_F(VideoChannelDoubleThreadTest, TestMediaContentDirection) { | 3058 TEST_F(VideoChannelDoubleThreadTest, TestMediaContentDirection) { |
3059 Base::TestMediaContentDirection(); | 3059 Base::TestMediaContentDirection(); |
3060 } | 3060 } |
3061 | 3061 |
3062 TEST_F(VideoChannelDoubleThreadTest, TestNetworkRouteChanges) { | 3062 TEST_F(VideoChannelDoubleThreadTest, TestNetworkRouteChanges) { |
3063 Base::TestNetworkRouteChanges(); | 3063 Base::TestNetworkRouteChanges(); |
3064 } | 3064 } |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3586 }; | 3586 }; |
3587 rtc::CopyOnWriteBuffer payload(data, 3); | 3587 rtc::CopyOnWriteBuffer payload(data, 3); |
3588 cricket::SendDataResult result; | 3588 cricket::SendDataResult result; |
3589 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); | 3589 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); |
3590 EXPECT_EQ(params.ssrc, | 3590 EXPECT_EQ(params.ssrc, |
3591 media_channel1_->last_sent_data_params().ssrc); | 3591 media_channel1_->last_sent_data_params().ssrc); |
3592 EXPECT_EQ("foo", media_channel1_->last_sent_data()); | 3592 EXPECT_EQ("foo", media_channel1_->last_sent_data()); |
3593 } | 3593 } |
3594 | 3594 |
3595 // TODO(pthatcher): TestSetReceiver? | 3595 // TODO(pthatcher): TestSetReceiver? |
OLD | NEW |