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

Unified Diff: remoting/host/video_scheduler.cc

Issue 304653002: Extend VideoControl to allow clients to request lossless modes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments 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 | « remoting/host/video_scheduler.h ('k') | remoting/proto/control.proto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/video_scheduler.cc
diff --git a/remoting/host/video_scheduler.cc b/remoting/host/video_scheduler.cc
index 34f1a72ae227591ec9d6178835f3a618879a9596..6aee268266dbfd685e9cbd1704a17544e841dee9 100644
--- a/remoting/host/video_scheduler.cc
+++ b/remoting/host/video_scheduler.cc
@@ -165,6 +165,30 @@ void VideoScheduler::UpdateSequenceNumber(int64 sequence_number) {
sequence_number_ = sequence_number;
}
+void VideoScheduler::SetLosslessEncode(bool want_lossless) {
+ if (!encode_task_runner_->BelongsToCurrentThread()) {
+ DCHECK(network_task_runner_->BelongsToCurrentThread());
+ encode_task_runner_->PostTask(
+ FROM_HERE, base::Bind(&VideoScheduler::SetLosslessEncode,
+ this, want_lossless));
+ return;
+ }
+
+ encoder_->SetLosslessEncode(want_lossless);
+}
+
+void VideoScheduler::SetLosslessColor(bool want_lossless) {
+ if (!encode_task_runner_->BelongsToCurrentThread()) {
+ DCHECK(network_task_runner_->BelongsToCurrentThread());
+ encode_task_runner_->PostTask(
+ FROM_HERE, base::Bind(&VideoScheduler::SetLosslessColor,
+ this, want_lossless));
+ return;
+ }
+
+ encoder_->SetLosslessColor(want_lossless);
+}
+
// Private methods -----------------------------------------------------------
VideoScheduler::~VideoScheduler() {
« no previous file with comments | « remoting/host/video_scheduler.h ('k') | remoting/proto/control.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698