Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 } | 56 } |
| 57 const cricket::MediaConfig& config() const override { return media_config_; } | 57 const cricket::MediaConfig& config() const override { return media_config_; } |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 void Construct_w(cricket::MediaEngineInterface* media_engine) { | 60 void Construct_w(cricket::MediaEngineInterface* media_engine) { |
| 61 RTC_DCHECK(worker_thread_->IsCurrent()); | 61 RTC_DCHECK(worker_thread_->IsCurrent()); |
| 62 RTC_DCHECK(media_engine); | 62 RTC_DCHECK(media_engine); |
| 63 call_config_.audio_state = media_engine->GetAudioState(); | 63 call_config_.audio_state = media_engine->GetAudioState(); |
| 64 call_config_.bitrate_config.min_bitrate_bps = kMinBandwidthBps; | 64 call_config_.bitrate_config.min_bitrate_bps = kMinBandwidthBps; |
| 65 call_config_.bitrate_config.start_bitrate_bps = kStartBandwidthBps; | 65 call_config_.bitrate_config.start_bitrate_bps = kStartBandwidthBps; |
| 66 call_config_.bitrate_config.max_bitrate_bps = kMaxBandwidthBps; | 66 call_config_.bitrate_config.max_bitrate_bps = |
| 67 rtc::Optional<int>(kMaxBandwidthBps); | |
| 67 } | 68 } |
|
pthatcher1
2016/03/17 21:51:28
Can this be unset?
If not, why have it be optiona
skvlad
2016/03/18 00:49:17
This value will become unset if a video stream is
| |
| 68 void Close_w() { | 69 void Close_w() { |
| 69 RTC_DCHECK(worker_thread_->IsCurrent()); | 70 RTC_DCHECK(worker_thread_->IsCurrent()); |
| 70 call_.reset(); | 71 call_.reset(); |
| 71 } | 72 } |
| 72 | 73 |
| 73 rtc::Thread* const worker_thread_; | 74 rtc::Thread* const worker_thread_; |
| 74 const cricket::MediaConfig media_config_; | 75 const cricket::MediaConfig media_config_; |
| 75 cricket::ChannelManager* const channel_manager_; | 76 cricket::ChannelManager* const channel_manager_; |
| 76 webrtc::Call::Config call_config_; | 77 webrtc::Call::Config call_config_; |
| 77 rtc::scoped_ptr<webrtc::Call> call_; | 78 rtc::scoped_ptr<webrtc::Call> call_; |
| 78 | 79 |
| 79 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MediaController); | 80 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(MediaController); |
| 80 }; | 81 }; |
| 81 } // namespace { | 82 } // namespace { |
| 82 | 83 |
| 83 namespace webrtc { | 84 namespace webrtc { |
| 84 | 85 |
| 85 MediaControllerInterface* MediaControllerInterface::Create( | 86 MediaControllerInterface* MediaControllerInterface::Create( |
| 86 const cricket::MediaConfig& config, | 87 const cricket::MediaConfig& config, |
| 87 rtc::Thread* worker_thread, | 88 rtc::Thread* worker_thread, |
| 88 cricket::ChannelManager* channel_manager) { | 89 cricket::ChannelManager* channel_manager) { |
| 89 return new MediaController(config, worker_thread, channel_manager); | 90 return new MediaController(config, worker_thread, channel_manager); |
| 90 } | 91 } |
| 91 } // namespace webrtc | 92 } // namespace webrtc |
| OLD | NEW |