Chromium Code Reviews| 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..8d0188b70a45b5cf7c63af46d38317bb1020523c 100644 |
| --- a/content/common/gpu/media/v4l2_video_decode_accelerator.h |
| +++ b/content/common/gpu/media/v4l2_video_decode_accelerator.h |
| @@ -242,11 +242,19 @@ 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. |
| + // |visible_size| could be nullptr and ignored. |
| + 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 visible size. Fallback to |coded_size| if |
| + // cropping is not supported or the crop size is not inside |coded_size|. |
|
Pawel Osciak
2015/03/04 10:50:22
Mentioning cropping is not really relevant here I
kcwu
2015/03/04 13:05:04
Done.
|
| + gfx::Size GetVisibleSize(const gfx::Size& coded_size); |
| // |
| // Device tasks, to be run on device_poll_thread_. |
| @@ -415,8 +423,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. |