summaryrefslogtreecommitdiffstats
path: root/remoting/host/chromoting_host.cc
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-18 05:25:40 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-18 05:25:40 +0000
commit91cb22a518b6807b1597a8aa5e055e7a0d2e6c61 (patch)
tree7210b9bf25635054bbd091948c2efcaa1dbcbb9a /remoting/host/chromoting_host.cc
parentfd2fafc53bac7f40f5a2298896dc7bf5d1046d81 (diff)
downloadchromium_src-91cb22a518b6807b1597a8aa5e055e7a0d2e6c61.zip
chromium_src-91cb22a518b6807b1597a8aa5e055e7a0d2e6c61.tar.gz
chromium_src-91cb22a518b6807b1597a8aa5e055e7a0d2e6c61.tar.bz2
Disable audio when audio capturer is not available on the host platform.
Currently audio channel is created even when the host doesn't have a capturer. This causes a DCHECK in the audio scheduler. Review URL: https://chromiumcodereview.appspot.com/10831379 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152245 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/chromoting_host.cc')
-rw-r--r--remoting/host/chromoting_host.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index c2f8f97..1d20969 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() {