OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #include <algorithm> | 10 #include <algorithm> |
(...skipping 2429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2440 VideoSendStream* send_stream, | 2440 VideoSendStream* send_stream, |
2441 const std::vector<VideoReceiveStream*>& receive_streams) override { | 2441 const std::vector<VideoReceiveStream*>& receive_streams) override { |
2442 send_stream_ = send_stream; | 2442 send_stream_ = send_stream; |
2443 } | 2443 } |
2444 | 2444 |
2445 void ModifyVideoConfigs( | 2445 void ModifyVideoConfigs( |
2446 VideoSendStream::Config* send_config, | 2446 VideoSendStream::Config* send_config, |
2447 std::vector<VideoReceiveStream::Config>* receive_configs, | 2447 std::vector<VideoReceiveStream::Config>* receive_configs, |
2448 VideoEncoderConfig* encoder_config) override { | 2448 VideoEncoderConfig* encoder_config) override { |
2449 send_config->encoder_settings.encoder = this; | 2449 send_config->encoder_settings.encoder = this; |
2450 RTC_DCHECK(encoder_config->streams.size() == 1); | |
pbos-webrtc
2016/06/16 13:16:28
_EQ(1u,
perkj_webrtc
2016/06/16 18:42:18
Done.
| |
2451 // Make sure |max_bitrate| > start bitrate. Otherwise SetRates will not be | |
2452 // called. | |
2453 encoder_config->streams[0].max_bitrate_bps = | |
2454 Call::Config::kDefaultStartBitrateBps * 2; | |
2450 } | 2455 } |
2451 | 2456 |
2452 int32_t SetRates(uint32_t new_target_bitrate, uint32_t framerate) override { | 2457 int32_t SetRates(uint32_t new_target_bitrate, uint32_t framerate) override { |
2453 // Make sure not to trigger on any default zero bitrates. | 2458 // Make sure not to trigger on any default zero bitrates. |
2454 if (new_target_bitrate == 0) | 2459 if (new_target_bitrate == 0) |
2455 return 0; | 2460 return 0; |
2456 rtc::CritScope lock(&crit_); | 2461 rtc::CritScope lock(&crit_); |
2457 bitrate_kbps_ = new_target_bitrate; | 2462 bitrate_kbps_ = new_target_bitrate; |
2458 observation_complete_.Set(); | 2463 observation_complete_.Set(); |
2459 return 0; | 2464 return 0; |
(...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3541 private: | 3546 private: |
3542 bool video_observed_; | 3547 bool video_observed_; |
3543 bool audio_observed_; | 3548 bool audio_observed_; |
3544 SequenceNumberUnwrapper unwrapper_; | 3549 SequenceNumberUnwrapper unwrapper_; |
3545 std::set<int64_t> received_packet_ids_; | 3550 std::set<int64_t> received_packet_ids_; |
3546 } test; | 3551 } test; |
3547 | 3552 |
3548 RunBaseTest(&test); | 3553 RunBaseTest(&test); |
3549 } | 3554 } |
3550 } // namespace webrtc | 3555 } // namespace webrtc |
OLD | NEW |