Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <cstring> // For memcpy. | 5 #include <cstring> // For memcpy. |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" // For OVERRIDE. | 8 #include "base/compiler_specific.h" // For OVERRIDE. |
| 9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
| 10 #include "ppapi/c/pp_stdint.h" | 10 #include "ppapi/c/pp_stdint.h" |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 227 | 227 |
| 228 cdm::OutputBuffer output_buffer; | 228 cdm::OutputBuffer output_buffer; |
| 229 cdm::Status status = cdm_->Decrypt(input_buffer, &output_buffer); | 229 cdm::Status status = cdm_->Decrypt(input_buffer, &output_buffer); |
| 230 | 230 |
| 231 CallOnMain(callback_factory_.NewCallback( | 231 CallOnMain(callback_factory_.NewCallback( |
| 232 &CdmWrapper::DeliverBlock, | 232 &CdmWrapper::DeliverBlock, |
| 233 status, | 233 status, |
| 234 output_buffer, | 234 output_buffer, |
| 235 encrypted_block_info.tracking_info)); | 235 encrypted_block_info.tracking_info)); |
| 236 | 236 |
| 237 pp::Module::Get()->core()->ReleaseResource(encrypted_buffer.pp_resource()); | |
|
dmichael (off chromium)
2012/09/05 17:13:06
The C++ interface should take care of reference co
Tom Finegan
2012/09/05 19:21:43
Added a PassRef ctor to pp::BufferDev.
| |
| 237 return true; | 238 return true; |
| 238 } | 239 } |
| 239 | 240 |
| 240 bool CdmWrapper::DecryptAndDecode( | 241 bool CdmWrapper::DecryptAndDecode( |
| 241 pp::Buffer_Dev encrypted_buffer, | 242 pp::Buffer_Dev encrypted_buffer, |
| 242 const PP_EncryptedBlockInfo& encrypted_block_info) { | 243 const PP_EncryptedBlockInfo& encrypted_block_info) { |
| 243 return false; | 244 return false; |
| 244 } | 245 } |
| 245 | 246 |
| 246 PP_Resource CdmWrapper::MakeBufferResource(const uint8_t* data, | 247 PP_Resource CdmWrapper::MakeBufferResource(const uint8_t* data, |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 336 } // namespace webkit_media | 337 } // namespace webkit_media |
| 337 | 338 |
| 338 namespace pp { | 339 namespace pp { |
| 339 | 340 |
| 340 // Factory function for your specialization of the Module object. | 341 // Factory function for your specialization of the Module object. |
| 341 Module* CreateModule() { | 342 Module* CreateModule() { |
| 342 return new webkit_media::MyModule(); | 343 return new webkit_media::MyModule(); |
| 343 } | 344 } |
| 344 | 345 |
| 345 } // namespace pp | 346 } // namespace pp |
| OLD | NEW |