X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fppapi%2Fthunk%2Fppb_video_decoder_thunk.cc;h=14bd55a083ffd40d5de3b304a4fab1a136f5e453;hb=1afa4dd80ef85af7c90efaea6959db1d92330844;hp=8219fdf14de235b50463f4b30e0aa08d272bbe6e;hpb=90762837333c13ccf56f2ad88e4481fc71e8d281;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/ppapi/thunk/ppb_video_decoder_thunk.cc b/src/ppapi/thunk/ppb_video_decoder_thunk.cc index 8219fdf..14bd55a 100644 --- a/src/ppapi/thunk/ppb_video_decoder_thunk.cc +++ b/src/ppapi/thunk/ppb_video_decoder_thunk.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// From ppb_video_decoder.idl modified Mon Sep 8 16:40:15 2014. +// From ppb_video_decoder.idl modified Fri Nov 7 14:49:08 2014. #include "ppapi/c/pp_completion_callback.h" #include "ppapi/c/pp_errors.h" @@ -40,10 +40,8 @@ int32_t Initialize_0_1(PP_Resource video_decoder, EnterResource enter(video_decoder, callback, true); if (enter.failed()) return enter.retval(); - return enter.SetResult(enter.object()->Initialize0_1(graphics3d_context, - profile, - allow_software_fallback, - enter.callback())); + return enter.SetResult(enter.object()->Initialize0_1( + graphics3d_context, profile, allow_software_fallback, enter.callback())); } int32_t Initialize(PP_Resource video_decoder, @@ -55,10 +53,8 @@ int32_t Initialize(PP_Resource video_decoder, EnterResource enter(video_decoder, callback, true); if (enter.failed()) return enter.retval(); - return enter.SetResult(enter.object()->Initialize(graphics3d_context, - profile, - acceleration, - enter.callback())); + return enter.SetResult(enter.object()->Initialize( + graphics3d_context, profile, acceleration, enter.callback())); } int32_t Decode(PP_Resource video_decoder, @@ -70,10 +66,19 @@ int32_t Decode(PP_Resource video_decoder, EnterResource enter(video_decoder, callback, true); if (enter.failed()) return enter.retval(); - return enter.SetResult(enter.object()->Decode(decode_id, - size, - buffer, - enter.callback())); + return enter.SetResult( + enter.object()->Decode(decode_id, size, buffer, enter.callback())); +} + +int32_t GetPicture_0_1(PP_Resource video_decoder, + struct PP_VideoPicture_0_1* picture, + struct PP_CompletionCallback callback) { + VLOG(4) << "PPB_VideoDecoder::GetPicture()"; + EnterResource enter(video_decoder, callback, true); + if (enter.failed()) + return enter.retval(); + return enter.SetResult( + enter.object()->GetPicture0_1(picture, enter.callback())); } int32_t GetPicture(PP_Resource video_decoder, @@ -113,39 +118,46 @@ int32_t Reset(PP_Resource video_decoder, return enter.SetResult(enter.object()->Reset(enter.callback())); } -const PPB_VideoDecoder_0_1 g_ppb_videodecoder_thunk_0_1 = { - &Create, - &IsVideoDecoder, - &Initialize_0_1, - &Decode, - &GetPicture, - &RecyclePicture, - &Flush, - &Reset -}; - -const PPB_VideoDecoder_0_2 g_ppb_videodecoder_thunk_0_2 = { - &Create, - &IsVideoDecoder, - &Initialize, - &Decode, - &GetPicture, - &RecyclePicture, - &Flush, - &Reset -}; +const PPB_VideoDecoder_0_1 g_ppb_videodecoder_thunk_0_1 = {&Create, + &IsVideoDecoder, + &Initialize_0_1, + &Decode, + &GetPicture_0_1, + &RecyclePicture, + &Flush, + &Reset}; + +const PPB_VideoDecoder_0_2 g_ppb_videodecoder_thunk_0_2 = {&Create, + &IsVideoDecoder, + &Initialize, + &Decode, + &GetPicture_0_1, + &RecyclePicture, + &Flush, + &Reset}; + +const PPB_VideoDecoder_1_0 g_ppb_videodecoder_thunk_1_0 = {&Create, + &IsVideoDecoder, + &Initialize, + &Decode, + &GetPicture, + &RecyclePicture, + &Flush, + &Reset}; } // namespace -PPAPI_THUNK_EXPORT const PPB_VideoDecoder_0_1* - GetPPB_VideoDecoder_0_1_Thunk() { +PPAPI_THUNK_EXPORT const PPB_VideoDecoder_0_1* GetPPB_VideoDecoder_0_1_Thunk() { return &g_ppb_videodecoder_thunk_0_1; } -PPAPI_THUNK_EXPORT const PPB_VideoDecoder_0_2* - GetPPB_VideoDecoder_0_2_Thunk() { +PPAPI_THUNK_EXPORT const PPB_VideoDecoder_0_2* GetPPB_VideoDecoder_0_2_Thunk() { return &g_ppb_videodecoder_thunk_0_2; } +PPAPI_THUNK_EXPORT const PPB_VideoDecoder_1_0* GetPPB_VideoDecoder_1_0_Thunk() { + return &g_ppb_videodecoder_thunk_1_0; +} + } // namespace thunk } // namespace ppapi