OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_globals.h" | 8 #include "ppapi/proxy/plugin_globals.h" |
9 #include "ppapi/proxy/plugin_resource_tracker.h" | 9 #include "ppapi/proxy/plugin_resource_tracker.h" |
10 #include "ppapi/proxy/ppapi_messages.h" | 10 #include "ppapi/proxy/ppapi_messages.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 IPC_END_MESSAGE_MAP() | 115 IPC_END_MESSAGE_MAP() |
116 DCHECK(handled); | 116 DCHECK(handled); |
117 return handled; | 117 return handled; |
118 } | 118 } |
119 | 119 |
120 void PPP_VideoDecoder_Proxy::OnMsgProvidePictureBuffers( | 120 void PPP_VideoDecoder_Proxy::OnMsgProvidePictureBuffers( |
121 const HostResource& decoder, uint32_t req_num_of_bufs, | 121 const HostResource& decoder, uint32_t req_num_of_bufs, |
122 const PP_Size& dimensions) { | 122 const PP_Size& dimensions) { |
123 PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()-> | 123 PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()-> |
124 PluginResourceForHostResource(decoder); | 124 PluginResourceForHostResource(decoder); |
125 CallWhileUnlocked(ppp_video_decoder_impl_->ProvidePictureBuffers, | 125 ppp_video_decoder_impl_->ProvidePictureBuffers( |
126 decoder.instance(), | 126 decoder.instance(), plugin_decoder, req_num_of_bufs, &dimensions); |
127 plugin_decoder, | |
128 req_num_of_bufs, | |
129 &dimensions); | |
130 } | 127 } |
131 | 128 |
132 void PPP_VideoDecoder_Proxy::OnMsgDismissPictureBuffer( | 129 void PPP_VideoDecoder_Proxy::OnMsgDismissPictureBuffer( |
133 const HostResource& decoder, int32_t picture_id) { | 130 const HostResource& decoder, int32_t picture_id) { |
134 PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()-> | 131 PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()-> |
135 PluginResourceForHostResource(decoder); | 132 PluginResourceForHostResource(decoder); |
136 CallWhileUnlocked(ppp_video_decoder_impl_->DismissPictureBuffer, | 133 ppp_video_decoder_impl_->DismissPictureBuffer( |
137 decoder.instance(), | 134 decoder.instance(), plugin_decoder, picture_id); |
138 plugin_decoder, | |
139 picture_id); | |
140 } | 135 } |
141 | 136 |
142 void PPP_VideoDecoder_Proxy::OnMsgPictureReady( | 137 void PPP_VideoDecoder_Proxy::OnMsgPictureReady( |
143 const HostResource& decoder, const PP_Picture_Dev& picture) { | 138 const HostResource& decoder, const PP_Picture_Dev& picture) { |
144 PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()-> | 139 PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()-> |
145 PluginResourceForHostResource(decoder); | 140 PluginResourceForHostResource(decoder); |
146 CallWhileUnlocked(ppp_video_decoder_impl_->PictureReady, | 141 ppp_video_decoder_impl_->PictureReady( |
147 decoder.instance(), | 142 decoder.instance(), plugin_decoder, &picture); |
148 plugin_decoder, | |
149 &picture); | |
150 } | 143 } |
151 | 144 |
152 void PPP_VideoDecoder_Proxy::OnMsgNotifyError( | 145 void PPP_VideoDecoder_Proxy::OnMsgNotifyError( |
153 const HostResource& decoder, PP_VideoDecodeError_Dev error) { | 146 const HostResource& decoder, PP_VideoDecodeError_Dev error) { |
154 PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()-> | 147 PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()-> |
155 PluginResourceForHostResource(decoder); | 148 PluginResourceForHostResource(decoder); |
156 CallWhileUnlocked(ppp_video_decoder_impl_->NotifyError, | 149 ppp_video_decoder_impl_->NotifyError( |
157 decoder.instance(), | 150 decoder.instance(), plugin_decoder, error); |
158 plugin_decoder, | |
159 error); | |
160 } | 151 } |
161 | 152 |
162 } // namespace proxy | 153 } // namespace proxy |
163 } // namespace ppapi | 154 } // namespace ppapi |
OLD | NEW |