| Index: ppapi/api/private/ppb_video_source_private.idl
|
| diff --git a/ppapi/api/ppb_video_reader.idl b/ppapi/api/private/ppb_video_source_private.idl
|
| similarity index 32%
|
| rename from ppapi/api/ppb_video_reader.idl
|
| rename to ppapi/api/private/ppb_video_source_private.idl
|
| index 1c9858436aaf2f3a0b81e174faac87ade4c724e4..3fc587291c76c2eae96141f69172b9d65e07631b 100644
|
| --- a/ppapi/api/ppb_video_reader.idl
|
| +++ b/ppapi/api/private/ppb_video_source_private.idl
|
| @@ -4,8 +4,9 @@
|
| */
|
|
|
| /**
|
| - * This file defines the <code>PPB_VideoReader</code> struct for a video reader
|
| - * resource.
|
| + * This file defines the <code>PPB_VideoSource_Private</code> interface for a
|
| + * video source resource, which receives video frames from a MediaStream video
|
| + * track in the browser.
|
| */
|
|
|
| label Chrome {
|
| @@ -13,16 +14,16 @@
|
| };
|
|
|
| /**
|
| - * The <code>PPB_VideoReader</code> interface contains pointers to several
|
| - * functions for creating video reader resources and using them to consume
|
| - * streams of video frames.
|
| + * The <code>PPB_VideoSource_Private</code> interface contains pointers to
|
| + * several functions for creating video source resources and using them to
|
| + * receive video frames from a MediaStream video track in the browser.
|
| */
|
| -interface PPB_VideoReader {
|
| +interface PPB_VideoSource_Private {
|
| /**
|
| - * Creates a video reader resource.
|
| + * Creates a video source resource.
|
| *
|
| - * @param[in] instance A <code>PP_Instance</code> identifying one instance
|
| - * of a module.
|
| + * @param[in] instance A <code>PP_Instance</code> identifying an instance of
|
| + * a module.
|
| *
|
| * @return A <code>PP_Resource</code> with a nonzero ID on success or zero on
|
| * failure. Failure means the instance was invalid.
|
| @@ -30,60 +31,62 @@ interface PPB_VideoReader {
|
| PP_Resource Create([in] PP_Instance instance);
|
|
|
| /**
|
| - * Determines if a given resource is a video reader.
|
| + * Determines if a resource is a video source resource.
|
| *
|
| - * @param[in] resource A <code>PP_Resource</code> corresponding to a resource.
|
| + * @param[in] resource The <code>PP_Resource</code> to test.
|
| *
|
| * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
|
| - * resource is a video reader or <code>PP_FALSE</code> otherwise.
|
| + * resource is a video source resource or <code>PP_FALSE</code> otherwise.
|
| */
|
| - PP_Bool IsVideoReader([in] PP_Resource resource);
|
| + PP_Bool IsVideoSource([in] PP_Resource resource);
|
|
|
| /**
|
| - * Opens a video stream with the given id for reading.
|
| + * Opens a video source for getting frames.
|
| *
|
| - * @param[in] reader A <code>PP_Resource</code> corresponding to a video
|
| - * reader resource.
|
| - * @param[in] stream_id A <code>PP_Var</code> holding a string uniquely
|
| - * identifying the stream. This string is application defined.
|
| + * @param[in] source A <code>PP_Resource</code> corresponding to a video
|
| + * source resource.
|
| + * @param[in] stream_url A <code>PP_Var</code> string holding a URL
|
| + * identifying a MediaStream.
|
| * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
|
| * completion of Open().
|
| *
|
| - * @return An int32_t containing an error code from <code>pp_errors.h</code>.
|
| - * Returns PP_ERROR_BADRESOURCE if reader isn't a valid video reader.
|
| - * Returns PP_ERROR_INPROGRESS if the reader has already opened a stream.
|
| + * @return An int32_t containing a result code from <code>pp_errors.h</code>.
|
| + * Returns PP_ERROR_BADRESOURCE if source isn't a valid video source.
|
| + * Returns PP_ERROR_INPROGRESS if source is already open.
|
| + * Returns PP_ERROR_FAILED if the MediaStream doesn't exist or if there is
|
| + * some other browser error.
|
| */
|
| - int32_t Open([in] PP_Resource reader,
|
| - [in] PP_Var stream_id,
|
| + int32_t Open([in] PP_Resource source,
|
| + [in] PP_Var stream_url,
|
| [in] PP_CompletionCallback callback);
|
|
|
| /**
|
| - * Gets the next frame of video from the reader's open stream. The image data
|
| - * resource returned in the frame will have its reference count incremented by
|
| - * one and must be managed by the plugin.
|
| + * Gets a frame from the video source.
|
| + * The image data resource inside the returned frame will have its reference
|
| + * count incremented by one and must be managed by the plugin.
|
| *
|
| - * @param[in] reader A <code>PP_Resource</code> corresponding to a video
|
| - * reader resource.
|
| - * @param[out] frame A <code>PP_VideoFrame</code> to hold a video frame to
|
| - * read from the open stream.
|
| + * @param[in] source A <code>PP_Resource</code> corresponding to a video
|
| + * source resource.
|
| + * @param[out] frame A <code>PP_VideoFrame_Private</code> to hold a video
|
| + * frame from the source.
|
| * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
|
| * completion of GetNextFrame().
|
| *
|
| - * @return An int32_t containing an error code from <code>pp_errors.h</code>.
|
| - * Returns PP_ERROR_BADRESOURCE if reader isn't a valid video reader.
|
| - * Returns PP_ERROR_FAILED if the reader has not opened a stream, if the video
|
| - * frame has an invalid image data resource, or if some other error occurs.
|
| + * @return An int32_t containing a result code from <code>pp_errors.h</code>.
|
| + * Returns PP_ERROR_BADRESOURCE if source isn't a valid video source.
|
| + * Returns PP_ERROR_FAILED if the source is not open, or if some other
|
| + * browser error occurs.
|
| */
|
| - int32_t GetFrame([in] PP_Resource reader,
|
| - [out] PP_VideoFrame frame,
|
| + int32_t GetFrame([in] PP_Resource source,
|
| + [out] PP_VideoFrame_Private frame,
|
| [in] PP_CompletionCallback callback);
|
|
|
| /**
|
| - * Closes the reader's video stream.
|
| + * Closes the video source.
|
| *
|
| - * @param[in] reader A <code>PP_Resource</code> corresponding to a video
|
| - * reader resource.
|
| + * @param[in] source A <code>PP_Resource</code> corresponding to a video
|
| + * source resource.
|
| */
|
| - void Close([in] PP_Resource reader);
|
| + void Close([in] PP_Resource source);
|
| };
|
|
|
|
|