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

Unified Diff: webkit/media/webvideoframe_impl.cc

Issue 11269017: Plumb through cropped output size for VideoFrame (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Found the windows failure, and fixed it. Thanks akalin@ Created 8 years, 1 month 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 | « webkit/media/webvideoframe_impl.h ('k') | webkit/plugins/ppapi/content_decryptor_delegate.cc » ('j') | 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 6d26ac6dc31383a747617bd4e2a33269d3465cb8..16e04faf74b272a01c15f6ad5f8205324035a6c4 100644
--- a/webkit/media/webvideoframe_impl.cc
+++ b/webkit/media/webvideoframe_impl.cc
@@ -37,18 +37,6 @@ WebVideoFrame::Format WebVideoFrameImpl::format() const {
return WebVideoFrame::FormatInvalid;
}
-unsigned WebVideoFrameImpl::width() const {
- if (video_frame_.get())
- return video_frame_->data_size().width();
- return 0;
-}
-
-unsigned WebVideoFrameImpl::height() const {
- if (video_frame_.get())
- return video_frame_->data_size().height();
- return 0;
-}
-
unsigned WebVideoFrameImpl::planes() const {
if (!video_frame_.get())
return 0;
@@ -69,12 +57,6 @@ unsigned WebVideoFrameImpl::planes() const {
return 0;
}
-int WebVideoFrameImpl::stride(unsigned plane) const {
- if (video_frame_.get())
- return static_cast<int>(video_frame_->stride(plane));
- return 0;
-}
-
const void* WebVideoFrameImpl::data(unsigned plane) const {
if (!video_frame_.get() || format() == FormatNativeTexture)
return NULL;
@@ -93,4 +75,16 @@ unsigned WebVideoFrameImpl::textureTarget() const {
return video_frame_->texture_target();
}
+WebKit::WebRect WebVideoFrameImpl::visibleRect() const {
+ if (!video_frame_.get())
+ return WebKit::WebRect(0, 0, 0, 0);
+ return WebKit::WebRect(video_frame_->visible_rect());
+}
+
+WebKit::WebSize WebVideoFrameImpl::textureSize() const {
+ if (!video_frame_.get() || format() != FormatNativeTexture)
+ return WebKit::WebSize(0, 0);
+ return WebKit::WebSize(video_frame_->coded_size());
+}
+
} // namespace webkit_media
« no previous file with comments | « webkit/media/webvideoframe_impl.h ('k') | webkit/plugins/ppapi/content_decryptor_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698