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..94e83a9e64d1c302dcfb804d26c90410d3a902c9 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 CdmAllocator; |
| +} |
| + |
| 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. |
| 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 |
|
ddorwin
2012/09/04 09:53:15
A buffer object (see comment) makes comment this s
ddorwin
2012/09/05 13:44:51
This comment is related to the comment at http://c
Tom Finegan
2012/09/07 00:46:36
I've added CdmBuffer, but using a simple integer h
ddorwin
2012/09/07 09:48:48
Yes, you'd copy 9 bytes, but that's fine, and the
Tom Finegan
2012/09/08 01:02:47
Done. Allocator::Allocate now returns a cdm::Buffe
|
| + // the CDM wrapper. |
| }; |
| class ContentDecryptionModule { |
| public: |
| + // Initializes the CDM by providing the allocator interface required for |
|
ddorwin
2012/09/04 09:53:15
The real issue is related to shared object boundar
Tom Finegan
2012/09/07 00:46:36
Method removed.
|
| + // access to shared memory that can be passed to the browser. Returns |
| + // true upon successful initialization, and false when |allocator| is NULL. |
|
ddorwin
2012/09/04 09:53:15
No reason for a return value or supporting NULL.
Tom Finegan
2012/09/07 00:46:36
The constructor DCHECKs the pointer.
|
| + virtual bool Initialize(webkit_media::CdmAllocator* allocator) = 0; |
|
ddorwin
2012/09/04 09:53:15
Does it make sense to pass this to CreateCdmInstan
Tom Finegan
2012/09/07 00:46:36
Yes, doing that now.
|
| + |
| // 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 |