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 Wed Feb 26 16:37:47 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 SessionCreated(PP_Instance instance
,
21 struct PP_Var web_session_id
) {
22 VLOG(4) << "PPB_ContentDecryptor_Private::SessionCreated()";
23 EnterInstance
enter(instance
);
26 enter
.functions()->SessionCreated(instance
, session_id
, web_session_id
);
29 void SessionMessage(PP_Instance instance
,
31 struct PP_Var message
,
32 struct PP_Var destination_url
) {
33 VLOG(4) << "PPB_ContentDecryptor_Private::SessionMessage()";
34 EnterInstance
enter(instance
);
37 enter
.functions()->SessionMessage(instance
,
43 void SessionReady(PP_Instance instance
, uint32_t session_id
) {
44 VLOG(4) << "PPB_ContentDecryptor_Private::SessionReady()";
45 EnterInstance
enter(instance
);
48 enter
.functions()->SessionReady(instance
, session_id
);
51 void SessionClosed(PP_Instance instance
, uint32_t session_id
) {
52 VLOG(4) << "PPB_ContentDecryptor_Private::SessionClosed()";
53 EnterInstance
enter(instance
);
56 enter
.functions()->SessionClosed(instance
, session_id
);
59 void SessionError(PP_Instance instance
,
62 uint32_t system_code
) {
63 VLOG(4) << "PPB_ContentDecryptor_Private::SessionError()";
64 EnterInstance
enter(instance
);
67 enter
.functions()->SessionError(instance
,
73 void DeliverBlock(PP_Instance instance
,
74 PP_Resource decrypted_block
,
75 const struct PP_DecryptedBlockInfo
* decrypted_block_info
) {
76 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverBlock()";
77 EnterInstance
enter(instance
);
80 enter
.functions()->DeliverBlock(instance
,
82 decrypted_block_info
);
85 void DecoderInitializeDone(PP_Instance instance
,
86 PP_DecryptorStreamType decoder_type
,
89 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderInitializeDone()";
90 EnterInstance
enter(instance
);
93 enter
.functions()->DecoderInitializeDone(instance
,
99 void DecoderDeinitializeDone(PP_Instance instance
,
100 PP_DecryptorStreamType decoder_type
,
101 uint32_t request_id
) {
102 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderDeinitializeDone()";
103 EnterInstance
enter(instance
);
106 enter
.functions()->DecoderDeinitializeDone(instance
,
111 void DecoderResetDone(PP_Instance instance
,
112 PP_DecryptorStreamType decoder_type
,
113 uint32_t request_id
) {
114 VLOG(4) << "PPB_ContentDecryptor_Private::DecoderResetDone()";
115 EnterInstance
enter(instance
);
118 enter
.functions()->DecoderResetDone(instance
, decoder_type
, request_id
);
121 void DeliverFrame(PP_Instance instance
,
122 PP_Resource decrypted_frame
,
123 const struct PP_DecryptedFrameInfo
* decrypted_frame_info
) {
124 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverFrame()";
125 EnterInstance
enter(instance
);
128 enter
.functions()->DeliverFrame(instance
,
130 decrypted_frame_info
);
134 PP_Instance instance
,
135 PP_Resource audio_frames
,
136 const struct PP_DecryptedSampleInfo
* decrypted_sample_info
) {
137 VLOG(4) << "PPB_ContentDecryptor_Private::DeliverSamples()";
138 EnterInstance
enter(instance
);
141 enter
.functions()->DeliverSamples(instance
,
143 decrypted_sample_info
);
146 const PPB_ContentDecryptor_Private_0_11
147 g_ppb_contentdecryptor_private_thunk_0_11
= {
154 &DecoderInitializeDone
,
155 &DecoderDeinitializeDone
,
163 PPAPI_THUNK_EXPORT
const PPB_ContentDecryptor_Private_0_11
*
164 GetPPB_ContentDecryptor_Private_0_11_Thunk() {
165 return &g_ppb_contentdecryptor_private_thunk_0_11
;