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

Unified Diff: content/browser/media/capture/web_contents_video_capture_device.cc

Issue 1484403002: cast: Support for low-latency interactive mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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: content/browser/media/capture/web_contents_video_capture_device.cc
diff --git a/content/browser/media/capture/web_contents_video_capture_device.cc b/content/browser/media/capture/web_contents_video_capture_device.cc
index 3a432d856c068ed7f638913321e573c37922f0ea..c1b357f90e58057db5eae6667e67520857559efd 100644
--- a/content/browser/media/capture/web_contents_video_capture_device.cc
+++ b/content/browser/media/capture/web_contents_video_capture_device.cc
@@ -77,6 +77,7 @@
#include "content/public/browser/web_contents.h"
#include "media/base/bind_to_current_loop.h"
#include "media/base/video_capture_types.h"
+#include "media/base/video_frame_metadata.h"
#include "media/base/video_util.h"
#include "media/capture/content/screen_capture_device_core.h"
#include "media/capture/content/thread_safe_capture_oracle.h"
@@ -361,14 +362,23 @@ void FrameSubscriber::DidCaptureFrame(
// on success.
if (success) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ bool ui_event_detected = false;
+ bool animation_content = true;
// TODO(isheriff): Unclear if taking a snapshot of cursor here affects user
// experience in any particular scenarios. Doing it prior to capture may
// require evaluating region_in_frame in this file.
if (frame_subscriber_ && frame_subscriber_->cursor_renderer_) {
- if (frame_subscriber_->cursor_renderer_->SnapshotCursorState(
- region_in_frame))
- frame_subscriber_->cursor_renderer_->RenderOnVideoFrame(frame);
+ CursorRenderer* cursor_renderer =
+ frame_subscriber_->cursor_renderer_.get();
+ if (cursor_renderer->SnapshotCursorState(region_in_frame))
+ cursor_renderer->RenderOnVideoFrame(frame);
+ ui_event_detected = cursor_renderer->ui_event_detected();
+ animation_content = frame_subscriber_->oracle_proxy_->IsAnimationActive();
}
+ frame->metadata()->SetBoolean(media::VideoFrameMetadata::ANIMATION_CONTENT,
miu 2015/12/01 21:15:27 In-line with other comments (video_sender.cc), I t
Irfan 2015/12/02 22:32:44 As discussed will look at moving to a single boole
+ animation_content);
+ frame->metadata()->SetBoolean(media::VideoFrameMetadata::USER_INTERACTION,
+ ui_event_detected);
}
capture_frame_cb.Run(frame, timestamp, success);
}

Powered by Google App Engine
This is Rietveld 408576698