Pepper_56_C++_interfaces
Pepper_56_C++_interfaces
 All Classes Namespaces Files Functions Typedefs Enumerations Macros Groups
video_capture_dev.h
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
3 // found in the LICENSE file.
4 
5 #ifndef PPAPI_CPP_DEV_VIDEO_CAPTURE_DEV_H_
6 #define PPAPI_CPP_DEV_VIDEO_CAPTURE_DEV_H_
7 
8 #include <stdint.h>
9 
10 #include <vector>
11 
12 #include "ppapi/c/dev/pp_video_capture_dev.h"
14 #include "ppapi/cpp/dev/device_ref_dev.h"
15 #include "ppapi/cpp/resource.h"
16 
17 namespace pp {
18 
19 class InstanceHandle;
20 
21 class VideoCapture_Dev : public Resource {
22  public:
23  explicit VideoCapture_Dev(const InstanceHandle& instance);
24  VideoCapture_Dev(PP_Resource resource);
25 
26  virtual ~VideoCapture_Dev();
27 
28  // Returns true if the required interface is available.
29  static bool IsAvailable();
30 
31  int32_t EnumerateDevices(
32  const CompletionCallbackWithOutput<std::vector<DeviceRef_Dev> >&
33  callback);
34  int32_t MonitorDeviceChange(PP_MonitorDeviceChangeCallback callback,
35  void* user_data);
36  int32_t Open(const DeviceRef_Dev& device_ref,
37  const PP_VideoCaptureDeviceInfo_Dev& requested_info,
38  uint32_t buffer_count,
39  const CompletionCallback& callback);
40  int32_t StartCapture();
41  int32_t ReuseBuffer(uint32_t buffer);
42  int32_t StopCapture();
43  void Close();
44 };
45 
46 } // namespace pp
47 
48 #endif // PPAPI_CPP_DEV_VIDEO_CAPTURE_DEV_H_
Definition: completion_callback.h:189
Definition: completion_callback.h:26
Definition: instance_handle.h:44
Definition: video_capture_dev.h:21
Definition: device_ref_dev.h:14
A reference counted module resource.
Definition: resource.h:20