OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/host/client_session.h" | 5 #include "remoting/host/client_session.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
10 #include "remoting/base/capabilities.h" | 10 #include "remoting/base/capabilities.h" |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 // Create a VideoEncoder based on the session's video channel configuration. | 266 // Create a VideoEncoder based on the session's video channel configuration. |
267 scoped_ptr<VideoEncoder> video_encoder = | 267 scoped_ptr<VideoEncoder> video_encoder = |
268 CreateVideoEncoder(connection_->session()->config()); | 268 CreateVideoEncoder(connection_->session()->config()); |
269 | 269 |
270 // Create a VideoScheduler to pump frames from the capturer to the client. | 270 // Create a VideoScheduler to pump frames from the capturer to the client. |
271 video_scheduler_ = new VideoScheduler( | 271 video_scheduler_ = new VideoScheduler( |
272 video_capture_task_runner_, | 272 video_capture_task_runner_, |
273 video_encode_task_runner_, | 273 video_encode_task_runner_, |
274 network_task_runner_, | 274 network_task_runner_, |
275 desktop_environment_->CreateVideoCapturer(), | 275 desktop_environment_->CreateVideoCapturer(), |
276 desktop_environment_->CreateMouseCursorMonitor(), | |
277 video_encoder.Pass(), | 276 video_encoder.Pass(), |
278 connection_->client_stub(), | 277 connection_->client_stub(), |
279 &mouse_clamping_filter_); | 278 &mouse_clamping_filter_); |
280 | 279 |
281 // Create an AudioScheduler if audio is enabled, to pump audio samples. | 280 // Create an AudioScheduler if audio is enabled, to pump audio samples. |
282 if (connection_->session()->config().is_audio_enabled()) { | 281 if (connection_->session()->config().is_audio_enabled()) { |
283 scoped_ptr<AudioEncoder> audio_encoder = | 282 scoped_ptr<AudioEncoder> audio_encoder = |
284 CreateAudioEncoder(connection_->session()->config()); | 283 CreateAudioEncoder(connection_->session()->config()); |
285 audio_scheduler_ = new AudioScheduler( | 284 audio_scheduler_ = new AudioScheduler( |
286 audio_task_runner_, | 285 audio_task_runner_, |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 return scoped_ptr<AudioEncoder>(new AudioEncoderVerbatim()); | 444 return scoped_ptr<AudioEncoder>(new AudioEncoderVerbatim()); |
446 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) { | 445 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) { |
447 return scoped_ptr<AudioEncoder>(new AudioEncoderOpus()); | 446 return scoped_ptr<AudioEncoder>(new AudioEncoderOpus()); |
448 } | 447 } |
449 | 448 |
450 NOTREACHED(); | 449 NOTREACHED(); |
451 return scoped_ptr<AudioEncoder>(); | 450 return scoped_ptr<AudioEncoder>(); |
452 } | 451 } |
453 | 452 |
454 } // namespace remoting | 453 } // namespace remoting |
OLD | NEW |