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

Unified Diff: media/base/video_frame.h

Issue 877353002: media: VideoFrame: add offset for shared memory buffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify shm pointer computation Created 5 years, 10 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_impl.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 4215bae1786086854b52c44302245e4d01d6de5a..fc4a09d81fcc2b91c0aa06e71ab7db1a0f0991f9 100644
--- a/media/base/video_frame.h
+++ b/media/base/video_frame.h
@@ -139,6 +139,7 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
uint8* data,
size_t data_size,
base::SharedMemoryHandle handle,
+ size_t shared_memory_offset,
base::TimeDelta timestamp,
const base::Closure& no_longer_needed_cb);
@@ -300,6 +301,9 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
// Returns the shared-memory handle, if present
base::SharedMemoryHandle shared_memory_handle() const;
+ // Returns the offset into the shared memory where the frame data begins.
+ size_t shared_memory_offset() const;
+
bool allow_overlay() const { return allow_overlay_; }
#if defined(OS_POSIX)
@@ -393,6 +397,9 @@ class MEDIA_EXPORT VideoFrame : public base::RefCountedThreadSafe<VideoFrame> {
// Shared memory handle, if this frame was allocated from shared memory.
base::SharedMemoryHandle shared_memory_handle_;
+ // Offset in shared memory buffer.
+ size_t shared_memory_offset_;
+
#if defined(OS_POSIX)
// Dmabufs for each plane, if this frame is wrapping memory
// acquired via dmabuf.
« no previous file with comments | « content/renderer/media/video_capture_impl.cc ('k') | media/base/video_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698