OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ppapi/proxy/ppp_video_decoder_proxy.h" | 5 #include "ppapi/proxy/ppp_video_decoder_proxy.h" |
6 | 6 |
7 #include "ppapi/proxy/host_dispatcher.h" | 7 #include "ppapi/proxy/host_dispatcher.h" |
8 #include "ppapi/proxy/plugin_resource_tracker.h" | 8 #include "ppapi/proxy/plugin_resource_tracker.h" |
9 #include "ppapi/proxy/ppapi_messages.h" | 9 #include "ppapi/proxy/ppapi_messages.h" |
10 #include "ppapi/proxy/ppb_video_decoder_proxy.h" | 10 #include "ppapi/proxy/ppb_video_decoder_proxy.h" |
11 #include "ppapi/thunk/enter.h" | 11 #include "ppapi/thunk/enter.h" |
12 #include "ppapi/thunk/ppb_video_decoder_api.h" | 12 #include "ppapi/thunk/ppb_video_decoder_api.h" |
13 #include "ppapi/thunk/thunk.h" | 13 #include "ppapi/thunk/thunk.h" |
14 | 14 |
15 using ppapi::HostResource; | |
16 using ppapi::thunk::PPB_VideoDecoder_API; | 15 using ppapi::thunk::PPB_VideoDecoder_API; |
17 | 16 |
18 namespace pp { | 17 namespace ppapi { |
19 namespace proxy { | 18 namespace proxy { |
20 | 19 |
21 namespace { | 20 namespace { |
22 | 21 |
23 void ProvidePictureBuffers(PP_Instance instance, PP_Resource decoder, | 22 void ProvidePictureBuffers(PP_Instance instance, PP_Resource decoder, |
24 uint32_t req_num_of_bufs, PP_Size dimensions) { | 23 uint32_t req_num_of_bufs, PP_Size dimensions) { |
25 HostResource decoder_resource; | 24 HostResource decoder_resource; |
26 decoder_resource.SetHostResource(instance, decoder); | 25 decoder_resource.SetHostResource(instance, decoder); |
27 | 26 |
28 HostDispatcher::GetForInstance(instance)->Send( | 27 HostDispatcher::GetForInstance(instance)->Send( |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 159 |
161 void PPP_VideoDecoder_Proxy::OnMsgNotifyError( | 160 void PPP_VideoDecoder_Proxy::OnMsgNotifyError( |
162 const HostResource& decoder, PP_VideoDecodeError_Dev error) { | 161 const HostResource& decoder, PP_VideoDecodeError_Dev error) { |
163 PP_Resource plugin_decoder = PluginResourceTracker::GetInstance()-> | 162 PP_Resource plugin_decoder = PluginResourceTracker::GetInstance()-> |
164 PluginResourceForHostResource(decoder); | 163 PluginResourceForHostResource(decoder); |
165 ppp_video_decoder_target()->NotifyError( | 164 ppp_video_decoder_target()->NotifyError( |
166 decoder.instance(), plugin_decoder, error); | 165 decoder.instance(), plugin_decoder, error); |
167 } | 166 } |
168 | 167 |
169 } // namespace proxy | 168 } // namespace proxy |
170 } // namespace pp | 169 } // namespace ppapi |
OLD | NEW |