Chromium Code Reviews| Index: media/base/bitstream_buffer.h |
| diff --git a/media/base/bitstream_buffer.h b/media/base/bitstream_buffer.h |
| index 6ff1c059b98ff595a4a45bdac7302554c1d2c100..ea0b7816f31071fb24c21b853f0dd0c404288250 100644 |
| --- a/media/base/bitstream_buffer.h |
| +++ b/media/base/bitstream_buffer.h |
| @@ -20,19 +20,39 @@ class MEDIA_EXPORT BitstreamBuffer { |
| public: |
| BitstreamBuffer(int32 id, base::SharedMemoryHandle handle, size_t size); |
| + // Constructs a new BitstreamBuffer. The content of the bitstream is located |
| + // at |offset| bytes away from the start of the shared memory and the length |
| + // is |size| bytes. |
|
Pawel Osciak
2016/01/05 06:22:51
s/length/payload/
Owen Lin
2016/01/06 03:45:46
Done.
|
| + 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(); |
| void SetDecryptConfig(const DecryptConfig& decrypt_config); |
| int32 id() const { return id_; } |
| base::SharedMemoryHandle handle() const { return handle_; } |
| + |
| + // The number of bytes of the actual bitstream data. It is the size of the |
| + // content instead of the whole shared memory. |
| size_t size() const { return size_; } |
| + // The offset to the start of actual bitstream data in the shared memory. |
| + off_t offset() const { return offset_; } |
| + |
| // The timestamp is only valid if it's not equal to |media::kNoTimestamp()|. |
| base::TimeDelta presentation_timestamp() const { |
| return presentation_timestamp_; |
| @@ -48,6 +68,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 |