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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host.cc
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index c2f8f974b460d13fac0cc8cc4f266e62b90bfb5a..1d209694ba71613cb8df338d8c0a37b077093172 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -81,6 +81,16 @@ ChromotingHost::ChromotingHost(
DCHECK(signal_strategy);
DCHECK(desktop_environment_);
DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
+
+ if (!desktop_environment_->audio_capturer()) {
+ // Disable audio by replacing our list of supported audio configurations
+ // with the NONE config.
+ protocol_config_->mutable_audio_configs()->clear();
+ protocol_config_->mutable_audio_configs()->push_back(
+ protocol::ChannelConfig(protocol::ChannelConfig::TRANSPORT_NONE,
+ protocol::kDefaultStreamVersion,
+ protocol::ChannelConfig::CODEC_VERBATIM));
+ }
}
ChromotingHost::~ChromotingHost() {
« 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