| 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/ppb_video_capture_proxy.h" | 5 #include "ppapi/proxy/ppb_video_capture_proxy.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 11 #include "ppapi/c/pp_errors.h" | 11 #include "ppapi/c/pp_errors.h" |
| 12 #include "ppapi/c/pp_resource.h" | 12 #include "ppapi/c/pp_resource.h" |
| 13 #include "ppapi/c/ppb_core.h" | 13 #include "ppapi/c/ppb_core.h" |
| 14 #include "ppapi/c/dev/ppb_video_capture_dev.h" | 14 #include "ppapi/c/dev/ppb_video_capture_dev.h" |
| 15 #include "ppapi/c/dev/ppp_video_capture_dev.h" | 15 #include "ppapi/c/dev/ppp_video_capture_dev.h" |
| 16 #include "ppapi/proxy/enter_proxy.h" | 16 #include "ppapi/proxy/enter_proxy.h" |
| 17 #include "ppapi/proxy/host_dispatcher.h" | 17 #include "ppapi/proxy/host_dispatcher.h" |
| 18 #include "ppapi/proxy/plugin_dispatcher.h" | 18 #include "ppapi/proxy/plugin_dispatcher.h" |
| 19 #include "ppapi/proxy/plugin_resource.h" | 19 #include "ppapi/proxy/plugin_resource.h" |
| 20 #include "ppapi/proxy/ppapi_messages.h" | 20 #include "ppapi/proxy/ppapi_messages.h" |
| 21 #include "ppapi/proxy/ppb_buffer_proxy.h" | 21 #include "ppapi/proxy/ppb_buffer_proxy.h" |
| 22 #include "ppapi/thunk/ppb_buffer_api.h" | 22 #include "ppapi/thunk/ppb_buffer_api.h" |
| 23 #include "ppapi/thunk/ppb_buffer_trusted_api.h" | 23 #include "ppapi/thunk/ppb_buffer_trusted_api.h" |
| 24 #include "ppapi/thunk/ppb_video_capture_api.h" | 24 #include "ppapi/thunk/ppb_video_capture_api.h" |
| 25 #include "ppapi/thunk/thunk.h" | 25 #include "ppapi/thunk/thunk.h" |
| 26 | 26 |
| 27 using ppapi::HostResource; |
| 27 using ppapi::thunk::EnterResourceNoLock; | 28 using ppapi::thunk::EnterResourceNoLock; |
| 28 using ppapi::thunk::PPB_Buffer_API; | 29 using ppapi::thunk::PPB_Buffer_API; |
| 29 using ppapi::thunk::PPB_BufferTrusted_API; | 30 using ppapi::thunk::PPB_BufferTrusted_API; |
| 30 using ppapi::thunk::PPB_VideoCapture_API; | 31 using ppapi::thunk::PPB_VideoCapture_API; |
| 31 | 32 |
| 32 namespace pp { | 33 namespace pp { |
| 33 namespace proxy { | 34 namespace proxy { |
| 34 | 35 |
| 35 namespace { | 36 namespace { |
| 36 | 37 |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 PP_Resource resource = tracker->PluginResourceForHostResource(host_resource); | 444 PP_Resource resource = tracker->PluginResourceForHostResource(host_resource); |
| 444 if (!resource || !ppp_video_capture_target() || enter.failed()) | 445 if (!resource || !ppp_video_capture_target() || enter.failed()) |
| 445 return; | 446 return; |
| 446 static_cast<VideoCapture*>(enter.object())->SetBufferInUse(buffer); | 447 static_cast<VideoCapture*>(enter.object())->SetBufferInUse(buffer); |
| 447 ppp_video_capture_target()->OnBufferReady( | 448 ppp_video_capture_target()->OnBufferReady( |
| 448 host_resource.instance(), resource, buffer); | 449 host_resource.instance(), resource, buffer); |
| 449 } | 450 } |
| 450 | 451 |
| 451 } // namespace proxy | 452 } // namespace proxy |
| 452 } // namespace pp | 453 } // namespace pp |
| OLD | NEW |