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

Unified Diff: ppapi/c/ppb_media_stream_video_track.h

Issue 150403006: [PPAPI][MediaStream] Support configure for video input. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/c/ppb_media_stream_video_track.h
diff --git a/ppapi/c/ppb_media_stream_video_track.h b/ppapi/c/ppb_media_stream_video_track.h
index 650ccd2e9a5f68dfdb89a0787995154cdf098c4a..ce4f9c86520f25a240e82dd6c6f7c4ec7089bcc0 100644
--- a/ppapi/c/ppb_media_stream_video_track.h
+++ b/ppapi/c/ppb_media_stream_video_track.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_media_stream_video_track.idl modified Thu Jan 23 14:09:56 2014. */
+/* From ppb_media_stream_video_track.idl modified Wed Feb 19 11:06:48 2014. */
#ifndef PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_
#define PPAPI_C_PPB_MEDIA_STREAM_VIDEO_TRACK_H_
@@ -45,23 +45,38 @@ typedef enum {
* request at least 2 to make sure latency doesn't cause lost frames. If
* the plugin expects to hold on to more than one frame at a time (e.g. to do
* multi-frame processing), it should request that many more.
+ * If this attribute is not specified or value 0 is specified for this
+ * attribute, the default value will be used.
*/
PP_MEDIASTREAMVIDEOTRACK_ATTRIB_BUFFERED_FRAMES = 1,
/**
* The width of video frames in pixels. It should be a multiple of 4.
+ * If the specified size is different from the video source (webcam),
+ * frames will be scaled to specified size.
+ * If this attribute is not specified or value 0 is specified, the original
+ * frame size of the video track will be used.
*
* Maximum value: 4096 (4K resolution).
*/
PP_MEDIASTREAMVIDEOTRACK_ATTRIB_WIDTH = 2,
/**
* The height of video frames in pixels. It should be a multiple of 4.
+ * If the specified size is different from the video source (webcam),
+ * frames will be scaled to specified size.
+ * If this attribute is not specified or value 0 is specified, the original
+ * frame size of the video track will be used.
*
* Maximum value: 4096 (4K resolution).
*/
PP_MEDIASTREAMVIDEOTRACK_ATTRIB_HEIGHT = 3,
/**
* The format of video frames. The attribute value is
- * a <code>PP_VideoFrame_Format</code>.
+ * a <code>PP_VideoFrame_Format</code>. If the specified format is different
+ * from the video source (webcam), frames will be converted to specified
+ * format.
+ * If this attribute is not specified or value
+ * <code>PP_VIDEOFRAME_FORMAT_UNKNOWN</code> is specified, the orignal frame
+ * format of the video track will be used.
*/
PP_MEDIASTREAMVIDEOTRACK_ATTRIB_FORMAT = 4
} PP_MediaStreamVideoTrack_Attrib;
@@ -91,8 +106,9 @@ struct PPB_MediaStreamVideoTrack_0_1 { /* dev */
* chosen such that inter-frame processing time variability won't overrun the
* input buffer. If the buffer is overfilled, then frames will be dropped.
* The application can detect this by examining the timestamp on returned
- * frames. If <code>Configure()</code> is not called, default settings will be
- * used.
+ * frames. If some attributes are not specified, default values will be used
+ * for those unspecified attributes. If <code>Configure()</code> is not
+ * called, default settings will be used.
* Example usage from plugin code:
* @code
* int32_t attribs[] = {
@@ -111,6 +127,11 @@ struct PPB_MediaStreamVideoTrack_0_1 { /* dev */
* completion of <code>Configure()</code>.
*
* @return An int32_t containing a result code from <code>pp_errors.h</code>.
+ * Returns <code>PP_ERROR_INPROGRESS</code> if there is a pending call of
+ * <code>Configure()</code> or <code>GetFrame()</code>, or the plugin
+ * holds some frames which are not recycled with <code>RecycleFrame()</code>.
+ * If an error is returned, all attributes and the underlying buffer will not
+ * be changed.
*/
int32_t (*Configure)(PP_Resource video_track,
const int32_t attrib_list[],

Powered by Google App Engine
This is Rietveld 408576698