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
3 // found in the LICENSE file.
5 // From private/ppb_content_decryptor_private.idl,
6 // modified Thu Oct 10 14:49:51 2013.
8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/c/private/ppb_content_decryptor_private.h"
10 #include "ppapi/shared_impl/tracked_callback.h"
11 #include "ppapi/thunk/enter.h"
12 #include "ppapi/thunk/ppb_instance_api.h"
13 #include "ppapi/thunk/resource_creation_api.h"
14 #include "ppapi/thunk/thunk.h"
21 void KeyAdded(PP_Instance instance,
22 struct PP_Var key_system,
23 struct PP_Var session_id) {
24 VLOG(4) << "PPB_ContentDecryptor_Private::KeyAdded()";
25 EnterInstance enter(instance);
28 enter.functions()->KeyAdded(instance, key_system, session_id);
31 void KeyMessage(PP_Instance instance,
32 struct PP_Var key_system,
33 struct PP_Var session_id,
34 struct PP_Var message,
35 struct PP_Var default_url) {
36 VLOG(4) << "PPB_ContentDecryptor_Private::KeyMessage()";
37 EnterInstance enter(instance);
40 enter.functions()->KeyMessage(instance,
47 void KeyError(PP_Instance instance,
48 struct PP_Var key_system,
49 struct PP_Var session_id,
51 int32_t system_code) {
52 VLOG(4) << "PPB_ContentDecryptor_Private::KeyError()";
53 EnterInstance enter(instance);
56 enter.functions()->KeyError(instance,
63 void DeliverBlock(PP_Instance instance,
64 PP_Resource decrypted_block,
65 const struct PP_DecryptedBlockInfo* decrypted_block_info) {
66 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverBlock()";
67 EnterInstance enter(instance);
70 enter.functions()->DeliverBlock(instance,
72 decrypted_block_info);
75 void DecoderInitializeDone(PP_Instance instance,
76 PP_DecryptorStreamType decoder_type,
79 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderInitializeDone()";
80 EnterInstance enter(instance);
83 enter.functions()->DecoderInitializeDone(instance,
89 void DecoderDeinitializeDone(PP_Instance instance,
90 PP_DecryptorStreamType decoder_type,
91 uint32_t request_id) {
92 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderDeinitializeDone()";
93 EnterInstance enter(instance);
96 enter.functions()->DecoderDeinitializeDone(instance,
101 void DecoderResetDone(PP_Instance instance,
102 PP_DecryptorStreamType decoder_type,
103 uint32_t request_id) {
104 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderResetDone()";
105 EnterInstance enter(instance);
108 enter.functions()->DecoderResetDone(instance, decoder_type, request_id);
111 void DeliverFrame(PP_Instance instance,
112 PP_Resource decrypted_frame,
113 const struct PP_DecryptedFrameInfo* decrypted_frame_info) {
114 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverFrame()";
115 EnterInstance enter(instance);
118 enter.functions()->DeliverFrame(instance,
120 decrypted_frame_info);
124 PP_Instance instance,
125 PP_Resource audio_frames,
126 const struct PP_DecryptedSampleInfo* decrypted_sample_info) {
127 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverSamples()";
128 EnterInstance enter(instance);
131 enter.functions()->DeliverSamples(instance,
133 decrypted_sample_info);
136 const PPB_ContentDecryptor_Private_0_7
137 g_ppb_contentdecryptor_private_thunk_0_7 = {
142 &DecoderInitializeDone,
143 &DecoderDeinitializeDone,
151 const PPB_ContentDecryptor_Private_0_7*
152 GetPPB_ContentDecryptor_Private_0_7_Thunk() {
153 return &g_ppb_contentdecryptor_private_thunk_0_7;