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

Unified Diff: webkit/media/crypto/ppapi/content_decryption_module.h

Issue 10876014: Hook up CDM calls in CdmWrapper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
Index: webkit/media/crypto/ppapi/content_decryption_module.h
diff --git a/webkit/media/crypto/ppapi/content_decryption_module.h b/webkit/media/crypto/ppapi/content_decryption_module.h
index 0023d497a52e4f871a7c6611e4030d6aed0ac812..b2e256e0f891abc244eb303de69e840359e81724 100644
--- a/webkit/media/crypto/ppapi/content_decryption_module.h
+++ b/webkit/media/crypto/ppapi/content_decryption_module.h
@@ -34,6 +34,14 @@ enum Status {
};
struct KeyMessage {
+ KeyMessage()
+ : session_id(NULL),
+ session_id_size(0),
+ message(NULL),
+ message_size(0),
+ default_url(NULL),
+ default_url_size(0) {}
+
char* session_id;
uint32_t session_id_size;
ddorwin 2012/08/22 18:25:54 should this really be unsigned? If you change this
xhwang 2012/08/24 22:01:59 Good catch, chromium/google uses signed int (int32
uint8_t* message;
@@ -65,33 +73,50 @@ struct KeyMessage {
//
// TODO(xhwang): Add checks to make sure these structs have fixed layout.
struct SubsampleEntry {
+ SubsampleEntry(uint32_t clear_bytes, uint32_t cipher_bytes)
+ : clear_bytes(clear_bytes), cipher_bytes(cipher_bytes) {}
+
uint32_t clear_bytes;
uint32_t cipher_bytes;
};
struct InputBuffer {
- uint8_t* data; // Pointer to the beginning of the input data.
+ InputBuffer()
+ : data(NULL),
+ data_size(0),
+ data_offset(0),
+ key_id(NULL),
+ key_id_size(0),
+ iv(NULL),
+ iv_size(0),
+ checksum(NULL),
+ checksum_size(0),
+ subsamples(NULL),
+ num_subsamples(0),
+ timestamp(0) {}
+
+ const uint8_t* data; // Pointer to the beginning of the input data.
uint32_t data_size; // Size (in bytes) of |data|.
uint32_t data_offset; // Number of bytes to be discarded before decryption.
- uint8_t* key_id; // Key ID to identify the decryption key.
+ const uint8_t* key_id; // Key ID to identify the decryption key.
uint32_t key_id_size; // Size (in bytes) of |key_id|.
- uint8_t* iv; // Initialization vector.
+ const uint8_t* iv; // Initialization vector.
uint32_t iv_size; // Size (in bytes) of |iv|.
- uint8_t* checksum;
+ const uint8_t* checksum;
uint32_t checksum_size; // Size (in bytes) of the |checksum|.
- struct SubsampleEntry* subsamples;
+ const struct SubsampleEntry* subsamples;
uint32_t num_subsamples; // Number of subsamples in |subsamples|.
int64_t timestamp; // Presentation timestamp in microseconds.
};
struct OutputBuffer {
- uint8_t* data; // Pointer to the beginning of the output data.
+ const uint8_t* data; // Pointer to the beginning of the output data.
uint32_t data_size; // Size (in bytes) of |data|.
int64_t timestamp; // Presentation timestamp in microseconds.
« webkit/media/crypto/ppapi/cdm_wrapper.cc ('K') | « webkit/media/crypto/ppapi/cdm_wrapper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698