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

Unified Diff: remoting/host/client_session.cc

Issue 304653002: Extend VideoControl to allow clients to request lossless modes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add tests 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
Index: remoting/host/client_session.cc
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
index 8bb106f9e8d807794ae927c60785a76bac551b3f..2db968e5c09d3de27fd93bfd8edb5c612d4ef2ff 100644
--- a/remoting/host/client_session.cc
+++ b/remoting/host/client_session.cc
@@ -6,7 +6,6 @@
#include <algorithm>
-#include "base/command_line.h"
#include "base/message_loop/message_loop_proxy.h"
#include "remoting/base/capabilities.h"
#include "remoting/base/logging.h"
@@ -33,8 +32,6 @@
// Default DPI to assume for old clients that use notifyClientDimensions.
const int kDefaultDPI = 96;
-const char kEnableI444SwitchName[] = "enable-i444";
-
namespace remoting {
ClientSession::ClientSession(
@@ -136,6 +133,16 @@ void ClientSession::ControlVideo(const protocol::VideoControl& video_control) {
<< video_control.enable() << ")";
video_scheduler_->Pause(!video_control.enable());
}
+ if (video_control.has_lossless_encode()) {
+ VLOG(1) << "Received VideoControl (lossless_encode="
+ << video_control.lossless_encode() << ")";
+ video_scheduler_->SetLosslessEncode(video_control.lossless_encode());
+ }
+ if (video_control.has_lossless_color()) {
+ VLOG(1) << "Received VideoControl (lossless_color="
+ << video_control.lossless_color() << ")";
+ video_scheduler_->SetLosslessColor(video_control.lossless_color());
+ }
}
void ClientSession::ControlAudio(const protocol::AudioControl& audio_control) {
@@ -453,12 +460,7 @@ scoped_ptr<VideoEncoder> ClientSession::CreateVideoEncoder(
if (video_config.codec == protocol::ChannelConfig::CODEC_VP8) {
return remoting::VideoEncoderVpx::CreateForVP8().PassAs<VideoEncoder>();
} else if (video_config.codec == protocol::ChannelConfig::CODEC_VP9) {
- // Use I444 colour space if specified on the command-line.
- if (CommandLine::ForCurrentProcess()->HasSwitch(kEnableI444SwitchName)) {
- return
- remoting::VideoEncoderVpx::CreateForVP9I444().PassAs<VideoEncoder>();
- }
- return remoting::VideoEncoderVpx::CreateForVP9I420().PassAs<VideoEncoder>();
+ return remoting::VideoEncoderVpx::CreateForVP9().PassAs<VideoEncoder>();
}
NOTREACHED();

Powered by Google App Engine
This is Rietveld 408576698