Chromium Code Reviews| 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); |
| } |