Chromium Code Reviews| Index: media/base/video_frame.h |
| diff --git a/media/base/video_frame.h b/media/base/video_frame.h |
| index 5939c45211e16b939c69c96be2242968144c8385..e0df41b54d05e2253f0c99fb860d011b827fe7a3 100644 |
| --- a/media/base/video_frame.h |
| +++ b/media/base/video_frame.h |
| @@ -219,6 +219,11 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
| // Returns horizontal bits per pixel for given |plane| and |format|. |
| static int PlaneHorizontalBitsPerPixel(Format format, size_t plane); |
| + // Returns the number of bytes per row for the given plane, format, and width. |
| + // This refers to the bytes representing frame data scanlines without stride |
| + // padding. |
| + static int RowBytes(size_t plane, Format format, int width); |
| + |
| Format format() const { return format_; } |
| const gfx::Size& coded_size() const { return coded_size_; } |
| @@ -284,6 +289,10 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
| private: |
| friend class base::RefCountedThreadSafe<VideoFrame>; |
| + |
| + // Used to DCHECK() plane parameters. |
| + static bool IsValidPlane(size_t plane, VideoFrame::Format format); |
|
kcwu
2014/08/15 10:19:17
It is not always used to DCHECK(), for instance, H
wuchengli
2014/08/18 07:08:13
Updated the comments.
|
| + |
| // Clients must use the static CreateFrame() method to create a new frame. |
| VideoFrame(Format format, |
| const gfx::Size& coded_size, |
| @@ -296,9 +305,6 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
| void AllocateYUV(); |
| - // Used to DCHECK() plane parameters. |
| - bool IsValidPlane(size_t plane) const; |
| - |
| // Frame format. |
| const Format format_; |