| 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 output_buffer.data_size)); | 298 output_buffer.data_size)); |
| 299 | 299 |
| 300 PP_DecryptedBlockInfo decrypted_block_info; | 300 PP_DecryptedBlockInfo decrypted_block_info; |
| 301 decrypted_block_info.tracking_info.request_id = tracking_info.request_id; | 301 decrypted_block_info.tracking_info.request_id = tracking_info.request_id; |
| 302 decrypted_block_info.tracking_info.timestamp = output_buffer.timestamp; | 302 decrypted_block_info.tracking_info.timestamp = output_buffer.timestamp; |
| 303 | 303 |
| 304 switch (status) { | 304 switch (status) { |
| 305 case cdm::kSuccess: | 305 case cdm::kSuccess: |
| 306 decrypted_block_info.result = PP_DECRYPTRESULT_SUCCESS; | 306 decrypted_block_info.result = PP_DECRYPTRESULT_SUCCESS; |
| 307 break; | 307 break; |
| 308 case cdm::kErrorNoKey: | 308 case cdm::kNoKey: |
| 309 decrypted_block_info.result = PP_DECRYPTRESULT_DECRYPT_NOKEY; | 309 decrypted_block_info.result = PP_DECRYPTRESULT_DECRYPT_NOKEY; |
| 310 break; | 310 break; |
| 311 default: | 311 default: |
| 312 decrypted_block_info.result = PP_DECRYPTRESULT_DECRYPT_ERROR; | 312 decrypted_block_info.result = PP_DECRYPTRESULT_DECRYPT_ERROR; |
| 313 } | 313 } |
| 314 | 314 |
| 315 pp::ContentDecryptor_Private::DeliverBlock(decrypted_buffer, | 315 pp::ContentDecryptor_Private::DeliverBlock(decrypted_buffer, |
| 316 decrypted_block_info); | 316 decrypted_block_info); |
| 317 | 317 |
| 318 // TODO(xhwang): Fix this. This is not always safe as the memory is allocated | 318 // TODO(xhwang): Fix this. This is not always safe as the memory is allocated |
| (...skipping 17 matching lines...) Expand all Loading... |
| 336 } // namespace webkit_media | 336 } // namespace webkit_media |
| 337 | 337 |
| 338 namespace pp { | 338 namespace pp { |
| 339 | 339 |
| 340 // Factory function for your specialization of the Module object. | 340 // Factory function for your specialization of the Module object. |
| 341 Module* CreateModule() { | 341 Module* CreateModule() { |
| 342 return new webkit_media::MyModule(); | 342 return new webkit_media::MyModule(); |
| 343 } | 343 } |
| 344 | 344 |
| 345 } // namespace pp | 345 } // namespace pp |
| OLD | NEW |