Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Unified Diff: media/base/video_frame.h

Issue 2398463003: 16 bit capture and GPU&CPU memory buffer support.
Patch Set: fixes. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/video_capture_message_filter_unittest.cc ('k') | media/base/video_frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame.h
diff --git a/media/base/video_frame.h b/media/base/video_frame.h
index 468df18802069010df4687e31a2d53500cd555e6..1cb754b5499ab874f993eab5426bf7bc55a08918 100644
--- a/media/base/video_frame.h
+++ b/media/base/video_frame.h
@@ -156,6 +156,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(
@@ -303,6 +314,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.
« no previous file with comments | « content/renderer/media/video_capture_message_filter_unittest.cc ('k') | media/base/video_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698