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 Mon Jan 12 17:33:29
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 session_id
) {
30 VLOG(4) << "PPB_ContentDecryptor_Private::PromiseResolvedWithSession()";
31 EnterInstance
enter(instance
);
34 enter
.functions()->PromiseResolvedWithSession(instance
, promise_id
,
38 void PromiseRejected(PP_Instance instance
,
40 PP_CdmExceptionCode exception_code
,
42 struct PP_Var error_description
) {
43 VLOG(4) << "PPB_ContentDecryptor_Private::PromiseRejected()";
44 EnterInstance
enter(instance
);
47 enter
.functions()->PromiseRejected(instance
, promise_id
, exception_code
,
48 system_code
, error_description
);
51 void SessionMessage(PP_Instance instance
,
52 struct PP_Var session_id
,
53 PP_CdmMessageType message_type
,
54 struct PP_Var message
,
55 struct PP_Var legacy_destination_url
) {
56 VLOG(4) << "PPB_ContentDecryptor_Private::SessionMessage()";
57 EnterInstance
enter(instance
);
60 enter
.functions()->SessionMessage(instance
, session_id
, message_type
, message
,
61 legacy_destination_url
);
64 void SessionKeysChange(PP_Instance instance
,
65 struct PP_Var session_id
,
66 PP_Bool has_additional_usable_key
,
68 const struct PP_KeyInformation key_information
[]) {
69 VLOG(4) << "PPB_ContentDecryptor_Private::SessionKeysChange()";
70 EnterInstance
enter(instance
);
73 enter
.functions()->SessionKeysChange(instance
, session_id
,
74 has_additional_usable_key
, key_count
,
78 void SessionExpirationChange(PP_Instance instance
,
79 struct PP_Var session_id
,
80 PP_Time new_expiry_time
) {
81 VLOG(4) << "PPB_ContentDecryptor_Private::SessionExpirationChange()";
82 EnterInstance
enter(instance
);
85 enter
.functions()->SessionExpirationChange(instance
, session_id
,
89 void SessionClosed(PP_Instance instance
, struct PP_Var session_id
) {
90 VLOG(4) << "PPB_ContentDecryptor_Private::SessionClosed()";
91 EnterInstance
enter(instance
);
94 enter
.functions()->SessionClosed(instance
, session_id
);
97 void SessionError(PP_Instance instance
,
98 struct PP_Var session_id
,
99 PP_CdmExceptionCode exception_code
,
100 uint32_t system_code
,
101 struct PP_Var error_description
) {
102 VLOG(4) << "PPB_ContentDecryptor_Private::SessionError()";
103 EnterInstance
enter(instance
);
106 enter
.functions()->SessionError(instance
, session_id
, exception_code
,
107 system_code
, error_description
);
110 void DeliverBlock(PP_Instance instance
,
111 PP_Resource decrypted_block
,
112 const struct PP_DecryptedBlockInfo
* decrypted_block_info
) {
113 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverBlock()";
114 EnterInstance
enter(instance
);
117 enter
.functions()->DeliverBlock(instance
, decrypted_block
,
118 decrypted_block_info
);
121 void DecoderInitializeDone(PP_Instance instance
,
122 PP_DecryptorStreamType decoder_type
,
125 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderInitializeDone()";
126 EnterInstance
enter(instance
);
129 enter
.functions()->DecoderInitializeDone(instance
, decoder_type
, request_id
,
133 void DecoderDeinitializeDone(PP_Instance instance
,
134 PP_DecryptorStreamType decoder_type
,
135 uint32_t request_id
) {
136 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderDeinitializeDone()";
137 EnterInstance
enter(instance
);
140 enter
.functions()->DecoderDeinitializeDone(instance
, decoder_type
,
144 void DecoderResetDone(PP_Instance instance
,
145 PP_DecryptorStreamType decoder_type
,
146 uint32_t request_id
) {
147 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderResetDone()";
148 EnterInstance
enter(instance
);
151 enter
.functions()->DecoderResetDone(instance
, decoder_type
, request_id
);
154 void DeliverFrame(PP_Instance instance
,
155 PP_Resource decrypted_frame
,
156 const struct PP_DecryptedFrameInfo
* decrypted_frame_info
) {
157 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverFrame()";
158 EnterInstance
enter(instance
);
161 enter
.functions()->DeliverFrame(instance
, decrypted_frame
,
162 decrypted_frame_info
);
166 PP_Instance instance
,
167 PP_Resource audio_frames
,
168 const struct PP_DecryptedSampleInfo
* decrypted_sample_info
) {
169 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverSamples()";
170 EnterInstance
enter(instance
);
173 enter
.functions()->DeliverSamples(instance
, audio_frames
,
174 decrypted_sample_info
);
177 const PPB_ContentDecryptor_Private_0_13
178 g_ppb_contentdecryptor_private_thunk_0_13
= {&PromiseResolved
,
179 &PromiseResolvedWithSession
,
183 &SessionExpirationChange
,
187 &DecoderInitializeDone
,
188 &DecoderDeinitializeDone
,
195 PPAPI_THUNK_EXPORT
const PPB_ContentDecryptor_Private_0_13
*
196 GetPPB_ContentDecryptor_Private_0_13_Thunk() {
197 return &g_ppb_contentdecryptor_private_thunk_0_13
;