OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 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 3834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3845 rtpHeader.ssrc = kIncomingUnsignalledSsrc+2; | 3845 rtpHeader.ssrc = kIncomingUnsignalledSsrc+2; |
3846 cricket::SetRtpHeader(data, sizeof(data), rtpHeader); | 3846 cricket::SetRtpHeader(data, sizeof(data), rtpHeader); |
3847 rtc::CopyOnWriteBuffer packet2(data, sizeof(data)); | 3847 rtc::CopyOnWriteBuffer packet2(data, sizeof(data)); |
3848 channel_->OnPacketReceived(&packet2, packet_time); | 3848 channel_->OnPacketReceived(&packet2, packet_time); |
3849 // VP9 packet should replace the default receive SSRC. | 3849 // VP9 packet should replace the default receive SSRC. |
3850 ASSERT_EQ(1u, fake_call_->GetVideoReceiveStreams().size()); | 3850 ASSERT_EQ(1u, fake_call_->GetVideoReceiveStreams().size()); |
3851 recv_stream = fake_call_->GetVideoReceiveStreams()[0]; | 3851 recv_stream = fake_call_->GetVideoReceiveStreams()[0]; |
3852 EXPECT_EQ(rtpHeader.ssrc, recv_stream->GetConfig().rtp.remote_ssrc); | 3852 EXPECT_EQ(rtpHeader.ssrc, recv_stream->GetConfig().rtp.remote_ssrc); |
3853 // Verify that the receive stream sinks to a renderer. | 3853 // Verify that the receive stream sinks to a renderer. |
3854 webrtc::VideoFrame video_frame2(CreateBlackFrameBuffer(4, 4), 200, 0, | 3854 webrtc::VideoFrame video_frame2(CreateBlackFrameBuffer(4, 4), 200, 0, |
3855 webrtc::kVideoRotation_0); | 3855 webrtc::kVideoRotation_0); |
3856 recv_stream->InjectFrame(video_frame2); | 3856 recv_stream->InjectFrame(video_frame2); |
3857 EXPECT_EQ(2, renderer.num_rendered_frames()); | 3857 EXPECT_EQ(2, renderer.num_rendered_frames()); |
3858 | 3858 |
3859 #if defined(WEBRTC_USE_H264) | 3859 #if defined(WEBRTC_USE_H264) |
3860 // Receive H264 packet on third SSRC. | 3860 // Receive H264 packet on third SSRC. |
3861 rtpHeader.payload_type = 126; | 3861 rtpHeader.payload_type = 126; |
3862 rtpHeader.ssrc = kIncomingUnsignalledSsrc+3; | 3862 rtpHeader.ssrc = kIncomingUnsignalledSsrc+3; |
3863 cricket::SetRtpHeader(data, sizeof(data), rtpHeader); | 3863 cricket::SetRtpHeader(data, sizeof(data), rtpHeader); |
3864 rtc::CopyOnWriteBuffer packet3(data, sizeof(data)); | 3864 rtc::CopyOnWriteBuffer packet3(data, sizeof(data)); |
3865 channel_->OnPacketReceived(&packet3, packet_time); | 3865 channel_->OnPacketReceived(&packet3, packet_time); |
3866 // H264 packet should replace the default receive SSRC. | 3866 // H264 packet should replace the default receive SSRC. |
3867 ASSERT_EQ(1u, fake_call_->GetVideoReceiveStreams().size()); | 3867 ASSERT_EQ(1u, fake_call_->GetVideoReceiveStreams().size()); |
3868 recv_stream = fake_call_->GetVideoReceiveStreams()[0]; | 3868 recv_stream = fake_call_->GetVideoReceiveStreams()[0]; |
3869 EXPECT_EQ(rtpHeader.ssrc, recv_stream->GetConfig().rtp.remote_ssrc); | 3869 EXPECT_EQ(rtpHeader.ssrc, recv_stream->GetConfig().rtp.remote_ssrc); |
3870 // Verify that the receive stream sinks to a renderer. | 3870 // Verify that the receive stream sinks to a renderer. |
3871 webrtc::VideoFrame video_frame3(CreateBlackFrameBuffer(4, 4), 300, 0, | 3871 webrtc::VideoFrame video_frame3(CreateBlackFrameBuffer(4, 4), 300, 0, |
3872 webrtc::kVideoRotation_0); | 3872 webrtc::kVideoRotation_0); |
3873 recv_stream->InjectFrame(video_frame3); | 3873 recv_stream->InjectFrame(video_frame3); |
3874 EXPECT_EQ(3, renderer.num_rendered_frames()); | 3874 EXPECT_EQ(3, renderer.num_rendered_frames()); |
3875 #endif | 3875 #endif |
3876 } | 3876 } |
3877 | 3877 |
3878 TEST_F(WebRtcVideoChannel2Test, CanSentMaxBitrateForExistingStream) { | 3878 TEST_F(WebRtcVideoChannel2Test, CanSentMaxBitrateForExistingStream) { |
3879 AddSendStream(); | 3879 AddSendStream(); |
3880 | 3880 |
3881 cricket::FakeVideoCapturer capturer; | 3881 cricket::FakeVideoCapturer capturer; |
3882 EXPECT_TRUE(channel_->SetVideoSend(last_ssrc_, true, nullptr, &capturer)); | 3882 EXPECT_TRUE(channel_->SetVideoSend(last_ssrc_, true, nullptr, &capturer)); |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4391 | 4391 |
4392 TEST_F(WebRtcVideoChannel2SimulcastTest, | 4392 TEST_F(WebRtcVideoChannel2SimulcastTest, |
4393 NoSimulcastScreenshareWithoutConference) { | 4393 NoSimulcastScreenshareWithoutConference) { |
4394 webrtc::test::ScopedFieldTrials override_field_trials_( | 4394 webrtc::test::ScopedFieldTrials override_field_trials_( |
4395 "WebRTC-SimulcastScreenshare/Enabled/"); | 4395 "WebRTC-SimulcastScreenshare/Enabled/"); |
4396 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 1, true, | 4396 VerifySimulcastSettings(cricket::VideoCodec("VP8"), 1280, 720, 3, 1, true, |
4397 false); | 4397 false); |
4398 } | 4398 } |
4399 | 4399 |
4400 } // namespace cricket | 4400 } // namespace cricket |
OLD | NEW |