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 2753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2764 | 2764 |
2765 TEST_F(VideoChannelSingleThreadTest, TestPlayoutAndSendingStates) { | 2765 TEST_F(VideoChannelSingleThreadTest, TestPlayoutAndSendingStates) { |
2766 Base::TestPlayoutAndSendingStates(); | 2766 Base::TestPlayoutAndSendingStates(); |
2767 } | 2767 } |
2768 | 2768 |
2769 TEST_F(VideoChannelSingleThreadTest, TestMuteStream) { | 2769 TEST_F(VideoChannelSingleThreadTest, TestMuteStream) { |
2770 CreateChannels(0, 0); | 2770 CreateChannels(0, 0); |
2771 // Test that we can Mute the default channel even though the sending SSRC | 2771 // Test that we can Mute the default channel even though the sending SSRC |
2772 // is unknown. | 2772 // is unknown. |
2773 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); | 2773 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); |
2774 EXPECT_TRUE(channel1_->SetVideoSend(0, false, nullptr)); | 2774 EXPECT_TRUE(channel1_->SetVideoSend(0, false, nullptr, nullptr)); |
2775 EXPECT_TRUE(media_channel1_->IsStreamMuted(0)); | 2775 EXPECT_TRUE(media_channel1_->IsStreamMuted(0)); |
2776 EXPECT_TRUE(channel1_->SetVideoSend(0, true, nullptr)); | 2776 EXPECT_TRUE(channel1_->SetVideoSend(0, true, nullptr, nullptr)); |
2777 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); | 2777 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); |
2778 // Test that we can not mute an unknown SSRC. | 2778 // Test that we can not mute an unknown SSRC. |
2779 EXPECT_FALSE(channel1_->SetVideoSend(kSsrc1, false, nullptr)); | 2779 EXPECT_FALSE(channel1_->SetVideoSend(kSsrc1, false, nullptr, nullptr)); |
2780 SendInitiate(); | 2780 SendInitiate(); |
2781 // After the local session description has been set, we can mute a stream | 2781 // After the local session description has been set, we can mute a stream |
2782 // with its SSRC. | 2782 // with its SSRC. |
2783 EXPECT_TRUE(channel1_->SetVideoSend(kSsrc1, false, nullptr)); | 2783 EXPECT_TRUE(channel1_->SetVideoSend(kSsrc1, false, nullptr, nullptr)); |
2784 EXPECT_TRUE(media_channel1_->IsStreamMuted(kSsrc1)); | 2784 EXPECT_TRUE(media_channel1_->IsStreamMuted(kSsrc1)); |
2785 EXPECT_TRUE(channel1_->SetVideoSend(kSsrc1, true, nullptr)); | 2785 EXPECT_TRUE(channel1_->SetVideoSend(kSsrc1, true, nullptr, nullptr)); |
2786 EXPECT_FALSE(media_channel1_->IsStreamMuted(kSsrc1)); | 2786 EXPECT_FALSE(media_channel1_->IsStreamMuted(kSsrc1)); |
2787 } | 2787 } |
2788 | 2788 |
2789 TEST_F(VideoChannelSingleThreadTest, TestMediaContentDirection) { | 2789 TEST_F(VideoChannelSingleThreadTest, TestMediaContentDirection) { |
2790 Base::TestMediaContentDirection(); | 2790 Base::TestMediaContentDirection(); |
2791 } | 2791 } |
2792 | 2792 |
2793 TEST_F(VideoChannelSingleThreadTest, TestNetworkRouteChanges) { | 2793 TEST_F(VideoChannelSingleThreadTest, TestNetworkRouteChanges) { |
2794 Base::TestNetworkRouteChanges(); | 2794 Base::TestNetworkRouteChanges(); |
2795 } | 2795 } |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3004 | 3004 |
3005 TEST_F(VideoChannelDoubleThreadTest, TestPlayoutAndSendingStates) { | 3005 TEST_F(VideoChannelDoubleThreadTest, TestPlayoutAndSendingStates) { |
3006 Base::TestPlayoutAndSendingStates(); | 3006 Base::TestPlayoutAndSendingStates(); |
3007 } | 3007 } |
3008 | 3008 |
3009 TEST_F(VideoChannelDoubleThreadTest, TestMuteStream) { | 3009 TEST_F(VideoChannelDoubleThreadTest, TestMuteStream) { |
3010 CreateChannels(0, 0); | 3010 CreateChannels(0, 0); |
3011 // Test that we can Mute the default channel even though the sending SSRC | 3011 // Test that we can Mute the default channel even though the sending SSRC |
3012 // is unknown. | 3012 // is unknown. |
3013 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); | 3013 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); |
3014 EXPECT_TRUE(channel1_->SetVideoSend(0, false, nullptr)); | 3014 EXPECT_TRUE(channel1_->SetVideoSend(0, false, nullptr, nullptr)); |
3015 EXPECT_TRUE(media_channel1_->IsStreamMuted(0)); | 3015 EXPECT_TRUE(media_channel1_->IsStreamMuted(0)); |
3016 EXPECT_TRUE(channel1_->SetVideoSend(0, true, nullptr)); | 3016 EXPECT_TRUE(channel1_->SetVideoSend(0, true, nullptr, nullptr)); |
3017 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); | 3017 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); |
3018 // Test that we can not mute an unknown SSRC. | 3018 // Test that we can not mute an unknown SSRC. |
3019 EXPECT_FALSE(channel1_->SetVideoSend(kSsrc1, false, nullptr)); | 3019 EXPECT_FALSE(channel1_->SetVideoSend(kSsrc1, false, nullptr, nullptr)); |
3020 SendInitiate(); | 3020 SendInitiate(); |
3021 // After the local session description has been set, we can mute a stream | 3021 // After the local session description has been set, we can mute a stream |
3022 // with its SSRC. | 3022 // with its SSRC. |
3023 EXPECT_TRUE(channel1_->SetVideoSend(kSsrc1, false, nullptr)); | 3023 EXPECT_TRUE(channel1_->SetVideoSend(kSsrc1, false, nullptr, nullptr)); |
3024 EXPECT_TRUE(media_channel1_->IsStreamMuted(kSsrc1)); | 3024 EXPECT_TRUE(media_channel1_->IsStreamMuted(kSsrc1)); |
3025 EXPECT_TRUE(channel1_->SetVideoSend(kSsrc1, true, nullptr)); | 3025 EXPECT_TRUE(channel1_->SetVideoSend(kSsrc1, true, nullptr, nullptr)); |
3026 EXPECT_FALSE(media_channel1_->IsStreamMuted(kSsrc1)); | 3026 EXPECT_FALSE(media_channel1_->IsStreamMuted(kSsrc1)); |
3027 } | 3027 } |
3028 | 3028 |
3029 TEST_F(VideoChannelDoubleThreadTest, TestMediaContentDirection) { | 3029 TEST_F(VideoChannelDoubleThreadTest, TestMediaContentDirection) { |
3030 Base::TestMediaContentDirection(); | 3030 Base::TestMediaContentDirection(); |
3031 } | 3031 } |
3032 | 3032 |
3033 TEST_F(VideoChannelDoubleThreadTest, TestNetworkRouteChanges) { | 3033 TEST_F(VideoChannelDoubleThreadTest, TestNetworkRouteChanges) { |
3034 Base::TestNetworkRouteChanges(); | 3034 Base::TestNetworkRouteChanges(); |
3035 } | 3035 } |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3549 }; | 3549 }; |
3550 rtc::CopyOnWriteBuffer payload(data, 3); | 3550 rtc::CopyOnWriteBuffer payload(data, 3); |
3551 cricket::SendDataResult result; | 3551 cricket::SendDataResult result; |
3552 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); | 3552 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); |
3553 EXPECT_EQ(params.ssrc, | 3553 EXPECT_EQ(params.ssrc, |
3554 media_channel1_->last_sent_data_params().ssrc); | 3554 media_channel1_->last_sent_data_params().ssrc); |
3555 EXPECT_EQ("foo", media_channel1_->last_sent_data()); | 3555 EXPECT_EQ("foo", media_channel1_->last_sent_data()); |
3556 } | 3556 } |
3557 | 3557 |
3558 // TODO(pthatcher): TestSetReceiver? | 3558 // TODO(pthatcher): TestSetReceiver? |
OLD | NEW |