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 modified Wed Nov 5 14:29:15
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/ppapi_thunk_export.h"
19 void PromiseResolved(PP_Instance instance
, uint32_t promise_id
) {
20 VLOG(4) << "PPB_ContentDecryptor_Private::PromiseResolved()";
21 EnterInstance
enter(instance
);
24 enter
.functions()->PromiseResolved(instance
, promise_id
);
27 void PromiseResolvedWithSession(PP_Instance instance
,
29 struct PP_Var web_session_id
) {
30 VLOG(4) << "PPB_ContentDecryptor_Private::PromiseResolvedWithSession()";
31 EnterInstance
enter(instance
);
34 enter
.functions()->PromiseResolvedWithSession(instance
, promise_id
,
38 void PromiseResolvedWithKeyIds(PP_Instance instance
,
40 struct PP_Var key_ids_array
) {
41 VLOG(4) << "PPB_ContentDecryptor_Private::PromiseResolvedWithKeyIds()";
42 EnterInstance
enter(instance
);
45 enter
.functions()->PromiseResolvedWithKeyIds(instance
, promise_id
,
49 void PromiseRejected(PP_Instance instance
,
51 PP_CdmExceptionCode exception_code
,
53 struct PP_Var error_description
) {
54 VLOG(4) << "PPB_ContentDecryptor_Private::PromiseRejected()";
55 EnterInstance
enter(instance
);
58 enter
.functions()->PromiseRejected(instance
, promise_id
, exception_code
,
59 system_code
, error_description
);
62 void SessionMessage(PP_Instance instance
,
63 struct PP_Var web_session_id
,
64 struct PP_Var message
,
65 struct PP_Var destination_url
) {
66 VLOG(4) << "PPB_ContentDecryptor_Private::SessionMessage()";
67 EnterInstance
enter(instance
);
70 enter
.functions()->SessionMessage(instance
, web_session_id
, message
,
74 void SessionKeysChange(PP_Instance instance
,
75 struct PP_Var web_session_id
,
76 PP_Bool has_additional_usable_key
) {
77 VLOG(4) << "PPB_ContentDecryptor_Private::SessionKeysChange()";
78 EnterInstance
enter(instance
);
81 enter
.functions()->SessionKeysChange(instance
, web_session_id
,
82 has_additional_usable_key
);
85 void SessionExpirationChange(PP_Instance instance
,
86 struct PP_Var web_session_id
,
87 PP_Time new_expiry_time
) {
88 VLOG(4) << "PPB_ContentDecryptor_Private::SessionExpirationChange()";
89 EnterInstance
enter(instance
);
92 enter
.functions()->SessionExpirationChange(instance
, web_session_id
,
96 void SessionReady(PP_Instance instance
, struct PP_Var web_session_id
) {
97 VLOG(4) << "PPB_ContentDecryptor_Private::SessionReady()";
98 EnterInstance
enter(instance
);
101 enter
.functions()->SessionReady(instance
, web_session_id
);
104 void SessionClosed(PP_Instance instance
, struct PP_Var web_session_id
) {
105 VLOG(4) << "PPB_ContentDecryptor_Private::SessionClosed()";
106 EnterInstance
enter(instance
);
109 enter
.functions()->SessionClosed(instance
, web_session_id
);
112 void SessionError(PP_Instance instance
,
113 struct PP_Var web_session_id
,
114 PP_CdmExceptionCode exception_code
,
115 uint32_t system_code
,
116 struct PP_Var error_description
) {
117 VLOG(4) << "PPB_ContentDecryptor_Private::SessionError()";
118 EnterInstance
enter(instance
);
121 enter
.functions()->SessionError(instance
, web_session_id
, exception_code
,
122 system_code
, error_description
);
125 void DeliverBlock(PP_Instance instance
,
126 PP_Resource decrypted_block
,
127 const struct PP_DecryptedBlockInfo
* decrypted_block_info
) {
128 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverBlock()";
129 EnterInstance
enter(instance
);
132 enter
.functions()->DeliverBlock(instance
, decrypted_block
,
133 decrypted_block_info
);
136 void DecoderInitializeDone(PP_Instance instance
,
137 PP_DecryptorStreamType decoder_type
,
140 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderInitializeDone()";
141 EnterInstance
enter(instance
);
144 enter
.functions()->DecoderInitializeDone(instance
, decoder_type
, request_id
,
148 void DecoderDeinitializeDone(PP_Instance instance
,
149 PP_DecryptorStreamType decoder_type
,
150 uint32_t request_id
) {
151 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderDeinitializeDone()";
152 EnterInstance
enter(instance
);
155 enter
.functions()->DecoderDeinitializeDone(instance
, decoder_type
,
159 void DecoderResetDone(PP_Instance instance
,
160 PP_DecryptorStreamType decoder_type
,
161 uint32_t request_id
) {
162 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderResetDone()";
163 EnterInstance
enter(instance
);
166 enter
.functions()->DecoderResetDone(instance
, decoder_type
, request_id
);
169 void DeliverFrame(PP_Instance instance
,
170 PP_Resource decrypted_frame
,
171 const struct PP_DecryptedFrameInfo
* decrypted_frame_info
) {
172 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverFrame()";
173 EnterInstance
enter(instance
);
176 enter
.functions()->DeliverFrame(instance
, decrypted_frame
,
177 decrypted_frame_info
);
181 PP_Instance instance
,
182 PP_Resource audio_frames
,
183 const struct PP_DecryptedSampleInfo
* decrypted_sample_info
) {
184 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverSamples()";
185 EnterInstance
enter(instance
);
188 enter
.functions()->DeliverSamples(instance
, audio_frames
,
189 decrypted_sample_info
);
192 const PPB_ContentDecryptor_Private_0_12
193 g_ppb_contentdecryptor_private_thunk_0_12
= {&PromiseResolved
,
194 &PromiseResolvedWithSession
,
195 &PromiseResolvedWithKeyIds
,
199 &SessionExpirationChange
,
204 &DecoderInitializeDone
,
205 &DecoderDeinitializeDone
,
212 PPAPI_THUNK_EXPORT
const PPB_ContentDecryptor_Private_0_12
*
213 GetPPB_ContentDecryptor_Private_0_12_Thunk() {
214 return &g_ppb_contentdecryptor_private_thunk_0_12
;