summaryrefslogtreecommitdiffstats
path: root/ppapi/native_client
diff options
context:
space:
mode:
authorbbudge <bbudge@chromium.org>2014-08-23 15:17:45 -0700
committerCommit bot <commit-bot@chromium.org>2014-08-23 22:18:36 +0000
commit4d6acafdc75e94256ab7c75f2f3e8a46e42bb9ec (patch)
treec992d155554bce6fc4638b9b4eea09693a5673c0 /ppapi/native_client
parent878e9535344a864efec4c5137e3b1363f911f378 (diff)
downloadchromium_src-4d6acafdc75e94256ab7c75f2f3e8a46e42bb9ec.zip
chromium_src-4d6acafdc75e94256ab7c75f2f3e8a46e42bb9ec.tar.gz
chromium_src-4d6acafdc75e94256ab7c75f2f3e8a46e42bb9ec.tar.bz2
Pepper: PPB_VideoDecoder software-only mode.
Add 'Initialize' method that takes an enum value to specify hardware acceleration policy. Policies are always, with fallback and only software. BUG=406194 Review URL: https://codereview.chromium.org/496203002 Cr-Commit-Position: refs/heads/master@{#291606}
Diffstat (limited to 'ppapi/native_client')
-rw-r--r--ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c63
1 files changed, 63 insertions, 0 deletions
diff --git a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
index a742eb6..3c3dd81 100644
--- a/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
+++ b/ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c
@@ -144,6 +144,7 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VarArray_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VarArrayBuffer_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VarDictionary_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VideoDecoder_0_1;
+static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VideoDecoder_0_2;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_WebSocket_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPP_Messaging_1_0;
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_AudioInput_Dev_0_3;
@@ -1970,6 +1971,50 @@ static int32_t Pnacl_M36_PPB_VideoDecoder_Reset(PP_Resource video_decoder, struc
/* End wrapper methods for PPB_VideoDecoder_0_1 */
+/* Begin wrapper methods for PPB_VideoDecoder_0_2 */
+
+static PP_Resource Pnacl_M39_PPB_VideoDecoder_Create(PP_Instance instance) {
+ const struct PPB_VideoDecoder_0_2 *iface = Pnacl_WrapperInfo_PPB_VideoDecoder_0_2.real_iface;
+ return iface->Create(instance);
+}
+
+static PP_Bool Pnacl_M39_PPB_VideoDecoder_IsVideoDecoder(PP_Resource resource) {
+ const struct PPB_VideoDecoder_0_2 *iface = Pnacl_WrapperInfo_PPB_VideoDecoder_0_2.real_iface;
+ return iface->IsVideoDecoder(resource);
+}
+
+static int32_t Pnacl_M39_PPB_VideoDecoder_Initialize(PP_Resource video_decoder, PP_Resource graphics3d_context, PP_VideoProfile profile, PP_HardwareAcceleration acceleration, struct PP_CompletionCallback* callback) {
+ const struct PPB_VideoDecoder_0_2 *iface = Pnacl_WrapperInfo_PPB_VideoDecoder_0_2.real_iface;
+ return iface->Initialize(video_decoder, graphics3d_context, profile, acceleration, *callback);
+}
+
+static int32_t Pnacl_M39_PPB_VideoDecoder_Decode(PP_Resource video_decoder, uint32_t decode_id, uint32_t size, const void* buffer, struct PP_CompletionCallback* callback) {
+ const struct PPB_VideoDecoder_0_2 *iface = Pnacl_WrapperInfo_PPB_VideoDecoder_0_2.real_iface;
+ return iface->Decode(video_decoder, decode_id, size, buffer, *callback);
+}
+
+static int32_t Pnacl_M39_PPB_VideoDecoder_GetPicture(PP_Resource video_decoder, struct PP_VideoPicture* picture, struct PP_CompletionCallback* callback) {
+ const struct PPB_VideoDecoder_0_2 *iface = Pnacl_WrapperInfo_PPB_VideoDecoder_0_2.real_iface;
+ return iface->GetPicture(video_decoder, picture, *callback);
+}
+
+static void Pnacl_M39_PPB_VideoDecoder_RecyclePicture(PP_Resource video_decoder, const struct PP_VideoPicture* picture) {
+ const struct PPB_VideoDecoder_0_2 *iface = Pnacl_WrapperInfo_PPB_VideoDecoder_0_2.real_iface;
+ iface->RecyclePicture(video_decoder, picture);
+}
+
+static int32_t Pnacl_M39_PPB_VideoDecoder_Flush(PP_Resource video_decoder, struct PP_CompletionCallback* callback) {
+ const struct PPB_VideoDecoder_0_2 *iface = Pnacl_WrapperInfo_PPB_VideoDecoder_0_2.real_iface;
+ return iface->Flush(video_decoder, *callback);
+}
+
+static int32_t Pnacl_M39_PPB_VideoDecoder_Reset(PP_Resource video_decoder, struct PP_CompletionCallback* callback) {
+ const struct PPB_VideoDecoder_0_2 *iface = Pnacl_WrapperInfo_PPB_VideoDecoder_0_2.real_iface;
+ return iface->Reset(video_decoder, *callback);
+}
+
+/* End wrapper methods for PPB_VideoDecoder_0_2 */
+
/* Not generating wrapper methods for PPB_VideoFrame_0_1 */
/* Not generating wrapper methods for PPB_View_1_0 */
@@ -4904,6 +4949,17 @@ static const struct PPB_VideoDecoder_0_1 Pnacl_Wrappers_PPB_VideoDecoder_0_1 = {
.Reset = (int32_t (*)(PP_Resource video_decoder, struct PP_CompletionCallback callback))&Pnacl_M36_PPB_VideoDecoder_Reset
};
+static const struct PPB_VideoDecoder_0_2 Pnacl_Wrappers_PPB_VideoDecoder_0_2 = {
+ .Create = (PP_Resource (*)(PP_Instance instance))&Pnacl_M39_PPB_VideoDecoder_Create,
+ .IsVideoDecoder = (PP_Bool (*)(PP_Resource resource))&Pnacl_M39_PPB_VideoDecoder_IsVideoDecoder,
+ .Initialize = (int32_t (*)(PP_Resource video_decoder, PP_Resource graphics3d_context, PP_VideoProfile profile, PP_HardwareAcceleration acceleration, struct PP_CompletionCallback callback))&Pnacl_M39_PPB_VideoDecoder_Initialize,
+ .Decode = (int32_t (*)(PP_Resource video_decoder, uint32_t decode_id, uint32_t size, const void* buffer, struct PP_CompletionCallback callback))&Pnacl_M39_PPB_VideoDecoder_Decode,
+ .GetPicture = (int32_t (*)(PP_Resource video_decoder, struct PP_VideoPicture* picture, struct PP_CompletionCallback callback))&Pnacl_M39_PPB_VideoDecoder_GetPicture,
+ .RecyclePicture = (void (*)(PP_Resource video_decoder, const struct PP_VideoPicture* picture))&Pnacl_M39_PPB_VideoDecoder_RecyclePicture,
+ .Flush = (int32_t (*)(PP_Resource video_decoder, struct PP_CompletionCallback callback))&Pnacl_M39_PPB_VideoDecoder_Flush,
+ .Reset = (int32_t (*)(PP_Resource video_decoder, struct PP_CompletionCallback callback))&Pnacl_M39_PPB_VideoDecoder_Reset
+};
+
/* Not generating wrapper interface for PPB_VideoFrame_0_1 */
/* Not generating wrapper interface for PPB_View_1_0 */
@@ -5894,6 +5950,12 @@ static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VideoDecoder_0_1 = {
.real_iface = NULL
};
+static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_VideoDecoder_0_2 = {
+ .iface_macro = PPB_VIDEODECODER_INTERFACE_0_2,
+ .wrapped_iface = (const void *) &Pnacl_Wrappers_PPB_VideoDecoder_0_2,
+ .real_iface = NULL
+};
+
static struct __PnaclWrapperInfo Pnacl_WrapperInfo_PPB_WebSocket_1_0 = {
.iface_macro = PPB_WEBSOCKET_INTERFACE_1_0,
.wrapped_iface = (const void *) &Pnacl_Wrappers_PPB_WebSocket_1_0,
@@ -6303,6 +6365,7 @@ static struct __PnaclWrapperInfo *s_ppb_wrappers[] = {
&Pnacl_WrapperInfo_PPB_VarArrayBuffer_1_0,
&Pnacl_WrapperInfo_PPB_VarDictionary_1_0,
&Pnacl_WrapperInfo_PPB_VideoDecoder_0_1,
+ &Pnacl_WrapperInfo_PPB_VideoDecoder_0_2,
&Pnacl_WrapperInfo_PPB_WebSocket_1_0,
&Pnacl_WrapperInfo_PPB_AudioInput_Dev_0_3,
&Pnacl_WrapperInfo_PPB_AudioInput_Dev_0_4,