Index: media/base/video_frame.h |
diff --git a/media/base/video_frame.h b/media/base/video_frame.h |
index 80169cbe822990ca487fa5993d12bc2c5a7aa0d0..de6ee073d7883fbebbe1a2f1bc74893fe625d267 100644 |
--- a/media/base/video_frame.h |
+++ b/media/base/video_frame.h |
@@ -297,6 +297,10 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
int stride(size_t plane) const; |
+ // Returns the actual allocation size for a YUV frame that is created by |
+ // CreateFrame() method. |
+ size_t allocated_size() const { return allocated_size_; } |
+ |
// Returns the number of bytes per row and number of rows for a given plane. |
// |
// As opposed to stride(), row_bytes() refers to the bytes representing |
@@ -444,6 +448,9 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
// strides can be negative. |
int32 strides_[kMaxPlanes]; |
+ // Actual allocation size for a YUV frame with alignments and padding. |
+ size_t allocated_size_; |
miu
2015/08/04 20:16:22
This isn't needed. See comments below.
|
+ |
// Array of data pointers to each plane. |
// TODO(mcasas): we don't know on ctor if we own |data_| or not. After |
// refactoring VideoFrame, change to scoped_ptr<uint8, AlignedFreeDeleter>. |