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/bitstream_buffer.h

Issue 1541353002: Add offset support to BitstreamBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/bitstream_buffer.h
diff --git a/media/base/bitstream_buffer.h b/media/base/bitstream_buffer.h
index 6ff1c059b98ff595a4a45bdac7302554c1d2c100..38660a2f5e2f93ae0fe0ce7144ce54bd81c3eec6 100644
--- a/media/base/bitstream_buffer.h
+++ b/media/base/bitstream_buffer.h
@@ -23,6 +23,17 @@ class MEDIA_EXPORT BitstreamBuffer {
BitstreamBuffer(int32 id,
base::SharedMemoryHandle handle,
size_t size,
+ off_t offset);
+
+ BitstreamBuffer(int32 id,
+ base::SharedMemoryHandle handle,
+ size_t size,
+ base::TimeDelta presentation_timestamp);
+
+ BitstreamBuffer(int32 id,
+ base::SharedMemoryHandle handle,
+ size_t size,
+ off_t offset,
base::TimeDelta presentation_timestamp);
~BitstreamBuffer();
@@ -32,6 +43,7 @@ class MEDIA_EXPORT BitstreamBuffer {
int32 id() const { return id_; }
base::SharedMemoryHandle handle() const { return handle_; }
size_t size() const { return size_; }
+ off_t offset() const { return offset_; }
Pawel Osciak 2015/12/24 00:58:01 Please add a comment what offset is.
Pawel Osciak 2015/12/24 01:01:38 Also perhaps please also clarify that size() is fo
Owen Lin 2015/12/24 08:01:35 Done.
Owen Lin 2015/12/24 08:01:35 Done.
// The timestamp is only valid if it's not equal to |media::kNoTimestamp()|.
base::TimeDelta presentation_timestamp() const {
@@ -48,6 +60,7 @@ class MEDIA_EXPORT BitstreamBuffer {
int32 id_;
base::SharedMemoryHandle handle_;
size_t size_;
+ off_t offset_;
// This is only set when necessary. For example, AndroidVideoDecodeAccelerator
// needs the timestamp because the underlying decoder may require it to

Powered by Google App Engine
This is Rietveld 408576698