OLD | NEW |
1 /* Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 */ | 4 */ |
5 | 5 |
6 /* From ppb_video_writer.idl modified Thu Apr 4 13:47:32 2013. */ | 6 /* From ppb_video_writer.idl modified Fri Apr 5 15:46:57 2013. */ |
7 | 7 |
8 #ifndef PPAPI_C_PPB_VIDEO_WRITER_H_ | 8 #ifndef PPAPI_C_PPB_VIDEO_WRITER_H_ |
9 #define PPAPI_C_PPB_VIDEO_WRITER_H_ | 9 #define PPAPI_C_PPB_VIDEO_WRITER_H_ |
10 | 10 |
11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.h" |
13 #include "ppapi/c/pp_instance.h" | 13 #include "ppapi/c/pp_instance.h" |
14 #include "ppapi/c/pp_macros.h" | 14 #include "ppapi/c/pp_macros.h" |
15 #include "ppapi/c/pp_resource.h" | 15 #include "ppapi/c/pp_resource.h" |
16 #include "ppapi/c/pp_stdint.h" | 16 #include "ppapi/c/pp_stdint.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 * | 55 * |
56 * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given | 56 * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given |
57 * resource is a video writer or <code>PP_FALSE</code> otherwise. | 57 * resource is a video writer or <code>PP_FALSE</code> otherwise. |
58 */ | 58 */ |
59 PP_Bool (*IsVideoWriter)(PP_Resource resource); | 59 PP_Bool (*IsVideoWriter)(PP_Resource resource); |
60 /** | 60 /** |
61 * Opens a video stream with the given id for writing. | 61 * Opens a video stream with the given id for writing. |
62 * | 62 * |
63 * @param[in] writer A <code>PP_Resource</code> corresponding to a video | 63 * @param[in] writer A <code>PP_Resource</code> corresponding to a video |
64 * writer resource. | 64 * writer resource. |
65 * @param[in] stream_id A <code>PP_Var</code> holding a string uniquely | 65 * @param[out] stream_id A <code>PP_Var</code> holding a string uniquely |
66 * identifying the stream. This string is application defined. | 66 * identifying the stream. This string is generated by the host. |
67 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon | 67 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
68 * completion of Open(). | 68 * completion of Open(). |
69 * | 69 * |
70 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | 70 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
71 * Returns PP_ERROR_BADRESOURCE if writer isn't a valid video writer. | 71 * Returns PP_ERROR_BADRESOURCE if writer isn't a valid video writer. |
72 * Returns PP_ERROR_INPROGRESS if the writer has already opened a stream. | 72 * Returns PP_ERROR_INPROGRESS if the writer has already opened a stream. |
73 */ | 73 */ |
74 int32_t (*Open)(PP_Resource writer, | 74 int32_t (*Open)(PP_Resource writer, |
75 struct PP_Var stream_id, | 75 struct PP_Var* stream_id, |
76 struct PP_CompletionCallback callback); | 76 struct PP_CompletionCallback callback); |
77 /** | 77 /** |
78 * Puts a frame of video to the writer's open stream. | 78 * Puts a frame of video to the writer's open stream. |
79 * | 79 * |
80 * After this call, you should take care to release your references to the | 80 * After this call, you should take care to release your references to the |
81 * image embedded in the video frame. If you paint to the image after | 81 * image embedded in the video frame. If you paint to the image after |
82 * PutFrame(), there is the possibility of artifacts because the browser may | 82 * PutFrame(), there is the possibility of artifacts because the browser may |
83 * still be copying the frame to the stream. | 83 * still be copying the frame to the stream. |
84 * | 84 * |
85 * @param[in] writer A <code>PP_Resource</code> corresponding to a video | 85 * @param[in] writer A <code>PP_Resource</code> corresponding to a video |
(...skipping 16 matching lines...) Expand all Loading... |
102 void (*Close)(PP_Resource writer); | 102 void (*Close)(PP_Resource writer); |
103 }; | 103 }; |
104 | 104 |
105 typedef struct PPB_VideoWriter_0_1 PPB_VideoWriter; | 105 typedef struct PPB_VideoWriter_0_1 PPB_VideoWriter; |
106 /** | 106 /** |
107 * @} | 107 * @} |
108 */ | 108 */ |
109 | 109 |
110 #endif /* PPAPI_C_PPB_VIDEO_WRITER_H_ */ | 110 #endif /* PPAPI_C_PPB_VIDEO_WRITER_H_ */ |
111 | 111 |
OLD | NEW |