Move render_view_context_menu.* and related files out of tab_contents.
[chromium-blink-merge.git] / ppapi / api / dev / ppp_video_capture_dev.idl
blob007870fd8f166ef44cf035784a2df9669bbbb781
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 */
6 /**
7 * This file defines the <code>PPP_VideoCapture_Dev</code> interface.
8 */
9 label Chrome {
10 M15 = 0.1
13 /**
14 * Video Capture client interface. See |PPB_VideoCapture_Dev| for general theory
15 * of operation.
17 [macro="PPP_VIDEO_CAPTURE_DEV_INTERFACE"]
18 interface PPP_VideoCapture_Dev {
19 /**
20 * Signals the capture device information, such as resolution and frame rate,
21 * and the array of buffers that the browser will use to send pixel data.
23 * |info| is a pointer to the PP_VideoCaptureDeviceInfo_Dev structure
24 * containing resolution and frame rate.
25 * |buffer_count| is the number of buffers, and |buffers| is the array of
26 * PPB_Buffer_Dev buffers.
28 * Note: the buffers are passed without an extra reference. The plugin is
29 * expected to add its own references to the buffers.
31 void OnDeviceInfo([in] PP_Instance instance,
32 [in] PP_Resource video_capture,
33 [in] PP_VideoCaptureDeviceInfo_Dev info,
34 [in] uint32_t buffer_count,
35 [in, size_is(buffer_count)] PP_Resource[] buffers);
37 /**
38 * Signals status changes on the VideoCapture. |status| is a
39 * one of the values from PP_VideoCaptureStatus_Dev;
41 void OnStatus([in] PP_Instance instance,
42 [in] PP_Resource video_capture,
43 [in] uint32_t status);
45 /**
46 * Signals an error from the video capture system.
48 * Errors that can be generated:
49 * - PP_ERROR_NOMEMORY: not enough memory was available to allocate buffers.
50 * - PP_ERROR_FAILED: video capture could not start.
52 void OnError([in] PP_Instance instance,
53 [in] PP_Resource video_capture,
54 [in] uint32_t error_code);
56 /**
57 * Signals that a buffer is available for consumption by the plugin.
59 * |buffer| is the index of the buffer, in the array returned by OnDeviceInfo.
61 void OnBufferReady([in] PP_Instance instance,
62 [in] PP_Resource video_capture,
63 [in] uint32_t buffer);