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 1941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1952 bool SetRemoteContentWithBitrateLimit(int remote_limit) { | 1952 bool SetRemoteContentWithBitrateLimit(int remote_limit) { |
1953 typename T::Content content; | 1953 typename T::Content content; |
1954 CreateContent(0, kPcmuCodec, kH264Codec, &content); | 1954 CreateContent(0, kPcmuCodec, kH264Codec, &content); |
1955 content.set_bandwidth(remote_limit); | 1955 content.set_bandwidth(remote_limit); |
1956 return channel1_->SetRemoteContent(&content, CA_OFFER, NULL); | 1956 return channel1_->SetRemoteContent(&content, CA_OFFER, NULL); |
1957 } | 1957 } |
1958 | 1958 |
1959 webrtc::RtpParameters BitrateLimitedParameters(int limit) { | 1959 webrtc::RtpParameters BitrateLimitedParameters(int limit) { |
1960 webrtc::RtpParameters parameters; | 1960 webrtc::RtpParameters parameters; |
1961 webrtc::RtpEncodingParameters encoding; | 1961 webrtc::RtpEncodingParameters encoding; |
1962 encoding.max_bitrate_bps = limit; | 1962 encoding.max_bitrate_bps = rtc::Optional<int>(limit); |
1963 parameters.encodings.push_back(encoding); | 1963 parameters.encodings.push_back(encoding); |
1964 return parameters; | 1964 return parameters; |
1965 } | 1965 } |
1966 | 1966 |
1967 void VerifyMaxBitrate(const webrtc::RtpParameters& parameters, | 1967 void VerifyMaxBitrate(const webrtc::RtpParameters& parameters, |
1968 int expected_bitrate) { | 1968 int expected_bitrate) { |
1969 EXPECT_EQ(1UL, parameters.encodings.size()); | 1969 EXPECT_EQ(1UL, parameters.encodings.size()); |
1970 EXPECT_EQ(expected_bitrate, parameters.encodings[0].max_bitrate_bps); | 1970 EXPECT_EQ(expected_bitrate, parameters.encodings[0].max_bitrate_bps); |
1971 } | 1971 } |
1972 | 1972 |
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3774 ASSERT_TRUE(voice_channel_.Init_w(nullptr, nullptr, &fake_rtp_dtls_transport_, | 3774 ASSERT_TRUE(voice_channel_.Init_w(nullptr, nullptr, &fake_rtp_dtls_transport_, |
3775 &fake_rtcp_dtls_transport_)); | 3775 &fake_rtcp_dtls_transport_)); |
3776 EXPECT_DEATH(voice_channel_.SetTransports(&fake_rtp_dtls_transport_, | 3776 EXPECT_DEATH(voice_channel_.SetTransports(&fake_rtp_dtls_transport_, |
3777 &fake_rtp_dtls_transport_), | 3777 &fake_rtp_dtls_transport_), |
3778 ""); | 3778 ""); |
3779 } | 3779 } |
3780 | 3780 |
3781 #endif // RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) | 3781 #endif // RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) |
3782 | 3782 |
3783 // TODO(pthatcher): TestSetReceiver? | 3783 // TODO(pthatcher): TestSetReceiver? |
OLD | NEW |