| 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 if (!call_) { | 56 if (!call_) { |
| 57 call_.reset(webrtc::Call::Create(call_config_)); | 57 call_.reset(webrtc::Call::Create(call_config_)); |
| 58 } | 58 } |
| 59 return call_.get(); | 59 return call_.get(); |
| 60 } | 60 } |
| 61 cricket::ChannelManager* channel_manager() const override { | 61 cricket::ChannelManager* channel_manager() const override { |
| 62 return channel_manager_; | 62 return channel_manager_; |
| 63 } | 63 } |
| 64 const cricket::MediaConfig& config() const override { return media_config_; } | 64 const cricket::MediaConfig& config() const override { return media_config_; } |
| 65 | 65 |
| 66 // Call's SetVideoReceiveRtpHeaderExtensions can be called on any thread, |
| 67 // but we need to go via worker_thread_ to access the call_ pointer. |
| 68 void SetVideoReceiveRtpHeaderExtensions( |
| 69 const std::vector<webrtc::RtpExtension>& extensions) override { |
| 70 if (!worker_thread_->IsCurrent()) { |
| 71 worker_thread_->Invoke<void>( |
| 72 RTC_FROM_HERE, |
| 73 rtc::Bind(&MediaController::SetVideoReceiveRtpHeaderExtensions, |
| 74 this, extensions)); |
| 75 return; |
| 76 } |
| 77 call_w()->SetVideoReceiveRtpHeaderExtensions(extensions); |
| 78 } |
| 79 |
| 66 private: | 80 private: |
| 67 void Construct_w(cricket::MediaEngineInterface* media_engine) { | 81 void Construct_w(cricket::MediaEngineInterface* media_engine) { |
| 68 RTC_DCHECK(worker_thread_->IsCurrent()); | 82 RTC_DCHECK(worker_thread_->IsCurrent()); |
| 69 RTC_DCHECK(media_engine); | 83 RTC_DCHECK(media_engine); |
| 70 call_config_.audio_state = media_engine->GetAudioState(); | 84 call_config_.audio_state = media_engine->GetAudioState(); |
| 71 call_config_.bitrate_config.min_bitrate_bps = kMinBandwidthBps; | 85 call_config_.bitrate_config.min_bitrate_bps = kMinBandwidthBps; |
| 72 call_config_.bitrate_config.start_bitrate_bps = kStartBandwidthBps; | 86 call_config_.bitrate_config.start_bitrate_bps = kStartBandwidthBps; |
| 73 call_config_.bitrate_config.max_bitrate_bps = kMaxBandwidthBps; | 87 call_config_.bitrate_config.max_bitrate_bps = kMaxBandwidthBps; |
| 74 } | 88 } |
| 75 void Close_w() { | 89 void Close_w() { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 90 namespace webrtc { | 104 namespace webrtc { |
| 91 | 105 |
| 92 MediaControllerInterface* MediaControllerInterface::Create( | 106 MediaControllerInterface* MediaControllerInterface::Create( |
| 93 const cricket::MediaConfig& config, | 107 const cricket::MediaConfig& config, |
| 94 rtc::Thread* worker_thread, | 108 rtc::Thread* worker_thread, |
| 95 cricket::ChannelManager* channel_manager, | 109 cricket::ChannelManager* channel_manager, |
| 96 webrtc::RtcEventLog* event_log) { | 110 webrtc::RtcEventLog* event_log) { |
| 97 return new MediaController(config, worker_thread, channel_manager, event_log); | 111 return new MediaController(config, worker_thread, channel_manager, event_log); |
| 98 } | 112 } |
| 99 } // namespace webrtc | 113 } // namespace webrtc |
| OLD | NEW |