Index: media/base/video_frame.h |
diff --git a/media/base/video_frame.h b/media/base/video_frame.h |
index 8207d9be1d2456744ceef8a6265ef9269b9164b7..421265d84077378f71f68949bff7aa564f65abf4 100644 |
--- a/media/base/video_frame.h |
+++ b/media/base/video_frame.h |
@@ -137,6 +137,21 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
// least as large as 4*visible_rect().width()*visible_rect().height(). |
void ReadPixelsFromNativeTexture(const SkBitmap& pixels); |
+ // Wraps image data in a buffer backed by a base::SharedMemoryHandle with a |
+ // VideoFrame. The image data resides in |data| and is assumed to be packed |
+ // tightly in a buffer of logical dimensions |coded_size| with the appropriate |
+ // bit depth and plane count as given by |format|. When the frame is |
+ // destroyed |no_longer_needed_cb.Run()| will be called. |
+ static scoped_refptr<VideoFrame> WrapExternalSharedMemory( |
+ Format format, |
+ const gfx::Size& coded_size, |
+ const gfx::Rect& visible_rect, |
+ const gfx::Size& natural_size, |
+ uint8* data, |
+ base::SharedMemoryHandle handle, |
+ base::TimeDelta timestamp, |
+ const base::Closure& no_longer_needed_cb); |
+ |
// Wraps external YUV data of the given parameters with a VideoFrame. |
// The returned VideoFrame does not own the data passed in. When the frame |
// is destroyed |no_longer_needed_cb.Run()| will be called. |
Ami GONE FROM CHROMIUM
2013/08/08 20:05:28
TODO+crbug for the cleanup please.
sheu
2013/08/08 20:15:39
Done.
|
@@ -152,7 +167,6 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> { |
uint8* u_data, |
uint8* v_data, |
base::TimeDelta timestamp, |
- base::SharedMemoryHandle shm_handle, // may be NULLHandle() |
const base::Closure& no_longer_needed_cb); |
// Creates a frame with format equals to VideoFrame::EMPTY, width, height, |