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

Unified Diff: remoting/host/chromoting_host.cc

Issue 286213006: Add a command-line option to enable VP9 encoding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comment Created 6 years, 7 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 469c5b2849f824a9c2235a1fa705baddafe028b0..35e8800562dc0a349306e17d5ea5b9e890593895 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 "remoting/base/constants.h"
@@ -29,6 +30,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.
@@ -86,9 +89,11 @@ ChromotingHost::ChromotingHost(
DCHECK(network_task_runner_->BelongsToCurrentThread());
DCHECK(signal_strategy);
- // 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(
« 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