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

Side by Side Diff: webkit/media/crypto/ppapi/cdm_wrapper.cc

Issue 10900007: Add video decoding support in the CDM interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resolve comments. Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/media/crypto/ppapi/clear_key_cdm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | webkit/media/crypto/ppapi/clear_key_cdm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698