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 Tue Apr 16 11:25:44 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 NeedKey(PP_Instance instance
,
22 struct PP_Var key_system
,
23 struct PP_Var session_id
,
24 struct PP_Var init_data
) {
25 VLOG(4) << "PPB_ContentDecryptor_Private::NeedKey()";
26 EnterInstance
enter(instance
);
29 enter
.functions()->NeedKey(instance
, key_system
, session_id
, init_data
);
32 void KeyAdded(PP_Instance instance
,
33 struct PP_Var key_system
,
34 struct PP_Var session_id
) {
35 VLOG(4) << "PPB_ContentDecryptor_Private::KeyAdded()";
36 EnterInstance
enter(instance
);
39 enter
.functions()->KeyAdded(instance
, key_system
, session_id
);
42 void KeyMessage(PP_Instance instance
,
43 struct PP_Var key_system
,
44 struct PP_Var session_id
,
45 struct PP_Var message
,
46 struct PP_Var default_url
) {
47 VLOG(4) << "PPB_ContentDecryptor_Private::KeyMessage()";
48 EnterInstance
enter(instance
);
51 enter
.functions()->KeyMessage(instance
,
58 void KeyError(PP_Instance instance
,
59 struct PP_Var key_system
,
60 struct PP_Var session_id
,
62 int32_t system_code
) {
63 VLOG(4) << "PPB_ContentDecryptor_Private::KeyError()";
64 EnterInstance
enter(instance
);
67 enter
.functions()->KeyError(instance
,
74 void DeliverBlock(PP_Instance instance
,
75 PP_Resource decrypted_block
,
76 const struct PP_DecryptedBlockInfo
* decrypted_block_info
) {
77 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverBlock()";
78 EnterInstance
enter(instance
);
81 enter
.functions()->DeliverBlock(instance
,
83 decrypted_block_info
);
86 void DecoderInitializeDone(PP_Instance instance
,
87 PP_DecryptorStreamType decoder_type
,
90 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderInitializeDone()";
91 EnterInstance
enter(instance
);
94 enter
.functions()->DecoderInitializeDone(instance
,
100 void DecoderDeinitializeDone(PP_Instance instance
,
101 PP_DecryptorStreamType decoder_type
,
102 uint32_t request_id
) {
103 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderDeinitializeDone()";
104 EnterInstance
enter(instance
);
107 enter
.functions()->DecoderDeinitializeDone(instance
,
112 void DecoderResetDone(PP_Instance instance
,
113 PP_DecryptorStreamType decoder_type
,
114 uint32_t request_id
) {
115 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderResetDone()";
116 EnterInstance
enter(instance
);
119 enter
.functions()->DecoderResetDone(instance
, decoder_type
, request_id
);
122 void DeliverFrame(PP_Instance instance
,
123 PP_Resource decrypted_frame
,
124 const struct PP_DecryptedFrameInfo
* decrypted_frame_info
) {
125 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverFrame()";
126 EnterInstance
enter(instance
);
129 enter
.functions()->DeliverFrame(instance
,
131 decrypted_frame_info
);
135 PP_Instance instance
,
136 PP_Resource audio_frames
,
137 const struct PP_DecryptedBlockInfo
* decrypted_block_info
) {
138 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverSamples()";
139 EnterInstance
enter(instance
);
142 enter
.functions()->DeliverSamples(instance
,
144 decrypted_block_info
);
147 const PPB_ContentDecryptor_Private_0_6
148 g_ppb_contentdecryptor_private_thunk_0_6
= {
154 &DecoderInitializeDone
,
155 &DecoderDeinitializeDone
,
163 const PPB_ContentDecryptor_Private_0_6
*
164 GetPPB_ContentDecryptor_Private_0_6_Thunk() {
165 return &g_ppb_contentdecryptor_private_thunk_0_6
;