diff options
author | lionel.g.landwerlin <lionel.g.landwerlin@intel.com> | 2015-02-09 15:27:34 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-09 23:28:22 +0000 |
commit | c12f2b27581d575b3bbd9b668a4c521703eafda3 (patch) | |
tree | c87d0fbc68333dc7ca9bd71a3db6af0f0260cb7b /media/base/video_frame.h | |
parent | 7a9ac6310a6ce95821213461911d7650654215dc (diff) | |
download | chromium_src-c12f2b27581d575b3bbd9b668a4c521703eafda3.zip chromium_src-c12f2b27581d575b3bbd9b668a4c521703eafda3.tar.gz chromium_src-c12f2b27581d575b3bbd9b668a4c521703eafda3.tar.bz2 |
media: VideoFrame: add offset for shared memory buffers
Frames' data could be located at an offset within a shared memory
buffer. This adds metadata into media::VideoFrame to support this use
case.
BUG=455409
TEST=none
Review URL: https://codereview.chromium.org/877353002
Cr-Commit-Position: refs/heads/master@{#315428}
Diffstat (limited to 'media/base/video_frame.h')
-rw-r--r-- | media/base/video_frame.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/media/base/video_frame.h b/media/base/video_frame.h index 4215bae..fc4a09d 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. |