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

Unified Diff: media/base/video_frame.h

Issue 2121043002: 16 bpp video stream capture, render and WebGL usage - Realsense R200 & SR300 support. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests: cc, skcanvas_video_renderer, wrtcrecorder... Fake capture supports Y16. Created 4 years, 3 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
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.

Powered by Google App Engine
This is Rietveld 408576698