Elim cr-checkbox
[chromium-blink-merge.git] / ppapi / cpp / dev / video_capture_dev.h
blob649254e5b6ff8bd47339075e5715389e41c4f8cd
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.
5 #ifndef PPAPI_CPP_DEV_VIDEO_CAPTURE_DEV_H_
6 #define PPAPI_CPP_DEV_VIDEO_CAPTURE_DEV_H_
8 #include <vector>
10 #include "ppapi/c/dev/pp_video_capture_dev.h"
11 #include "ppapi/cpp/completion_callback.h"
12 #include "ppapi/cpp/dev/device_ref_dev.h"
13 #include "ppapi/cpp/resource.h"
15 namespace pp {
17 class InstanceHandle;
19 class VideoCapture_Dev : public Resource {
20 public:
21 explicit VideoCapture_Dev(const InstanceHandle& instance);
22 VideoCapture_Dev(PP_Resource resource);
24 virtual ~VideoCapture_Dev();
26 // Returns true if the required interface is available.
27 static bool IsAvailable();
29 int32_t EnumerateDevices(
30 const CompletionCallbackWithOutput<std::vector<DeviceRef_Dev> >&
31 callback);
32 int32_t MonitorDeviceChange(PP_MonitorDeviceChangeCallback callback,
33 void* user_data);
34 int32_t Open(const DeviceRef_Dev& device_ref,
35 const PP_VideoCaptureDeviceInfo_Dev& requested_info,
36 uint32_t buffer_count,
37 const CompletionCallback& callback);
38 int32_t StartCapture();
39 int32_t ReuseBuffer(uint32_t buffer);
40 int32_t StopCapture();
41 void Close();
44 } // namespace pp
46 #endif // PPAPI_CPP_DEV_VIDEO_CAPTURE_DEV_H_