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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 2749653003: Prototype HTMLVideoElement properties for WebGL texImage2D (Closed)
Patch Set: use VideoFrame Created 3 years, 9 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 | « media/blink/webmediaplayer_impl.h ('k') | third_party/WebKit/Source/core/html/HTMLVideoElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index 813a643f7cf0fc1e93183549f5163e3738b9889f..fb496dff3ce72a7acdd98aa5ec0d7a5794df79de 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -702,6 +702,16 @@ void WebMediaPlayerImpl::selectedVideoTrackChanged(
pipeline_controller_.OnSelectedVideoTrackChanged(selected_video_track_id);
}
+bool WebMediaPlayerImpl::getCurrentFrameInfo(unsigned* width,
+ unsigned* height,
+ double* timestamp) {
+ scoped_refptr<VideoFrame> video_frame = GetCurrentFrameFromCompositor();
Ken Russell (switch to Gerrit) 2017/03/15 04:41:50 As Dale points out, this isn't guaranteed to be co
+ *width = video_frame->natural_size().width();
+ *height = video_frame->natural_size().height();
+ *timestamp = video_frame->timestamp().InSecondsF();
+ return true;
+}
+
blink::WebSize WebMediaPlayerImpl::naturalSize() const {
DCHECK(main_task_runner_->BelongsToCurrentThread());
« no previous file with comments | « media/blink/webmediaplayer_impl.h ('k') | third_party/WebKit/Source/core/html/HTMLVideoElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698