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

Side by Side Diff: ppapi/cpp/private/content_decryptor_private.cc

Issue 10914028: Add CDM allocator interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: It works, and this removes a copy in Decrypt/DeliverBlock. 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
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 "ppapi/cpp/private/content_decryptor_private.h" 5 #include "ppapi/cpp/private/content_decryptor_private.h"
6 6
7 #include <cstring> // memcpy 7 #include <cstring> // memcpy
8 8
9 #include "ppapi/c/ppb_var.h" 9 #include "ppapi/c/ppb_var.h"
10 #include "ppapi/c/private/ppb_content_decryptor_private.h" 10 #include "ppapi/c/private/ppb_content_decryptor_private.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 get_interface<PPB_ContentDecryptor_Private>()->KeyError( 207 get_interface<PPB_ContentDecryptor_Private>()->KeyError(
208 associated_instance_.pp_instance(), 208 associated_instance_.pp_instance(),
209 key_system_var.pp_var(), 209 key_system_var.pp_var(),
210 session_id_var.pp_var(), 210 session_id_var.pp_var(),
211 media_error, 211 media_error,
212 system_code); 212 system_code);
213 } 213 }
214 } 214 }
215 215
216 void ContentDecryptor_Private::DeliverBlock( 216 void ContentDecryptor_Private::DeliverBlock(
217 pp::Buffer_Dev decrypted_block, 217 PP_Resource decrypted_block,
218 const PP_DecryptedBlockInfo& decrypted_block_info) { 218 const PP_DecryptedBlockInfo& decrypted_block_info) {
219 if (has_interface<PPB_ContentDecryptor_Private>()) { 219 if (has_interface<PPB_ContentDecryptor_Private>()) {
220 get_interface<PPB_ContentDecryptor_Private>()->DeliverBlock( 220 get_interface<PPB_ContentDecryptor_Private>()->DeliverBlock(
221 associated_instance_.pp_instance(), 221 associated_instance_.pp_instance(),
222 decrypted_block.pp_resource(), 222 decrypted_block,
223 &decrypted_block_info); 223 &decrypted_block_info);
224 } 224 }
225 } 225 }
226 226
227 void ContentDecryptor_Private::DeliverFrame( 227 void ContentDecryptor_Private::DeliverFrame(
228 pp::Buffer_Dev decrypted_frame, 228 pp::Buffer_Dev decrypted_frame,
229 const PP_DecryptedBlockInfo& decrypted_block_info) { 229 const PP_DecryptedBlockInfo& decrypted_block_info) {
230 if (has_interface<PPB_ContentDecryptor_Private>()) { 230 if (has_interface<PPB_ContentDecryptor_Private>()) {
231 get_interface<PPB_ContentDecryptor_Private>()->DeliverFrame( 231 get_interface<PPB_ContentDecryptor_Private>()->DeliverFrame(
232 associated_instance_.pp_instance(), 232 associated_instance_.pp_instance(),
233 decrypted_frame.pp_resource(), 233 decrypted_frame.pp_resource(),
234 &decrypted_block_info); 234 &decrypted_block_info);
235 } 235 }
236 } 236 }
237 237
238 void ContentDecryptor_Private::DeliverSamples( 238 void ContentDecryptor_Private::DeliverSamples(
239 pp::Buffer_Dev decrypted_samples, 239 pp::Buffer_Dev decrypted_samples,
240 const PP_DecryptedBlockInfo& decrypted_block_info) { 240 const PP_DecryptedBlockInfo& decrypted_block_info) {
241 if (has_interface<PPB_ContentDecryptor_Private>()) { 241 if (has_interface<PPB_ContentDecryptor_Private>()) {
242 get_interface<PPB_ContentDecryptor_Private>()->DeliverSamples( 242 get_interface<PPB_ContentDecryptor_Private>()->DeliverSamples(
243 associated_instance_.pp_instance(), 243 associated_instance_.pp_instance(),
244 decrypted_samples.pp_resource(), 244 decrypted_samples.pp_resource(),
245 &decrypted_block_info); 245 &decrypted_block_info);
246 } 246 }
247 } 247 }
248 248
249 } // namespace pp 249 } // namespace pp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698