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/ppb_video_decoder_proxy.h" | 5 #include "ppapi/proxy/ppb_video_decoder_proxy.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "gpu/command_buffer/client/gles2_implementation.h" | 8 #include "gpu/command_buffer/client/gles2_implementation.h" |
9 #include "ppapi/proxy/enter_proxy.h" | 9 #include "ppapi/proxy/enter_proxy.h" |
10 #include "ppapi/proxy/plugin_dispatcher.h" | 10 #include "ppapi/proxy/plugin_dispatcher.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
219 return; | 219 return; |
220 | 220 |
221 // Make the resource and get the API pointer to its interface. | 221 // Make the resource and get the API pointer to its interface. |
222 result->SetHostResource( | 222 result->SetHostResource( |
223 instance, resource_creation.functions()->CreateVideoDecoder( | 223 instance, resource_creation.functions()->CreateVideoDecoder( |
224 instance, graphics_context.host_resource(), profile)); | 224 instance, graphics_context.host_resource(), profile)); |
225 } | 225 } |
226 | 226 |
227 void PPB_VideoDecoder_Proxy::OnMsgDecode( | 227 void PPB_VideoDecoder_Proxy::OnMsgDecode( |
228 const HostResource& decoder, | 228 const HostResource& decoder, |
229 const HostResource& buffer, int32 id, int32 size) { | 229 const HostResource& buffer, int32 id, uint32 size) { |
230 EnterHostFromHostResourceForceCallback<PPB_VideoDecoder_API> enter( | 230 EnterHostFromHostResourceForceCallback<PPB_VideoDecoder_API> enter( |
231 decoder, callback_factory_, | 231 decoder, callback_factory_, |
232 &PPB_VideoDecoder_Proxy::SendMsgEndOfBitstreamACKToPlugin, decoder, id); | 232 &PPB_VideoDecoder_Proxy::SendMsgEndOfBitstreamACKToPlugin, decoder, id); |
233 if (enter.failed()) | 233 if (enter.failed()) |
234 return; | 234 return; |
235 PP_VideoBitstreamBuffer_Dev bitstream = { id, buffer.host_resource(), size }; | 235 PP_VideoBitstreamBuffer_Dev bitstream = { id, buffer.host_resource(), size }; |
brettw
2012/12/07 23:21:54
This unsigned size is promptly assigned to a signe
| |
236 enter.SetResult(enter.object()->Decode(&bitstream, enter.callback())); | 236 enter.SetResult(enter.object()->Decode(&bitstream, enter.callback())); |
237 } | 237 } |
238 | 238 |
239 void PPB_VideoDecoder_Proxy::OnMsgAssignPictureBuffers( | 239 void PPB_VideoDecoder_Proxy::OnMsgAssignPictureBuffers( |
240 const HostResource& decoder, | 240 const HostResource& decoder, |
241 const std::vector<PP_PictureBuffer_Dev>& buffers) { | 241 const std::vector<PP_PictureBuffer_Dev>& buffers) { |
242 EnterHostFromHostResource<PPB_VideoDecoder_API> enter(decoder); | 242 EnterHostFromHostResource<PPB_VideoDecoder_API> enter(decoder); |
243 if (enter.succeeded() && !buffers.empty()) { | 243 if (enter.succeeded() && !buffers.empty()) { |
244 const PP_PictureBuffer_Dev* buffer_array = &buffers.front(); | 244 const PP_PictureBuffer_Dev* buffer_array = &buffers.front(); |
245 enter.object()->AssignPictureBuffers(buffers.size(), buffer_array); | 245 enter.object()->AssignPictureBuffers(buffers.size(), buffer_array); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
309 | 309 |
310 void PPB_VideoDecoder_Proxy::OnMsgResetACK( | 310 void PPB_VideoDecoder_Proxy::OnMsgResetACK( |
311 const HostResource& decoder, int32_t result) { | 311 const HostResource& decoder, int32_t result) { |
312 EnterPluginFromHostResource<PPB_VideoDecoder_API> enter(decoder); | 312 EnterPluginFromHostResource<PPB_VideoDecoder_API> enter(decoder); |
313 if (enter.succeeded()) | 313 if (enter.succeeded()) |
314 static_cast<VideoDecoder*>(enter.object())->ResetACK(result); | 314 static_cast<VideoDecoder*>(enter.object())->ResetACK(result); |
315 } | 315 } |
316 | 316 |
317 } // namespace proxy | 317 } // namespace proxy |
318 } // namespace ppapi | 318 } // namespace ppapi |
OLD | NEW |