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

Unified Diff: content/common/gpu/media/v4l2_video_decode_accelerator.h

Issue 874083005: Fix visible size for V4L2 VDA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 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 | « no previous file | content/common/gpu/media/v4l2_video_decode_accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/v4l2_video_decode_accelerator.h
diff --git a/content/common/gpu/media/v4l2_video_decode_accelerator.h b/content/common/gpu/media/v4l2_video_decode_accelerator.h
index 43ab8f1b260ee8a1ea8802e594df36bb48f2613d..11eba5abae4e91b557090a08cc4648acbca1badc 100644
--- a/content/common/gpu/media/v4l2_video_decode_accelerator.h
+++ b/content/common/gpu/media/v4l2_video_decode_accelerator.h
@@ -242,11 +242,18 @@ class CONTENT_EXPORT V4L2VideoDecodeAccelerator
void StartResolutionChangeIfNeeded();
void FinishResolutionChange();
- // Try to get output format, detected after parsing the beginning
- // of the stream. Sets |again| to true if more parsing is needed.
- bool GetFormatInfo(struct v4l2_format* format, bool* again);
- // Create output buffers for the given |format|.
- bool CreateBuffersForFormat(const struct v4l2_format& format);
+ // Try to get output format and visible size, detected after parsing the
+ // beginning of the stream. Sets |again| to true if more parsing is needed.
+ bool GetFormatInfo(struct v4l2_format* format,
+ gfx::Size* visible_size,
+ bool* again);
+ // Create output buffers for the given |format| and |visible_size|.
+ bool CreateBuffersForFormat(const struct v4l2_format& format,
+ const gfx::Size& visible_size);
+
+ // Try to get |visible_size|. Return false if cropping is not supported or the
+ // crop size is not inside |coded_size|.
+ bool GetVisibleSize(const gfx::Size& coded_size, gfx::Size* visible_size);
//
// Device tasks, to be run on device_poll_thread_.
@@ -415,8 +422,11 @@ class CONTENT_EXPORT V4L2VideoDecodeAccelerator
// to avoid races with potential Reset requests.
base::WaitableEvent pictures_assigned_;
- // Output picture size.
- gfx::Size frame_buffer_size_;
+ // Output picture coded size.
+ gfx::Size coded_size_;
+
+ // Output picture visible size.
+ gfx::Size visible_size_;
//
// The device polling thread handles notifications of V4L2 device changes.
« no previous file with comments | « no previous file | content/common/gpu/media/v4l2_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698