Chromium Code Reviews| Index: media/base/bitstream_buffer.h |
| diff --git a/media/base/bitstream_buffer.h b/media/base/bitstream_buffer.h |
| index c015b92ab5a143aca99f5218ec2dc39792b12ebd..c3d07e653428a86575bb65254fa3d49489f6de54 100644 |
| --- a/media/base/bitstream_buffer.h |
| +++ b/media/base/bitstream_buffer.h |
| @@ -8,6 +8,7 @@ |
| #include "base/basictypes.h" |
| #include "base/memory/shared_memory.h" |
| #include "base/time/time.h" |
| +#include "media/base/decrypt_config.h" |
| #include "media/base/timestamp_constants.h" |
| namespace media { |
| @@ -16,20 +17,16 @@ namespace media { |
| // data. This is the media-namespace equivalent of PP_VideoBitstreamBuffer_Dev. |
| class BitstreamBuffer { |
| public: |
| - BitstreamBuffer(int32 id, base::SharedMemoryHandle handle, size_t size) |
| - : id_(id), |
| - handle_(handle), |
| - size_(size), |
| - presentation_timestamp_(kNoTimestamp()) {} |
| + BitstreamBuffer(int32 id, base::SharedMemoryHandle handle, size_t size); |
| BitstreamBuffer(int32 id, |
| base::SharedMemoryHandle handle, |
| size_t size, |
| - base::TimeDelta presentation_timestamp) |
| - : id_(id), |
| - handle_(handle), |
| - size_(size), |
| - presentation_timestamp_(presentation_timestamp) {} |
| + base::TimeDelta presentation_timestamp); |
| + |
| + ~BitstreamBuffer(); |
| + |
| + void SetDecryptParams(const DecryptConfig& decrypt_config); |
|
xhwang
2015/10/22 06:13:51
nit: maybe just SetDecryptConfig?
Tima Vaisburd
2015/10/22 21:57:26
Done.
|
| int32 id() const { return id_; } |
| base::SharedMemoryHandle handle() const { return handle_; } |
| @@ -40,6 +37,12 @@ class BitstreamBuffer { |
| return presentation_timestamp_; |
| } |
| + // The following methods come from DecryptConfig. |
| + |
| + const std::string& key_id() const { return key_id_; } |
| + const std::string& iv() const { return iv_; } |
| + const std::vector<SubsampleEntry>& subsamples() const { return subsamples_; } |
| + |
| private: |
| int32 id_; |
| base::SharedMemoryHandle handle_; |
| @@ -50,6 +53,12 @@ class BitstreamBuffer { |
| // determine the output order. |
| base::TimeDelta presentation_timestamp_; |
| + // The following fields come from DecryptConfig. |
| + |
| + std::string key_id_; // key ID. |
| + std::string iv_; // initialization vector |
| + std::vector<SubsampleEntry> subsamples_; // clear/cypher sizes |
|
xhwang
2015/10/22 06:13:51
Can you just have a scoped_ptr<DecryptConfig> here
Tima Vaisburd
2015/10/22 17:15:45
Yes, I wanted that from the very beginning, but wa
xhwang
2015/10/22 18:11:25
ouch...
Maybe it's because of this that we allow
Tima Vaisburd
2015/10/22 21:57:26
Done.
|
| + |
| // Allow compiler-generated copy & assign constructors. |
| }; |