| 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 ppp_video_decoder_impl_->ProvidePictureBuffers( | 125 CallWhileUnlocked(ppp_video_decoder_impl_->ProvidePictureBuffers, |
| 126 decoder.instance(), plugin_decoder, req_num_of_bufs, &dimensions); | 126 decoder.instance(), |
| 127 plugin_decoder, |
| 128 req_num_of_bufs, |
| 129 &dimensions); |
| 127 } | 130 } |
| 128 | 131 |
| 129 void PPP_VideoDecoder_Proxy::OnMsgDismissPictureBuffer( | 132 void PPP_VideoDecoder_Proxy::OnMsgDismissPictureBuffer( |
| 130 const HostResource& decoder, int32_t picture_id) { | 133 const HostResource& decoder, int32_t picture_id) { |
| 131 PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()-> | 134 PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()-> |
| 132 PluginResourceForHostResource(decoder); | 135 PluginResourceForHostResource(decoder); |
| 133 ppp_video_decoder_impl_->DismissPictureBuffer( | 136 CallWhileUnlocked(ppp_video_decoder_impl_->DismissPictureBuffer, |
| 134 decoder.instance(), plugin_decoder, picture_id); | 137 decoder.instance(), |
| 138 plugin_decoder, |
| 139 picture_id); |
| 135 } | 140 } |
| 136 | 141 |
| 137 void PPP_VideoDecoder_Proxy::OnMsgPictureReady( | 142 void PPP_VideoDecoder_Proxy::OnMsgPictureReady( |
| 138 const HostResource& decoder, const PP_Picture_Dev& picture) { | 143 const HostResource& decoder, const PP_Picture_Dev& picture) { |
| 139 PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()-> | 144 PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()-> |
| 140 PluginResourceForHostResource(decoder); | 145 PluginResourceForHostResource(decoder); |
| 141 ppp_video_decoder_impl_->PictureReady( | 146 CallWhileUnlocked(ppp_video_decoder_impl_->PictureReady, |
| 142 decoder.instance(), plugin_decoder, &picture); | 147 decoder.instance(), |
| 148 plugin_decoder, |
| 149 &picture); |
| 143 } | 150 } |
| 144 | 151 |
| 145 void PPP_VideoDecoder_Proxy::OnMsgNotifyError( | 152 void PPP_VideoDecoder_Proxy::OnMsgNotifyError( |
| 146 const HostResource& decoder, PP_VideoDecodeError_Dev error) { | 153 const HostResource& decoder, PP_VideoDecodeError_Dev error) { |
| 147 PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()-> | 154 PP_Resource plugin_decoder = PluginGlobals::Get()->plugin_resource_tracker()-> |
| 148 PluginResourceForHostResource(decoder); | 155 PluginResourceForHostResource(decoder); |
| 149 ppp_video_decoder_impl_->NotifyError( | 156 CallWhileUnlocked(ppp_video_decoder_impl_->NotifyError, |
| 150 decoder.instance(), plugin_decoder, error); | 157 decoder.instance(), |
| 158 plugin_decoder, |
| 159 error); |
| 151 } | 160 } |
| 152 | 161 |
| 153 } // namespace proxy | 162 } // namespace proxy |
| 154 } // namespace ppapi | 163 } // namespace ppapi |
| OLD | NEW |