Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: ppapi/c/dev/ppp_video_capture_dev.h

Issue 7553003: Video Capture Pepper API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make Clang happy Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/c/dev/ppb_video_capture_dev.h ('k') | ppapi/ppapi_shared.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* Copyright (c) 2011 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_C_DEV_PPP_VIDEO_CAPTURE_DEV_H_
6 #define PPAPI_C_DEV_PPP_VIDEO_CAPTURE_DEV_H_
7
8 #include "ppapi/c/dev/pp_video_capture_dev.h"
9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_resource.h"
11 #include "ppapi/c/pp_stdint.h"
12
13 #define PPP_VIDEO_CAPTURE_DEV_INTERFACE_0_1 "PPP_VideoCapture(Dev);0.1"
14 #define PPP_VIDEO_CAPTURE_DEV_INTERFACE PPP_VIDEO_CAPTURE_DEV_INTERFACE_0_1
15
16 /**
17 * Video Capture client interface. See |PPB_VideoCapture_Dev| for general theory
18 * of operation.
19 */
20 struct PPP_VideoCapture_Dev {
21 /**
22 * Signals the capture device information, such as resolution and frame rate,
23 * and the array of buffers that the browser will use to send pixel data.
24 *
25 * |info| is a pointer to the PP_VideoCaptureDeviceInfo_Dev structure
26 * containing resolution and frame rate.
27 * |buffer_count| is the number of buffers, and |buffers| is the array of
28 * PPB_Buffer_Dev buffers.
29 *
30 * Note: the buffers are passed without an extra reference. The plugin is
31 * expected to add its own references to the buffers.
32 */
33 void (*OnDeviceInfo)(PP_Instance instance,
34 PP_Resource video_capture,
35 const struct PP_VideoCaptureDeviceInfo_Dev* info,
36 uint32_t buffer_count,
37 const PP_Resource* buffers);
38
39 /**
40 * Signals status changes on the VideoCapture. |status| is a
41 * one of the values from PP_VideoCaptureStatus_Dev;
42 */
43 void (*OnStatus)(PP_Instance instance,
44 PP_Resource video_capture,
45 uint32_t status);
46
47 /**
48 * Signals an error from the video capture system.
49 *
50 * Errors that can be generated:
51 * - PP_ERROR_NOMEMORY: not enough memory was available to allocate buffers.
52 * - PP_ERROR_FAILED: video capture could not start.
53 */
54 void (*OnError)(PP_Instance instance,
55 PP_Resource video_capture,
56 uint32_t error_code);
57
58 /**
59 * Signals that a buffer is available for consumption by the plugin.
60 *
61 * |buffer| is the index of the buffer, in the array returned by OnDeviceInfo.
62 */
63 void (*OnBufferReady)(PP_Instance,
64 PP_Resource video_capture,
65 uint32_t buffer);
66 };
67
68 #endif /* PPAPI_C_DEV_PPP_VIDEO_CAPTURE_DEV_H_ */
69
OLDNEW
« no previous file with comments | « ppapi/c/dev/ppb_video_capture_dev.h ('k') | ppapi/ppapi_shared.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698