| 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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 // Don't start the VideoScheduler if either capturer or encoder are missing. | 465 // Don't start the VideoScheduler if either capturer or encoder are missing. |
| 466 if (!video_capturer || !video_encoder) | 466 if (!video_capturer || !video_encoder) |
| 467 return; | 467 return; |
| 468 | 468 |
| 469 // Create a VideoScheduler to pump frames from the capturer to the client. | 469 // Create a VideoScheduler to pump frames from the capturer to the client. |
| 470 video_scheduler_ = new VideoScheduler( | 470 video_scheduler_ = new VideoScheduler( |
| 471 video_capture_task_runner_, | 471 video_capture_task_runner_, |
| 472 video_encode_task_runner_, | 472 video_encode_task_runner_, |
| 473 network_task_runner_, | 473 network_task_runner_, |
| 474 video_capturer.Pass(), | 474 video_capturer.Pass(), |
| 475 desktop_environment_->CreateMouseCursorMonitor(), |
| 475 video_encoder.Pass(), | 476 video_encoder.Pass(), |
| 476 connection_->client_stub(), | 477 connection_->client_stub(), |
| 477 &mouse_clamping_filter_); | 478 &mouse_clamping_filter_); |
| 478 | 479 |
| 479 // Apply video-control parameters to the new scheduler. | 480 // Apply video-control parameters to the new scheduler. |
| 480 video_scheduler_->Pause(pause_video_); | 481 video_scheduler_->Pause(pause_video_); |
| 481 video_scheduler_->SetLosslessEncode(lossless_video_encode_); | 482 video_scheduler_->SetLosslessEncode(lossless_video_encode_); |
| 482 video_scheduler_->SetLosslessColor(lossless_video_color_); | 483 video_scheduler_->SetLosslessColor(lossless_video_color_); |
| 483 | 484 |
| 484 // Start capturing the screen. | 485 // Start capturing the screen. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 return scoped_ptr<AudioEncoder>(new AudioEncoderVerbatim()); | 528 return scoped_ptr<AudioEncoder>(new AudioEncoderVerbatim()); |
| 528 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) { | 529 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) { |
| 529 return scoped_ptr<AudioEncoder>(new AudioEncoderOpus()); | 530 return scoped_ptr<AudioEncoder>(new AudioEncoderOpus()); |
| 530 } | 531 } |
| 531 | 532 |
| 532 NOTREACHED(); | 533 NOTREACHED(); |
| 533 return scoped_ptr<AudioEncoder>(); | 534 return scoped_ptr<AudioEncoder>(); |
| 534 } | 535 } |
| 535 | 536 |
| 536 } // namespace remoting | 537 } // namespace remoting |
| OLD | NEW |