OLD | NEW |
1 // Copyright (c) 2011 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> |
| 9 #include <vector> |
| 10 |
8 #include "ppapi/c/dev/ppb_video_capture_dev.h" | 11 #include "ppapi/c/dev/ppb_video_capture_dev.h" |
9 | 12 |
10 namespace ppapi { | 13 namespace ppapi { |
| 14 |
| 15 struct DeviceRefData; |
| 16 |
11 namespace thunk { | 17 namespace thunk { |
12 | 18 |
13 class PPB_VideoCapture_API { | 19 class PPB_VideoCapture_API { |
14 public: | 20 public: |
15 virtual ~PPB_VideoCapture_API() {} | 21 virtual ~PPB_VideoCapture_API() {} |
16 | 22 |
| 23 virtual int32_t EnumerateDevices(PP_CompletionCallback callback) = 0; |
| 24 virtual PP_Resource GetDevices() = 0; |
17 virtual int32_t StartCapture( | 25 virtual int32_t StartCapture( |
| 26 const std::string& device_id, |
18 const PP_VideoCaptureDeviceInfo_Dev& requested_info, | 27 const PP_VideoCaptureDeviceInfo_Dev& requested_info, |
19 uint32_t buffer_count) = 0; | 28 uint32_t buffer_count) = 0; |
20 virtual int32_t ReuseBuffer(uint32_t buffer) = 0; | 29 virtual int32_t ReuseBuffer(uint32_t buffer) = 0; |
21 virtual int32_t StopCapture() = 0; | 30 virtual int32_t StopCapture() = 0; |
| 31 |
| 32 // This function is not exposed through the C API, but returns the internal |
| 33 // data for easy proxying. |
| 34 virtual const std::vector<DeviceRefData>& GetDeviceRefData() const = 0; |
22 }; | 35 }; |
23 | 36 |
24 } // namespace thunk | 37 } // namespace thunk |
25 } // namespace ppapi | 38 } // namespace ppapi |
26 | 39 |
27 #endif // PPAPI_THUNK_VIDEO_CAPTURE_API_H_ | 40 #endif // PPAPI_THUNK_VIDEO_CAPTURE_API_H_ |
OLD | NEW |