Chromium Code Reviews| 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 cb21258a6fb24feb19ab45813e34f3c15fb1082d..1917f7270851150a53a30a4d86cbef68e1884ee2 100644 |
| --- a/webkit/media/crypto/ppapi/content_decryption_module.h |
| +++ b/webkit/media/crypto/ppapi/content_decryption_module.h |
| @@ -19,6 +19,10 @@ namespace cdm { |
| class ContentDecryptionModule; |
| } |
| +namespace webkit_media { |
| +class CdmAllocatorInterface; |
| +} |
| + |
| extern "C" { |
| CDM_EXPORT cdm::ContentDecryptionModule* CreateCdmInstance(); |
| CDM_EXPORT void DestroyCdmInstance(cdm::ContentDecryptionModule* instance); |
| @@ -121,16 +125,24 @@ struct OutputBuffer { |
| OutputBuffer() |
| : data(NULL), |
| data_size(0), |
| - timestamp(0) {} |
| + timestamp(0), |
| + buffer_id(0) {} |
| - const uint8_t* data; // Pointer to the beginning of the output data. |
| + uint8_t* data; // Pointer to the beginning of the output data. |
|
xhwang
2012/09/01 13:49:09
Does the "const" gave you any warning/error?
Tom Finegan
2012/09/01 21:32:49
Yes, at the memcpy call site.
|
| uint32_t data_size; // Size (in bytes) of |data|. |
| int64_t timestamp; // Presentation timestamp in microseconds. |
| + int32_t buffer_id; // Buffer identifier. Issued by CdmAllocator, and used by |
| + // the CDM wrapper. |
| }; |
| class ContentDecryptionModule { |
| public: |
| + // Initialize the CDM by providing the allocator interface required for |
|
xhwang
2012/09/01 13:49:09
Initialize+s+. Remove double space here and on the
Tom Finegan
2012/09/01 21:32:49
Done.
|
| + // access to shared memory that can be passed to the browser. Returns |
| + // true upon successful initialization, and false when |allocator| is NULL. |
|
xhwang
2012/09/01 13:49:09
Returns NULL when initialization fails, which incl
Tom Finegan
2012/09/01 21:32:49
Not following-- method returns bool.
|
| + virtual bool Initialize(webkit_media::CdmAllocatorInterface* allocator) = 0; |
| + |
| // Generates a |key_request| given the |init_data|. |
| // Returns kSuccess if the key request was successfully generated, |
| // in which case the callee should have allocated memory for the output |