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

Unified Diff: webkit/media/webvideoframe_impl.cc

Issue 12385073: Add interface implementations for WebVideoFrameImpl to give the exact video Format, textureId and t… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 10 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
« webkit/media/webvideoframe_impl.h ('K') | « webkit/media/webvideoframe_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/webvideoframe_impl.cc
diff --git a/webkit/media/webvideoframe_impl.cc b/webkit/media/webvideoframe_impl.cc
index b1c1dc77ecd40cebd41a4d4cb831110a3cdc7994..ae0a9e8ef90ac3e8b7372fd142c02188362eb48b 100644
--- a/webkit/media/webvideoframe_impl.cc
+++ b/webkit/media/webvideoframe_impl.cc
@@ -14,4 +14,21 @@ WebVideoFrameImpl::WebVideoFrameImpl(
WebVideoFrameImpl::~WebVideoFrameImpl() {}
+WebKit::WebVideoFrame::Format WebVideoFrameImpl::format() const
+{
+ // media::VideoFrame::Format is in sync with WebKit::WebVideoFrame::Format
+ return video_frame ?
+ (WebKit::WebVideoFrame::Format)(video_frame->format()) :
+ WebKit::WebVideoFrame::FormatInvalid;
+}
+
+unsigned WebVideoFrameImpl::textureId() const
+{
+ return video_frame ? video_frame->texture_id() : 0;
+}
+
+unsigned WebVideoFrameImpl::textureTarget() const
+{
+ return video_frame ? video_frame->texture_target() : 0;
+}
} // namespace webkit_media
« webkit/media/webvideoframe_impl.h ('K') | « webkit/media/webvideoframe_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698