summaryrefslogtreecommitdiffstats
path: root/ppapi/api
diff options
context:
space:
mode:
authoryzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-02 01:42:26 +0000
committeryzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-02 01:42:26 +0000
commitac22933cf0a514c841856e6274df8f2000ae8203 (patch)
treeae048ff421b30e4c60b72eb07cda878fc1c1cc56 /ppapi/api
parente6eb86b608c189886296e345adf282297f6dd426 (diff)
downloadchromium_src-ac22933cf0a514c841856e6274df8f2000ae8203.zip
chromium_src-ac22933cf0a514c841856e6274df8f2000ae8203.tar.gz
chromium_src-ac22933cf0a514c841856e6274df8f2000ae8203.tar.bz2
Add IDL file for PPP_VideoCapture_Dev.
BUG=None TEST=None Review URL: https://chromiumcodereview.appspot.com/11026010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159613 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/api')
-rw-r--r--ppapi/api/dev/ppp_video_capture_dev.idl64
1 files changed, 64 insertions, 0 deletions
diff --git a/ppapi/api/dev/ppp_video_capture_dev.idl b/ppapi/api/dev/ppp_video_capture_dev.idl
new file mode 100644
index 0000000..007870f
--- /dev/null
+++ b/ppapi/api/dev/ppp_video_capture_dev.idl
@@ -0,0 +1,64 @@
+/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/**
+ * This file defines the <code>PPP_VideoCapture_Dev</code> interface.
+ */
+label Chrome {
+ M15 = 0.1
+};
+
+/**
+ * Video Capture client interface. See |PPB_VideoCapture_Dev| for general theory
+ * of operation.
+ */
+[macro="PPP_VIDEO_CAPTURE_DEV_INTERFACE"]
+interface PPP_VideoCapture_Dev {
+ /**
+ * Signals the capture device information, such as resolution and frame rate,
+ * and the array of buffers that the browser will use to send pixel data.
+ *
+ * |info| is a pointer to the PP_VideoCaptureDeviceInfo_Dev structure
+ * containing resolution and frame rate.
+ * |buffer_count| is the number of buffers, and |buffers| is the array of
+ * PPB_Buffer_Dev buffers.
+ *
+ * Note: the buffers are passed without an extra reference. The plugin is
+ * expected to add its own references to the buffers.
+ */
+ void OnDeviceInfo([in] PP_Instance instance,
+ [in] PP_Resource video_capture,
+ [in] PP_VideoCaptureDeviceInfo_Dev info,
+ [in] uint32_t buffer_count,
+ [in, size_is(buffer_count)] PP_Resource[] buffers);
+
+ /**
+ * Signals status changes on the VideoCapture. |status| is a
+ * one of the values from PP_VideoCaptureStatus_Dev;
+ */
+ void OnStatus([in] PP_Instance instance,
+ [in] PP_Resource video_capture,
+ [in] uint32_t status);
+
+ /**
+ * Signals an error from the video capture system.
+ *
+ * Errors that can be generated:
+ * - PP_ERROR_NOMEMORY: not enough memory was available to allocate buffers.
+ * - PP_ERROR_FAILED: video capture could not start.
+ */
+ void OnError([in] PP_Instance instance,
+ [in] PP_Resource video_capture,
+ [in] uint32_t error_code);
+
+ /**
+ * Signals that a buffer is available for consumption by the plugin.
+ *
+ * |buffer| is the index of the buffer, in the array returned by OnDeviceInfo.
+ */
+ void OnBufferReady([in] PP_Instance instance,
+ [in] PP_Resource video_capture,
+ [in] uint32_t buffer);
+};