OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/it2me/it2me_host.h" | 5 #include "remoting/host/it2me/it2me_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
10 #include "base/threading/platform_thread.h" | 10 #include "base/threading/platform_thread.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 host_context_->ui_task_runner())); | 205 host_context_->ui_task_runner())); |
206 host_->AddStatusObserver(this); | 206 host_->AddStatusObserver(this); |
207 log_to_server_.reset( | 207 log_to_server_.reset( |
208 new LogToServer(host_->AsWeakPtr(), ServerLogEntry::IT2ME, | 208 new LogToServer(host_->AsWeakPtr(), ServerLogEntry::IT2ME, |
209 signal_strategy_.get(), directory_bot_jid_)); | 209 signal_strategy_.get(), directory_bot_jid_)); |
210 | 210 |
211 // Disable audio by default. | 211 // Disable audio by default. |
212 // TODO(sergeyu): Add UI to enable it. | 212 // TODO(sergeyu): Add UI to enable it. |
213 scoped_ptr<protocol::CandidateSessionConfig> protocol_config = | 213 scoped_ptr<protocol::CandidateSessionConfig> protocol_config = |
214 protocol::CandidateSessionConfig::CreateDefault(); | 214 protocol::CandidateSessionConfig::CreateDefault(); |
215 protocol::CandidateSessionConfig::DisableAudioChannel(protocol_config.get()); | 215 protocol_config->DisableAudioChannel(); |
216 | |
217 // VP9 encode is not yet supported. | |
218 protocol::CandidateSessionConfig::DisableVideoCodec( | |
219 protocol_config.get(), protocol::ChannelConfig::CODEC_VP9); | |
220 | 216 |
221 host_->set_protocol_config(protocol_config.Pass()); | 217 host_->set_protocol_config(protocol_config.Pass()); |
222 | 218 |
223 // Create event logger. | 219 // Create event logger. |
224 host_event_logger_ = | 220 host_event_logger_ = |
225 HostEventLogger::Create(host_->AsWeakPtr(), kApplicationName); | 221 HostEventLogger::Create(host_->AsWeakPtr(), kApplicationName); |
226 | 222 |
227 // Connect signaling and start the host. | 223 // Connect signaling and start the host. |
228 signal_strategy_->Connect(); | 224 signal_strategy_->Connect(); |
229 host_->Start(xmpp_server_config_.username); | 225 host_->Start(xmpp_server_config_.username); |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 ChromotingHostContext* context, | 465 ChromotingHostContext* context, |
470 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 466 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
471 base::WeakPtr<It2MeHost::Observer> observer, | 467 base::WeakPtr<It2MeHost::Observer> observer, |
472 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, | 468 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, |
473 const std::string& directory_bot_jid) { | 469 const std::string& directory_bot_jid) { |
474 return new It2MeHost( | 470 return new It2MeHost( |
475 context, task_runner, observer, xmpp_server_config, directory_bot_jid); | 471 context, task_runner, observer, xmpp_server_config, directory_bot_jid); |
476 } | 472 } |
477 | 473 |
478 } // namespace remoting | 474 } // namespace remoting |
OLD | NEW |