| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 EXPECT_EQ(kTestWidth, info.senders[1].send_frame_width); | 603 EXPECT_EQ(kTestWidth, info.senders[1].send_frame_width); |
| 604 EXPECT_EQ(kTestHeight, info.senders[1].send_frame_height); | 604 EXPECT_EQ(kTestHeight, info.senders[1].send_frame_height); |
| 605 // The capturer must be unregistered here as it runs out of it's scope next. | 605 // The capturer must be unregistered here as it runs out of it's scope next. |
| 606 EXPECT_TRUE(channel_->SetCapturer(5678, NULL)); | 606 EXPECT_TRUE(channel_->SetCapturer(5678, NULL)); |
| 607 } | 607 } |
| 608 | 608 |
| 609 // Test that we can set the bandwidth. | 609 // Test that we can set the bandwidth. |
| 610 void SetSendBandwidth() { | 610 void SetSendBandwidth() { |
| 611 cricket::VideoSendParameters parameters; | 611 cricket::VideoSendParameters parameters; |
| 612 parameters.codecs.push_back(DefaultCodec()); | 612 parameters.codecs.push_back(DefaultCodec()); |
| 613 parameters.max_bandwidth_bps = -1; // <= 0 means unlimited. | 613 parameters.max_bitrate_bps = rtc::Optional<int>(); // unlimited. |
| 614 EXPECT_TRUE(channel_->SetSendParameters(parameters)); | 614 EXPECT_TRUE(channel_->SetSendParameters(parameters)); |
| 615 parameters.max_bandwidth_bps = 128 * 1024; | 615 parameters.max_bitrate_bps = rtc::Optional<int>(128 * 1024); |
| 616 EXPECT_TRUE(channel_->SetSendParameters(parameters)); | 616 EXPECT_TRUE(channel_->SetSendParameters(parameters)); |
| 617 } | 617 } |
| 618 // Test that we can set the SSRC for the default send source. | 618 // Test that we can set the SSRC for the default send source. |
| 619 void SetSendSsrc() { | 619 void SetSendSsrc() { |
| 620 EXPECT_TRUE(SetDefaultCodec()); | 620 EXPECT_TRUE(SetDefaultCodec()); |
| 621 EXPECT_TRUE(SetSend(true)); | 621 EXPECT_TRUE(SetSend(true)); |
| 622 EXPECT_TRUE(SendFrame()); | 622 EXPECT_TRUE(SendFrame()); |
| 623 EXPECT_TRUE_WAIT(NumRtpPackets() > 0, kTimeout); | 623 EXPECT_TRUE_WAIT(NumRtpPackets() > 0, kTimeout); |
| 624 uint32_t ssrc = 0; | 624 uint32_t ssrc = 0; |
| 625 std::unique_ptr<const rtc::CopyOnWriteBuffer> p(GetRtpPacket(0)); | 625 std::unique_ptr<const rtc::CopyOnWriteBuffer> p(GetRtpPacket(0)); |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 std::unique_ptr<C> channel_; | 1150 std::unique_ptr<C> channel_; |
| 1151 cricket::FakeNetworkInterface network_interface_; | 1151 cricket::FakeNetworkInterface network_interface_; |
| 1152 cricket::FakeVideoRenderer renderer_; | 1152 cricket::FakeVideoRenderer renderer_; |
| 1153 cricket::VideoMediaChannel::Error media_error_; | 1153 cricket::VideoMediaChannel::Error media_error_; |
| 1154 | 1154 |
| 1155 // Used by test cases where 2 streams are run on the same channel. | 1155 // Used by test cases where 2 streams are run on the same channel. |
| 1156 cricket::FakeVideoRenderer renderer2_; | 1156 cricket::FakeVideoRenderer renderer2_; |
| 1157 }; | 1157 }; |
| 1158 | 1158 |
| 1159 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT | 1159 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT |
| OLD | NEW |