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

Side by Side Diff: ppapi/api/ppb_video_writer.idl

Issue 13461010: Add PP_VideoFrame, PPB_VideoReader, and PPB_VideoWriter APIs to Pepper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refine API per comments, fix some typos. Created 7 years, 8 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/api/ppb_video_reader.idl ('k') | ppapi/c/pp_video_frame.h » ('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) 2013 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
6 /**
7 * This file defines the <code>PPB_VideoWriter</code> struct for a video writer
8 * resource.
9 */
10
11 label Chrome {
12 M28 = 1.0
13 };
14
15 /**
16 * The <code>PPB_VideoWriter</code> interface contains pointers to several
17 * functions for creating video writer resources and using them to generate
18 * streams of video frames.
19 */
20 interface PPB_VideoWriter {
21 /**
22 * Creates a video writer resource.
23 *
24 * @param[in] instance A <code>PP_Instance</code> identifying one instance
25 * of a module.
26 *
27 * @return A <code>PP_Resource</code> with a nonzero ID on success or zero on
28 * failure. Failure means the instance was invalid.
29 */
30 PP_Resource Create([in] PP_Instance instance);
31
32 /**
33 * Determines if a given resource is a video writer.
34 *
35 * @param[in] resource A <code>PP_Resource</code> corresponding to a resource.
36 *
37 * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
38 * resource is a video writer or <code>PP_FALSE</code> otherwise.
39 */
40 PP_Bool IsVideoWriter([in] PP_Resource resource);
41
42 /**
43 * Opens a video stream with the given id for writing.
44 *
45 * @param[in] writer A <code>PP_Resource</code> corresponding to a video
46 * writer resource.
47 * @param[in] stream_id A <code>PP_Var</code> holding a string uniquely
48 * identifying the stream. This string is application defined.
49 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
50 * completion of Open().
51 *
52 * @return An int32_t containing an error code from <code>pp_errors.h</code>.
53 * Returns PP_ERROR_BADRESOURCE if writer isn't a valid video writer.
54 * Returns PP_ERROR_INPROGRESS if the writer has already opened a stream.
55 */
56 int32_t Open([in] PP_Resource writer,
57 [in] PP_Var stream_id,
58 [in] PP_CompletionCallback callback);
59
60 /**
61 * Emits a frame of video to the writer's open stream.
62 *
63 * @param[in] writer A <code>PP_Resource</code> corresponding to a video
64 * writer resource.
65 * @param[in] frame A <code>PP_VideoFrame</code> holding a video frame to
66 * write to the open stream.
bbudge 2013/04/03 21:29:14 We need a comment here about who owns the frame. O
67 *
68 * @return An int32_t containing an error code from <code>pp_errors.h</code>.
69 * Returns PP_ERROR_BADRESOURCE if writer isn't a valid video writer.
70 * Returns PP_ERROR_FAILED if the writer has not opened a stream, if the video
71 * frame has an invalid image data resource, or if some other error occurs.
72 */
73 int32_t PutNextFrame([in] PP_Resource writer,
74 [in] PP_VideoFrame frame);
75
76 /**
77 * Closes the writer's video stream.
78 *
79 * @param[in] writer A <code>PP_Resource</code> corresponding to a video
80 * writer resource.
81 */
82 void Close([in] PP_Resource writer);
83 };
84
OLDNEW
« no previous file with comments | « ppapi/api/ppb_video_reader.idl ('k') | ppapi/c/pp_video_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698