Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(978)

Side by Side Diff: ppapi/thunk/ppb_video_capture_api.h

Issue 10081020: PPAPI: Make blocking completion callbacks work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: export AssertLockHeld Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/thunk/ppb_url_loader_thunk.cc ('k') | ppapi/thunk/ppb_video_capture_thunk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef PPAPI_THUNK_VIDEO_CAPTURE_API_H_ 5 #ifndef PPAPI_THUNK_VIDEO_CAPTURE_API_H_
6 #define PPAPI_THUNK_VIDEO_CAPTURE_API_H_ 6 #define PPAPI_THUNK_VIDEO_CAPTURE_API_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/ref_counted.h"
11 #include "ppapi/c/dev/ppb_video_capture_dev.h" 12 #include "ppapi/c/dev/ppb_video_capture_dev.h"
12 13
13 namespace ppapi { 14 namespace ppapi {
14 15
15 struct DeviceRefData; 16 struct DeviceRefData;
17 class TrackedCallback;
16 18
17 namespace thunk { 19 namespace thunk {
18 20
19 class PPB_VideoCapture_API { 21 class PPB_VideoCapture_API {
20 public: 22 public:
21 virtual ~PPB_VideoCapture_API() {} 23 virtual ~PPB_VideoCapture_API() {}
22 24
23 virtual int32_t EnumerateDevices(PP_Resource* devices, 25 virtual int32_t EnumerateDevices(PP_Resource* devices,
24 const PP_CompletionCallback& callback) = 0; 26 scoped_refptr<TrackedCallback> callback) = 0;
25 virtual int32_t Open(const std::string& device_id, 27 virtual int32_t Open(const std::string& device_id,
26 const PP_VideoCaptureDeviceInfo_Dev& requested_info, 28 const PP_VideoCaptureDeviceInfo_Dev& requested_info,
27 uint32_t buffer_count, 29 uint32_t buffer_count,
28 const PP_CompletionCallback& callback) = 0; 30 scoped_refptr<TrackedCallback> callback) = 0;
29 virtual int32_t StartCapture() = 0; 31 virtual int32_t StartCapture() = 0;
30 virtual int32_t ReuseBuffer(uint32_t buffer) = 0; 32 virtual int32_t ReuseBuffer(uint32_t buffer) = 0;
31 virtual int32_t StopCapture() = 0; 33 virtual int32_t StopCapture() = 0;
32 virtual void Close() = 0; 34 virtual void Close() = 0;
33 35
34 // For backward compatibility. 36 // For backward compatibility.
35 virtual int32_t StartCapture0_1( 37 virtual int32_t StartCapture0_1(
36 const PP_VideoCaptureDeviceInfo_Dev& requested_info, 38 const PP_VideoCaptureDeviceInfo_Dev& requested_info,
37 uint32_t buffer_count) = 0; 39 uint32_t buffer_count) = 0;
38 40
39 // This function is not exposed through the C API, but returns the internal 41 // This function is not exposed through the C API, but returns the internal
40 // data for easy proxying. 42 // data for easy proxying.
41 virtual const std::vector<DeviceRefData>& GetDeviceRefData() const = 0; 43 virtual const std::vector<DeviceRefData>& GetDeviceRefData() const = 0;
42 }; 44 };
43 45
44 } // namespace thunk 46 } // namespace thunk
45 } // namespace ppapi 47 } // namespace ppapi
46 48
47 #endif // PPAPI_THUNK_VIDEO_CAPTURE_API_H_ 49 #endif // PPAPI_THUNK_VIDEO_CAPTURE_API_H_
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_url_loader_thunk.cc ('k') | ppapi/thunk/ppb_video_capture_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698