Chromium Code Reviews| Index: media/base/video_frame.h |
| diff --git a/media/base/video_frame.h b/media/base/video_frame.h |
| index 26a9dea9330d0e12f6ce17969a34b2922042c243..fb2ebb863fa12ca603f18874034d27428d593610 100644 |
| --- a/media/base/video_frame.h |
| +++ b/media/base/video_frame.h |
| @@ -8,6 +8,7 @@ |
| #include "base/callback.h" |
| #include "base/md5.h" |
| #include "media/base/buffers.h" |
| +#include "ui/gfx/size.h" |
| namespace media { |
| @@ -43,6 +44,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
| Format format, |
| size_t width, |
|
Ami GONE FROM CHROMIUM
2012/08/02 00:16:14
this width/height pair should be gfx::Size'ified.
acolwell GONE FROM CHROMIUM
2012/08/02 02:16:30
Done, but named size since it technically is the v
|
| size_t height, |
| + const gfx::Size& natural_size, |
| base::TimeDelta timestamp); |
| // Call prior to CreateFrame to ensure validity of frame configuration. Called |
| @@ -60,6 +62,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
| uint32 texture_target, |
| size_t width, |
| size_t height, |
| + const gfx::Size& natural_size, |
| base::TimeDelta timestamp, |
| const base::Closure& no_longer_needed); |
| @@ -77,6 +80,8 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
| size_t height() const { return height_; } |
| + const gfx::Size& natural_size() const { return natural_size_; } |
| + |
| int stride(size_t plane) const; |
| // Returns the number of bytes per row and number of rows for a given plane. |
| @@ -117,6 +122,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
| VideoFrame(Format format, |
| size_t video_width, |
| size_t video_height, |
| + const gfx::Size& natural_size, |
| base::TimeDelta timestamp); |
| virtual ~VideoFrame(); |
| @@ -134,6 +140,10 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
| size_t width_; |
| size_t height_; |
| + // Width and height of the video frame with aspect ratio taken |
| + // into account. |
| + gfx::Size natural_size_; |
| + |
| // Array of strides for each plane, typically greater or equal to the width |
| // of the surface divided by the horizontal sampling period. Note that |
| // strides can be negative. |