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

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

Issue 11274036: Refactor video capture to new design (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: export Created 8 years, 1 month 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
« no previous file with comments | « ppapi/thunk/ppb_flash_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 "base/memory/ref_counted.h"
12 #include "ppapi/c/dev/ppb_video_capture_dev.h" 12 #include "ppapi/c/dev/ppb_video_capture_dev.h"
13 #include "ppapi/c/pp_array_output.h"
14 #include "ppapi/c/pp_resource.h"
13 15
14 namespace ppapi { 16 namespace ppapi {
15 17
16 struct DeviceRefData; 18 struct DeviceRefData;
17 class TrackedCallback; 19 class TrackedCallback;
18 20
19 namespace thunk { 21 namespace thunk {
20 22
21 class PPB_VideoCapture_API { 23 class PPB_VideoCapture_API {
22 public: 24 public:
23 virtual ~PPB_VideoCapture_API() {} 25 virtual ~PPB_VideoCapture_API() {}
24 26
25 virtual int32_t EnumerateDevices(PP_Resource* devices, 27 virtual int32_t EnumerateDevices(PP_Resource* devices,
26 scoped_refptr<TrackedCallback> callback) = 0; 28 scoped_refptr<TrackedCallback> callback) = 0;
27 virtual int32_t Open(const std::string& device_id, 29 virtual int32_t Open(const std::string& device_id,
28 const PP_VideoCaptureDeviceInfo_Dev& requested_info, 30 const PP_VideoCaptureDeviceInfo_Dev& requested_info,
29 uint32_t buffer_count, 31 uint32_t buffer_count,
30 scoped_refptr<TrackedCallback> callback) = 0; 32 scoped_refptr<TrackedCallback> callback) = 0;
31 virtual int32_t StartCapture() = 0; 33 virtual int32_t StartCapture() = 0;
32 virtual int32_t ReuseBuffer(uint32_t buffer) = 0; 34 virtual int32_t ReuseBuffer(uint32_t buffer) = 0;
33 virtual int32_t StopCapture() = 0; 35 virtual int32_t StopCapture() = 0;
34 virtual void Close() = 0; 36 virtual void Close() = 0;
35 37
36 // For backward compatibility. 38 // This function is not exposed through the C API. It is only used by flash
37 virtual int32_t StartCapture0_1( 39 // to make synchronous device enumeration.
38 const PP_VideoCaptureDeviceInfo_Dev& requested_info, 40 virtual int32_t EnumerateDevicesSync(const PP_ArrayOutput& devices) = 0;
39 uint32_t buffer_count) = 0;
40
41 // This function is not exposed through the C API, but returns the internal
42 // data for easy proxying.
43 virtual const std::vector<DeviceRefData>& GetDeviceRefData() const = 0;
44 }; 41 };
45 42
46 } // namespace thunk 43 } // namespace thunk
47 } // namespace ppapi 44 } // namespace ppapi
48 45
49 #endif // PPAPI_THUNK_VIDEO_CAPTURE_API_H_ 46 #endif // PPAPI_THUNK_VIDEO_CAPTURE_API_H_
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_flash_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