From 91cb22a518b6807b1597a8aa5e055e7a0d2e6c61 Mon Sep 17 00:00:00 2001 From: "sergeyu@chromium.org" Date: Sat, 18 Aug 2012 05:25:40 +0000 Subject: 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 --- remoting/host/chromoting_host.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'remoting/host/chromoting_host.cc') 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() { -- cgit v1.1