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/client/chromoting_client.h" | 5 #include "remoting/client/chromoting_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "remoting/base/capabilities.h" | 8 #include "remoting/base/capabilities.h" |
9 #include "remoting/client/audio_decode_scheduler.h" | 9 #include "remoting/client/audio_decode_scheduler.h" |
10 #include "remoting/client/audio_player.h" | 10 #include "remoting/client/audio_player.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 : config_(config), | 34 : config_(config), |
35 task_runner_(client_context->main_task_runner()), | 35 task_runner_(client_context->main_task_runner()), |
36 connection_(connection), | 36 connection_(connection), |
37 user_interface_(user_interface), | 37 user_interface_(user_interface), |
38 host_capabilities_received_(false), | 38 host_capabilities_received_(false), |
39 weak_factory_(this) { | 39 weak_factory_(this) { |
40 rectangle_decoder_ = | 40 rectangle_decoder_ = |
41 new RectangleUpdateDecoder(client_context->main_task_runner(), | 41 new RectangleUpdateDecoder(client_context->main_task_runner(), |
42 client_context->decode_task_runner(), | 42 client_context->decode_task_runner(), |
43 frame_consumer); | 43 frame_consumer); |
44 audio_decode_scheduler_.reset(new AudioDecodeScheduler( | 44 if (audio_player) { |
45 client_context->main_task_runner(), | 45 audio_decode_scheduler_.reset(new AudioDecodeScheduler( |
46 client_context->audio_decode_task_runner(), | 46 client_context->main_task_runner(), |
47 audio_player.Pass())); | 47 client_context->audio_decode_task_runner(), |
| 48 audio_player.Pass())); |
| 49 } |
48 } | 50 } |
49 | 51 |
50 ChromotingClient::~ChromotingClient() { | 52 ChromotingClient::~ChromotingClient() { |
51 } | 53 } |
52 | 54 |
53 void ChromotingClient::Start( | 55 void ChromotingClient::Start( |
54 SignalStrategy* signal_strategy, | 56 SignalStrategy* signal_strategy, |
55 scoped_ptr<protocol::TransportFactory> transport_factory) { | 57 scoped_ptr<protocol::TransportFactory> transport_factory) { |
56 DCHECK(task_runner_->BelongsToCurrentThread()); | 58 DCHECK(task_runner_->BelongsToCurrentThread()); |
57 | 59 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 if (connection_->config().SupportsCapabilities()) { | 177 if (connection_->config().SupportsCapabilities()) { |
176 VLOG(1) << "Client capabilities: " << config_.capabilities; | 178 VLOG(1) << "Client capabilities: " << config_.capabilities; |
177 | 179 |
178 protocol::Capabilities capabilities; | 180 protocol::Capabilities capabilities; |
179 capabilities.set_capabilities(config_.capabilities); | 181 capabilities.set_capabilities(config_.capabilities); |
180 connection_->host_stub()->SetCapabilities(capabilities); | 182 connection_->host_stub()->SetCapabilities(capabilities); |
181 } | 183 } |
182 } | 184 } |
183 | 185 |
184 } // namespace remoting | 186 } // namespace remoting |
OLD | NEW |