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

Side by Side Diff: media/cdm/ppapi/cdm_adapter.cc

Issue 122683002: Drop data offset in PP_EncryptedBlockInfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 6 years, 11 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "media/cdm/ppapi/cdm_adapter.h" 5 #include "media/cdm/ppapi/cdm_adapter.h"
6 6
7 #include "media/cdm/ppapi/cdm_file_io_impl.h" 7 #include "media/cdm/ppapi/cdm_file_io_impl.h"
8 #include "media/cdm/ppapi/cdm_helpers.h" 8 #include "media/cdm/ppapi/cdm_helpers.h"
9 #include "media/cdm/ppapi/cdm_logging.h" 9 #include "media/cdm/ppapi/cdm_logging.h"
10 #include "media/cdm/ppapi/supported_cdm_versions.h" 10 #include "media/cdm/ppapi/supported_cdm_versions.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 const pp::Buffer_Dev& encrypted_buffer, 50 const pp::Buffer_Dev& encrypted_buffer,
51 const PP_EncryptedBlockInfo& encrypted_block_info, 51 const PP_EncryptedBlockInfo& encrypted_block_info,
52 std::vector<cdm::SubsampleEntry>* subsamples, 52 std::vector<cdm::SubsampleEntry>* subsamples,
53 cdm::InputBuffer* input_buffer) { 53 cdm::InputBuffer* input_buffer) {
54 PP_DCHECK(subsamples); 54 PP_DCHECK(subsamples);
55 PP_DCHECK(!encrypted_buffer.is_null()); 55 PP_DCHECK(!encrypted_buffer.is_null());
56 56
57 input_buffer->data = static_cast<uint8_t*>(encrypted_buffer.data()); 57 input_buffer->data = static_cast<uint8_t*>(encrypted_buffer.data());
58 input_buffer->data_size = encrypted_block_info.data_size; 58 input_buffer->data_size = encrypted_block_info.data_size;
59 PP_DCHECK(encrypted_buffer.size() >= input_buffer->data_size); 59 PP_DCHECK(encrypted_buffer.size() >= input_buffer->data_size);
60 input_buffer->data_offset = encrypted_block_info.data_offset;
61 60
62 PP_DCHECK(encrypted_block_info.key_id_size <= 61 PP_DCHECK(encrypted_block_info.key_id_size <=
63 arraysize(encrypted_block_info.key_id)); 62 arraysize(encrypted_block_info.key_id));
64 input_buffer->key_id_size = encrypted_block_info.key_id_size; 63 input_buffer->key_id_size = encrypted_block_info.key_id_size;
65 input_buffer->key_id = input_buffer->key_id_size > 0 ? 64 input_buffer->key_id = input_buffer->key_id_size > 0 ?
66 encrypted_block_info.key_id : NULL; 65 encrypted_block_info.key_id : NULL;
67 66
68 PP_DCHECK(encrypted_block_info.iv_size <= arraysize(encrypted_block_info.iv)); 67 PP_DCHECK(encrypted_block_info.iv_size <= arraysize(encrypted_block_info.iv));
69 input_buffer->iv_size = encrypted_block_info.iv_size; 68 input_buffer->iv_size = encrypted_block_info.iv_size;
70 input_buffer->iv = encrypted_block_info.iv_size > 0 ? 69 input_buffer->iv = encrypted_block_info.iv_size > 0 ?
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 } // namespace media 1040 } // namespace media
1042 1041
1043 namespace pp { 1042 namespace pp {
1044 1043
1045 // Factory function for your specialization of the Module object. 1044 // Factory function for your specialization of the Module object.
1046 Module* CreateModule() { 1045 Module* CreateModule() {
1047 return new media::CdmAdapterModule(); 1046 return new media::CdmAdapterModule();
1048 } 1047 }
1049 1048
1050 } // namespace pp 1049 } // namespace pp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698