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

Unified Diff: media/base/bitstream_buffer.h

Issue 1422643002: Pass DecryptConfig parameters over IPC and use it in AVDA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed MediaCodec.CodecException that was added only at level 21 (Android L) Created 5 years, 2 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 | « media/base/android/media_codec_bridge.cc ('k') | media/base/bitstream_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/bitstream_buffer.h
diff --git a/media/base/bitstream_buffer.h b/media/base/bitstream_buffer.h
index c015b92ab5a143aca99f5218ec2dc39792b12ebd..6ff1c059b98ff595a4a45bdac7302554c1d2c100 100644
--- a/media/base/bitstream_buffer.h
+++ b/media/base/bitstream_buffer.h
@@ -8,28 +8,26 @@
#include "base/basictypes.h"
#include "base/memory/shared_memory.h"
#include "base/time/time.h"
+#include "media/base/decrypt_config.h"
+#include "media/base/media_export.h"
#include "media/base/timestamp_constants.h"
namespace media {
// Class for passing bitstream buffers around. Does not take ownership of the
// data. This is the media-namespace equivalent of PP_VideoBitstreamBuffer_Dev.
-class BitstreamBuffer {
+class MEDIA_EXPORT 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 SetDecryptConfig(const DecryptConfig& decrypt_config);
int32 id() const { return id_; }
base::SharedMemoryHandle handle() const { return handle_; }
@@ -40,6 +38,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 +54,14 @@ class BitstreamBuffer {
// determine the output order.
base::TimeDelta presentation_timestamp_;
+ // The following fields come from DecryptConfig.
+ // TODO(timav): Try to DISALLOW_COPY_AND_ASSIGN and include these params as
+ // scoped_ptr<DecryptConfig> or explain why copy & assign is needed.
+
+ std::string key_id_; // key ID.
+ std::string iv_; // initialization vector
+ std::vector<SubsampleEntry> subsamples_; // clear/cypher sizes
+
// Allow compiler-generated copy & assign constructors.
};
« no previous file with comments | « media/base/android/media_codec_bridge.cc ('k') | media/base/bitstream_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698