Index: media/base/video_frame.h |
diff --git a/media/base/video_frame.h b/media/base/video_frame.h |
index 4d08c3976c0fdecb2fe416a82030251a11875189..29d35f026ded4ea703d47347857bbdcab525ce3f 100644 |
--- a/media/base/video_frame.h |
+++ b/media/base/video_frame.h |
@@ -162,6 +162,17 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
size_t shared_memory_offset, |
base::TimeDelta timestamp); |
+ // Same as WrapExternalData() with GpuMemoryBuffers. |
+ // The returned VideoFrame does not own the GpuMemoryBuffer. |
+ static scoped_refptr<VideoFrame> WrapExternalGpuMemoryBuffer( |
+ VideoPixelFormat format, |
+ const gfx::Size& coded_size, |
+ const gfx::Rect& visible_rect, |
+ const gfx::Size& natural_size, |
+ uint8_t* data, |
+ const gfx::GpuMemoryBufferHandle& y_handle, |
+ base::TimeDelta timestamp); |
+ |
// Wraps external YUV data of the given parameters with a VideoFrame. |
// The returned VideoFrame does not own the data passed in. |
static scoped_refptr<VideoFrame> WrapExternalYuvData( |
@@ -314,6 +325,9 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
static void HashFrameForTesting(base::MD5Context* context, |
const scoped_refptr<VideoFrame>& frame); |
+ // Returns the BufferFormat to use for the given VideoPixelFormat. |
+ static gfx::BufferFormat BufferFormat(VideoPixelFormat format); |
+ |
// Returns true if |frame| is accessible and mapped in the VideoFrame memory |
// space. If false, clients should refrain from accessing data(), |
// visible_data() etc. |