Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Unified Diff: ppapi/proxy/ppb_video_decoder_proxy.cc

Issue 10408003: Plumb extra_data() to VideoDecodeAccelerator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rev interface versino Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/ppb_video_decoder_proxy.h ('k') | ppapi/proxy/resource_creation_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_video_decoder_proxy.cc
diff --git a/ppapi/proxy/ppb_video_decoder_proxy.cc b/ppapi/proxy/ppb_video_decoder_proxy.cc
index 3f5cdc418530b6f915656d7511799c2f8bfc8ef9..f3734c4ef858869f6086af5269ba989f26364c93 100644
--- a/ppapi/proxy/ppb_video_decoder_proxy.cc
+++ b/ppapi/proxy/ppb_video_decoder_proxy.cc
@@ -180,7 +180,10 @@ bool PPB_VideoDecoder_Proxy::OnMessageReceived(const IPC::Message& msg) {
PP_Resource PPB_VideoDecoder_Proxy::CreateProxyResource(
PP_Instance instance,
PP_Resource graphics_context,
- PP_VideoDecoder_Profile profile) {
+ PP_VideoDecoder_Profile profile,
+ PP_Size frame_size,
+ const uint8_t* extra_data,
+ uint32_t extra_data_size) {
PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
// Dispatcher is null if it cannot find the instance passed to it (i.e. if the
// client passes in an invalid instance).
@@ -194,10 +197,14 @@ PP_Resource PPB_VideoDecoder_Proxy::CreateProxyResource(
Graphics3D* context = static_cast<Graphics3D*>(enter_context.object());
+ std::vector<uint8_t> extra_data_vector;
+ if (extra_data)
+ extra_data_vector.assign(extra_data, extra_data + extra_data_size);
+
HostResource result;
dispatcher->Send(new PpapiHostMsg_PPBVideoDecoder_Create(
- API_ID_PPB_VIDEO_DECODER_DEV, instance,
- context->host_resource(), profile, &result));
+ API_ID_PPB_VIDEO_DECODER_DEV, instance, context->host_resource(),profile,
+ frame_size, extra_data_vector, &result));
if (result.is_null())
return 0;
@@ -210,6 +217,8 @@ PP_Resource PPB_VideoDecoder_Proxy::CreateProxyResource(
void PPB_VideoDecoder_Proxy::OnMsgCreate(
PP_Instance instance, const HostResource& graphics_context,
PP_VideoDecoder_Profile profile,
+ const PP_Size& frame_size,
+ const std::vector<uint8_t>& extra_data,
HostResource* result) {
thunk::EnterResourceCreation resource_creation(instance);
if (resource_creation.failed())
@@ -218,7 +227,8 @@ void PPB_VideoDecoder_Proxy::OnMsgCreate(
// Make the resource and get the API pointer to its interface.
result->SetHostResource(
instance, resource_creation.functions()->CreateVideoDecoder(
- instance, graphics_context.host_resource(), profile));
+ instance, graphics_context.host_resource(), profile, frame_size,
+ extra_data.empty() ? NULL : &extra_data[0], extra_data.size()));
}
void PPB_VideoDecoder_Proxy::OnMsgDecode(
« no previous file with comments | « ppapi/proxy/ppb_video_decoder_proxy.h ('k') | ppapi/proxy/resource_creation_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698