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_
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"
19 class VideoCapture_Dev
: public Resource
{
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
> >&
32 int32_t MonitorDeviceChange(PP_MonitorDeviceChangeCallback callback
,
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();
46 #endif // PPAPI_CPP_DEV_VIDEO_CAPTURE_DEV_H_