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 Mon Aug 25 13:52:39 2014.
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
,
39 void PromiseResolvedWithKeyIds(PP_Instance instance
,
41 struct PP_Var key_ids_array
) {
42 VLOG(4) << "PPB_ContentDecryptor_Private::PromiseResolvedWithKeyIds()";
43 EnterInstance
enter(instance
);
46 enter
.functions()->PromiseResolvedWithKeyIds(instance
,
51 void PromiseRejected(PP_Instance instance
,
53 PP_CdmExceptionCode exception_code
,
55 struct PP_Var error_description
) {
56 VLOG(4) << "PPB_ContentDecryptor_Private::PromiseRejected()";
57 EnterInstance
enter(instance
);
60 enter
.functions()->PromiseRejected(instance
,
67 void SessionMessage(PP_Instance instance
,
68 struct PP_Var web_session_id
,
69 struct PP_Var message
,
70 struct PP_Var destination_url
) {
71 VLOG(4) << "PPB_ContentDecryptor_Private::SessionMessage()";
72 EnterInstance
enter(instance
);
75 enter
.functions()->SessionMessage(instance
,
81 void SessionKeysChange(PP_Instance instance
,
82 struct PP_Var web_session_id
,
83 PP_Bool has_additional_usable_key
) {
84 VLOG(4) << "PPB_ContentDecryptor_Private::SessionKeysChange()";
85 EnterInstance
enter(instance
);
88 enter
.functions()->SessionKeysChange(instance
,
90 has_additional_usable_key
);
93 void SessionExpirationChange(PP_Instance instance
,
94 struct PP_Var web_session_id
,
95 PP_Time new_expiry_time
) {
96 VLOG(4) << "PPB_ContentDecryptor_Private::SessionExpirationChange()";
97 EnterInstance
enter(instance
);
100 enter
.functions()->SessionExpirationChange(instance
,
105 void SessionReady(PP_Instance instance
, struct PP_Var web_session_id
) {
106 VLOG(4) << "PPB_ContentDecryptor_Private::SessionReady()";
107 EnterInstance
enter(instance
);
110 enter
.functions()->SessionReady(instance
, web_session_id
);
113 void SessionClosed(PP_Instance instance
, struct PP_Var web_session_id
) {
114 VLOG(4) << "PPB_ContentDecryptor_Private::SessionClosed()";
115 EnterInstance
enter(instance
);
118 enter
.functions()->SessionClosed(instance
, web_session_id
);
121 void SessionError(PP_Instance instance
,
122 struct PP_Var web_session_id
,
123 PP_CdmExceptionCode exception_code
,
124 uint32_t system_code
,
125 struct PP_Var error_description
) {
126 VLOG(4) << "PPB_ContentDecryptor_Private::SessionError()";
127 EnterInstance
enter(instance
);
130 enter
.functions()->SessionError(instance
,
137 void DeliverBlock(PP_Instance instance
,
138 PP_Resource decrypted_block
,
139 const struct PP_DecryptedBlockInfo
* decrypted_block_info
) {
140 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverBlock()";
141 EnterInstance
enter(instance
);
144 enter
.functions()->DeliverBlock(instance
,
146 decrypted_block_info
);
149 void DecoderInitializeDone(PP_Instance instance
,
150 PP_DecryptorStreamType decoder_type
,
153 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderInitializeDone()";
154 EnterInstance
enter(instance
);
157 enter
.functions()->DecoderInitializeDone(instance
,
163 void DecoderDeinitializeDone(PP_Instance instance
,
164 PP_DecryptorStreamType decoder_type
,
165 uint32_t request_id
) {
166 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderDeinitializeDone()";
167 EnterInstance
enter(instance
);
170 enter
.functions()->DecoderDeinitializeDone(instance
,
175 void DecoderResetDone(PP_Instance instance
,
176 PP_DecryptorStreamType decoder_type
,
177 uint32_t request_id
) {
178 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderResetDone()";
179 EnterInstance
enter(instance
);
182 enter
.functions()->DecoderResetDone(instance
, decoder_type
, request_id
);
185 void DeliverFrame(PP_Instance instance
,
186 PP_Resource decrypted_frame
,
187 const struct PP_DecryptedFrameInfo
* decrypted_frame_info
) {
188 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverFrame()";
189 EnterInstance
enter(instance
);
192 enter
.functions()->DeliverFrame(instance
,
194 decrypted_frame_info
);
198 PP_Instance instance
,
199 PP_Resource audio_frames
,
200 const struct PP_DecryptedSampleInfo
* decrypted_sample_info
) {
201 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverSamples()";
202 EnterInstance
enter(instance
);
205 enter
.functions()->DeliverSamples(instance
,
207 decrypted_sample_info
);
210 const PPB_ContentDecryptor_Private_0_12
211 g_ppb_contentdecryptor_private_thunk_0_12
= {
213 &PromiseResolvedWithSession
,
214 &PromiseResolvedWithKeyIds
,
218 &SessionExpirationChange
,
223 &DecoderInitializeDone
,
224 &DecoderDeinitializeDone
,
232 PPAPI_THUNK_EXPORT
const PPB_ContentDecryptor_Private_0_12
*
233 GetPPB_ContentDecryptor_Private_0_12_Thunk() {
234 return &g_ppb_contentdecryptor_private_thunk_0_12
;