Index: media/blink/webmediaplayer_impl.cc |
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc |
index 813a643f7cf0fc1e93183549f5163e3738b9889f..6629799ab48844fefdee3438e42499020ef987d4 100644 |
--- a/media/blink/webmediaplayer_impl.cc |
+++ b/media/blink/webmediaplayer_impl.cc |
@@ -702,6 +702,15 @@ void WebMediaPlayerImpl::selectedVideoTrackChanged( |
pipeline_controller_.OnSelectedVideoTrackChanged(selected_video_track_id); |
} |
+bool WebMediaPlayerImpl::getLastUploadedFrameInfo(unsigned* width, |
+ unsigned* height, |
+ double* timestamp) { |
+ *width = last_uploaded_frame_size_.width(); |
+ *height = last_uploaded_frame_size_.height(); |
+ *timestamp = last_uploaded_frame_timestamp_.InSecondsF(); |
+ return true; |
+} |
+ |
blink::WebSize WebMediaPlayerImpl::naturalSize() const { |
DCHECK(main_task_runner_->BelongsToCurrentThread()); |
@@ -1841,6 +1850,9 @@ scoped_refptr<VideoFrame> WebMediaPlayerImpl::GetCurrentFrameFromCompositor() { |
base::Bind(&GetCurrentFrameAndSignal, base::Unretained(compositor_), |
&video_frame, &event)); |
event.Wait(); |
+ |
+ last_uploaded_frame_size_ = video_frame->natural_size(); |
+ last_uploaded_frame_timestamp_ = video_frame->timestamp(); |
return video_frame; |
} |