Index: media/base/video_frame.h |
diff --git a/media/base/video_frame.h b/media/base/video_frame.h |
index 5939c45211e16b939c69c96be2242968144c8385..a2535dfca343032a66e97eb1f1dcd37885674ba2 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 |
Pawel Osciak
2014/08/18 07:52:03
We do align the given width though in the impl...
wuchengli
2014/08/18 09:09:00
It refers only to the stride. The original functio
Pawel Osciak
2014/08/20 10:46:06
The issue is that it used to not take width, so it
wuchengli
2014/08/22 05:32:05
Done.
|
+ // 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,11 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
private: |
friend class base::RefCountedThreadSafe<VideoFrame>; |
+ |
+ // Returns true if |plane| is less than the number of planes for the given |
+ // format. This can be used to DCHECK() plane parameters. |
+ static bool IsValidPlane(size_t plane, VideoFrame::Format format); |
+ |
// Clients must use the static CreateFrame() method to create a new frame. |
VideoFrame(Format format, |
const gfx::Size& coded_size, |
@@ -296,9 +306,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_; |