Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(686)

Side by Side Diff: remoting/host/chromoting_host.cc

Issue 10831379: Disable audio when audio capturer is not available on the host platform. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/chromoting_host.h" 5 #include "remoting/host/chromoting_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 stopping_recorders_(0), 74 stopping_recorders_(0),
75 state_(kInitial), 75 state_(kInitial),
76 protocol_config_(protocol::CandidateSessionConfig::CreateDefault()), 76 protocol_config_(protocol::CandidateSessionConfig::CreateDefault()),
77 login_backoff_(&kDefaultBackoffPolicy), 77 login_backoff_(&kDefaultBackoffPolicy),
78 authenticating_client_(false), 78 authenticating_client_(false),
79 reject_authenticating_client_(false) { 79 reject_authenticating_client_(false) {
80 DCHECK(context_); 80 DCHECK(context_);
81 DCHECK(signal_strategy); 81 DCHECK(signal_strategy);
82 DCHECK(desktop_environment_); 82 DCHECK(desktop_environment_);
83 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); 83 DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
84
85 if (!desktop_environment_->audio_capturer()) {
86 // Disable audio by setting NONE channel config for the audio channel when
87 // we don't have audio capturer.
Wez 2012/08/18 00:51:09 nit: "Disable audio by replacing our list of suppo
Sergey Ulanov 2012/08/18 01:43:14 Done.
88 protocol_config_->mutable_audio_configs()->clear();
89 protocol_config_->mutable_audio_configs()->push_back(
90 protocol::ChannelConfig(protocol::ChannelConfig::TRANSPORT_NONE,
91 protocol::kDefaultStreamVersion,
92 protocol::ChannelConfig::CODEC_VERBATIM));
93 }
84 } 94 }
85 95
86 ChromotingHost::~ChromotingHost() { 96 ChromotingHost::~ChromotingHost() {
87 DCHECK(clients_.empty()); 97 DCHECK(clients_.empty());
88 } 98 }
89 99
90 void ChromotingHost::Start() { 100 void ChromotingHost::Start() {
91 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); 101 DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
92 102
93 LOG(INFO) << "Starting host"; 103 LOG(INFO) << "Starting host";
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 OnShutdown()); 498 OnShutdown());
489 499
490 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); 500 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin();
491 it != shutdown_tasks_.end(); ++it) { 501 it != shutdown_tasks_.end(); ++it) {
492 it->Run(); 502 it->Run();
493 } 503 }
494 shutdown_tasks_.clear(); 504 shutdown_tasks_.clear();
495 } 505 }
496 506
497 } // namespace remoting 507 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698