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

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: Update. Created 8 years, 2 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
Index: webkit/media/webvideoframe_impl.cc
diff --git a/webkit/media/webvideoframe_impl.cc b/webkit/media/webvideoframe_impl.cc
index 51532c9918ad9ad3fdd1a4640484ce2e0b335b52..748bdb169a17cc310f4dc2396e43c613b20f5228 100644
--- a/webkit/media/webvideoframe_impl.cc
+++ b/webkit/media/webvideoframe_impl.cc
@@ -46,18 +46,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;
@@ -78,12 +66,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;
@@ -102,4 +84,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

Powered by Google App Engine
This is Rietveld 408576698