| 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/ppapi_messages.h" | 9 #include "ppapi/proxy/ppapi_messages.h" |
| 9 #include "ppapi/proxy/ppb_video_decoder_proxy.h" | 10 #include "ppapi/proxy/ppb_video_decoder_proxy.h" |
| 10 #include "ppapi/thunk/enter.h" | 11 #include "ppapi/thunk/enter.h" |
| 11 #include "ppapi/thunk/ppb_video_decoder_api.h" | 12 #include "ppapi/thunk/ppb_video_decoder_api.h" |
| 12 #include "ppapi/thunk/thunk.h" | 13 #include "ppapi/thunk/thunk.h" |
| 13 | 14 |
| 14 using ppapi::HostResource; | 15 using ppapi::HostResource; |
| 15 using ppapi::thunk::PPB_VideoDecoder_API; | 16 using ppapi::thunk::PPB_VideoDecoder_API; |
| 16 | 17 |
| 17 namespace pp { | 18 namespace pp { |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 PP_Resource plugin_decoder = PluginResourceTracker::GetInstance()-> | 147 PP_Resource plugin_decoder = PluginResourceTracker::GetInstance()-> |
| 147 PluginResourceForHostResource(decoder); | 148 PluginResourceForHostResource(decoder); |
| 148 ppp_video_decoder_target()->PictureReady( | 149 ppp_video_decoder_target()->PictureReady( |
| 149 decoder.instance(), plugin_decoder, picture); | 150 decoder.instance(), plugin_decoder, picture); |
| 150 } | 151 } |
| 151 | 152 |
| 152 void PPP_VideoDecoder_Proxy::OnMsgNotifyEndOfStream( | 153 void PPP_VideoDecoder_Proxy::OnMsgNotifyEndOfStream( |
| 153 const HostResource& decoder) { | 154 const HostResource& decoder) { |
| 154 PP_Resource plugin_decoder = PluginResourceTracker::GetInstance()-> | 155 PP_Resource plugin_decoder = PluginResourceTracker::GetInstance()-> |
| 155 PluginResourceForHostResource(decoder); | 156 PluginResourceForHostResource(decoder); |
| 156 ppp_video_decoder_target()->EndOfStream(decoder.instance(), plugin_decoder); | 157 ppp_video_decoder_target()->EndOfStream(decoder.instance(), |
| 158 plugin_decoder); |
| 157 } | 159 } |
| 158 | 160 |
| 159 void PPP_VideoDecoder_Proxy::OnMsgNotifyError( | 161 void PPP_VideoDecoder_Proxy::OnMsgNotifyError( |
| 160 const HostResource& decoder, PP_VideoDecodeError_Dev error) { | 162 const HostResource& decoder, PP_VideoDecodeError_Dev error) { |
| 161 PP_Resource plugin_decoder = PluginResourceTracker::GetInstance()-> | 163 PP_Resource plugin_decoder = PluginResourceTracker::GetInstance()-> |
| 162 PluginResourceForHostResource(decoder); | 164 PluginResourceForHostResource(decoder); |
| 163 ppp_video_decoder_target()->NotifyError( | 165 ppp_video_decoder_target()->NotifyError( |
| 164 decoder.instance(), plugin_decoder, error); | 166 decoder.instance(), plugin_decoder, error); |
| 165 } | 167 } |
| 166 | 168 |
| 167 } // namespace proxy | 169 } // namespace proxy |
| 168 } // namespace pp | 170 } // namespace pp |
| OLD | NEW |