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 Jun 5 13:39:15 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 PromiseRejected(PP_Instance instance
,
41 PP_CdmExceptionCode exception_code
,
43 struct PP_Var error_description
) {
44 VLOG(4) << "PPB_ContentDecryptor_Private::PromiseRejected()";
45 EnterInstance
enter(instance
);
48 enter
.functions()->PromiseRejected(instance
,
55 void SessionMessage(PP_Instance instance
,
56 struct PP_Var web_session_id
,
57 struct PP_Var message
,
58 struct PP_Var destination_url
) {
59 VLOG(4) << "PPB_ContentDecryptor_Private::SessionMessage()";
60 EnterInstance
enter(instance
);
63 enter
.functions()->SessionMessage(instance
,
69 void SessionReady(PP_Instance instance
, struct PP_Var web_session_id
) {
70 VLOG(4) << "PPB_ContentDecryptor_Private::SessionReady()";
71 EnterInstance
enter(instance
);
74 enter
.functions()->SessionReady(instance
, web_session_id
);
77 void SessionClosed(PP_Instance instance
, struct PP_Var web_session_id
) {
78 VLOG(4) << "PPB_ContentDecryptor_Private::SessionClosed()";
79 EnterInstance
enter(instance
);
82 enter
.functions()->SessionClosed(instance
, web_session_id
);
85 void SessionError(PP_Instance instance
,
86 struct PP_Var web_session_id
,
87 PP_CdmExceptionCode exception_code
,
89 struct PP_Var error_description
) {
90 VLOG(4) << "PPB_ContentDecryptor_Private::SessionError()";
91 EnterInstance
enter(instance
);
94 enter
.functions()->SessionError(instance
,
101 void DeliverBlock(PP_Instance instance
,
102 PP_Resource decrypted_block
,
103 const struct PP_DecryptedBlockInfo
* decrypted_block_info
) {
104 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverBlock()";
105 EnterInstance
enter(instance
);
108 enter
.functions()->DeliverBlock(instance
,
110 decrypted_block_info
);
113 void DecoderInitializeDone(PP_Instance instance
,
114 PP_DecryptorStreamType decoder_type
,
117 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderInitializeDone()";
118 EnterInstance
enter(instance
);
121 enter
.functions()->DecoderInitializeDone(instance
,
127 void DecoderDeinitializeDone(PP_Instance instance
,
128 PP_DecryptorStreamType decoder_type
,
129 uint32_t request_id
) {
130 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderDeinitializeDone()";
131 EnterInstance
enter(instance
);
134 enter
.functions()->DecoderDeinitializeDone(instance
,
139 void DecoderResetDone(PP_Instance instance
,
140 PP_DecryptorStreamType decoder_type
,
141 uint32_t request_id
) {
142 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderResetDone()";
143 EnterInstance
enter(instance
);
146 enter
.functions()->DecoderResetDone(instance
, decoder_type
, request_id
);
149 void DeliverFrame(PP_Instance instance
,
150 PP_Resource decrypted_frame
,
151 const struct PP_DecryptedFrameInfo
* decrypted_frame_info
) {
152 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverFrame()";
153 EnterInstance
enter(instance
);
156 enter
.functions()->DeliverFrame(instance
,
158 decrypted_frame_info
);
162 PP_Instance instance
,
163 PP_Resource audio_frames
,
164 const struct PP_DecryptedSampleInfo
* decrypted_sample_info
) {
165 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverSamples()";
166 EnterInstance
enter(instance
);
169 enter
.functions()->DeliverSamples(instance
,
171 decrypted_sample_info
);
174 const PPB_ContentDecryptor_Private_0_12
175 g_ppb_contentdecryptor_private_thunk_0_12
= {
177 &PromiseResolvedWithSession
,
184 &DecoderInitializeDone
,
185 &DecoderDeinitializeDone
,
193 PPAPI_THUNK_EXPORT
const PPB_ContentDecryptor_Private_0_12
*
194 GetPPB_ContentDecryptor_Private_0_12_Thunk() {
195 return &g_ppb_contentdecryptor_private_thunk_0_12
;