diff options
author | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-22 02:51:18 +0000 |
---|---|---|
committer | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-22 02:51:18 +0000 |
commit | 46615311db334a3453bc0f50361816c6baa890ef (patch) | |
tree | ccd6038a3515ae8963b3c600d4b5ebd98f5f5d64 /remoting/host | |
parent | 58edb8fafb311ec4eef33cd156763b2fe9f76dd5 (diff) | |
download | chromium_src-46615311db334a3453bc0f50361816c6baa890ef.zip chromium_src-46615311db334a3453bc0f50361816c6baa890ef.tar.gz chromium_src-46615311db334a3453bc0f50361816c6baa890ef.tar.bz2 |
Add a command-line option to enable VP9 encoding.
This is useful for testing. VP9 is already enabled at the client.
BUG=260879
Review URL: https://codereview.chromium.org/286213006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272050 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host')
-rw-r--r-- | remoting/host/chromoting_host.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc index 4f621c0..ec9be71 100644 --- a/remoting/host/chromoting_host.cc +++ b/remoting/host/chromoting_host.cc @@ -8,6 +8,7 @@ #include "base/bind.h" #include "base/callback.h" +#include "base/command_line.h" #include "base/message_loop/message_loop_proxy.h" #include "build/build_config.h" #include "jingle/glue/thread_wrapper.h" @@ -30,6 +31,8 @@ namespace remoting { namespace { +const char kEnableVp9SwitchName[] = "enable-vp9"; + const net::BackoffEntry::Policy kDefaultBackoffPolicy = { // Number of initial errors (in sequence) to ignore before applying // exponential back-off rules. @@ -89,9 +92,11 @@ ChromotingHost::ChromotingHost( jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop(); - // VP9 encode is not yet supported. - protocol::CandidateSessionConfig::DisableVideoCodec( - protocol_config_.get(), protocol::ChannelConfig::CODEC_VP9); + // Disable VP9 unless it is explicitly enabled via the command-line. + if (!CommandLine::ForCurrentProcess()->HasSwitch(kEnableVp9SwitchName)) { + protocol::CandidateSessionConfig::DisableVideoCodec( + protocol_config_.get(), protocol::ChannelConfig::CODEC_VP9); + } if (!desktop_environment_factory_->SupportsAudioCapture()) { protocol::CandidateSessionConfig::DisableAudioChannel( |