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

Unified Diff: media/base/video_frame.h

Issue 1637793004: [WIP] Mojo Video Capture thingy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 ad7f4c01a4268651728ce71acba87c3ec0ac388e..83aaa854f12236172a17d0d44b1d866239e3af4f 100644
--- a/media/base/video_frame.h
+++ b/media/base/video_frame.h
@@ -356,6 +356,8 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
// Returns the offset into the shared memory where the frame data begins.
size_t shared_memory_offset() const;
+ const base::SharedMemory& shared_memory() const;
+
// Returns the vector of GpuMemoryBuffer handles, if present.
const std::vector<gfx::GpuMemoryBufferHandle>& gpu_memory_buffer_handles()
const;
@@ -373,6 +375,8 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
void AddSharedMemoryHandle(base::SharedMemoryHandle handle);
+ void AddSharedMemory(scoped_ptr<base::SharedMemory> shared_memory);
+
#if defined(OS_MACOSX)
// Returns the backing CVPixelBuffer, if present.
// TODO(mcasas): Rename to CvPixelBuffer() to comply with Style Guide.
@@ -504,6 +508,9 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
base::SharedMemoryHandle shared_memory_handle_;
size_t shared_memory_offset_;
+ // Users can store the shared_memory_ inside this VideoFrame.
+ scoped_ptr<base::SharedMemory> shared_memory_;
+
// GpuMemoryBuffer handles attached to the video_frame.
std::vector<gfx::GpuMemoryBufferHandle> gpu_memory_buffer_handles_;

Powered by Google App Engine
This is Rietveld 408576698