| Index: ppapi/c/private/ppb_video_destination_private.h
|
| diff --git a/ppapi/c/ppb_video_writer.h b/ppapi/c/private/ppb_video_destination_private.h
|
| similarity index 30%
|
| rename from ppapi/c/ppb_video_writer.h
|
| rename to ppapi/c/private/ppb_video_destination_private.h
|
| index 1aaa3acc3ed99b1be6cb9c34f216c78ecc7aa795..05a4ba9ce5fe87efd42ed9de2cb7a24aad59fbac 100644
|
| --- a/ppapi/c/ppb_video_writer.h
|
| +++ b/ppapi/c/private/ppb_video_destination_private.h
|
| @@ -3,10 +3,12 @@
|
| * found in the LICENSE file.
|
| */
|
|
|
| -/* From ppb_video_writer.idl modified Fri Apr 5 15:46:57 2013. */
|
| +/* From private/ppb_video_destination_private.idl,
|
| + * modified Wed Apr 24 18:01:20 2013.
|
| + */
|
|
|
| -#ifndef PPAPI_C_PPB_VIDEO_WRITER_H_
|
| -#define PPAPI_C_PPB_VIDEO_WRITER_H_
|
| +#ifndef PPAPI_C_PRIVATE_PPB_VIDEO_DESTINATION_PRIVATE_H_
|
| +#define PPAPI_C_PRIVATE_PPB_VIDEO_DESTINATION_PRIVATE_H_
|
|
|
| #include "ppapi/c/pp_bool.h"
|
| #include "ppapi/c/pp_completion_callback.h"
|
| @@ -16,15 +18,18 @@
|
| #include "ppapi/c/pp_stdint.h"
|
| #include "ppapi/c/pp_time.h"
|
| #include "ppapi/c/pp_var.h"
|
| -#include "ppapi/c/pp_video_frame.h"
|
| +#include "ppapi/c/private/pp_video_frame_private.h"
|
|
|
| -#define PPB_VIDEOWRITER_INTERFACE_0_1 "PPB_VideoWriter;0.1"
|
| -#define PPB_VIDEOWRITER_INTERFACE PPB_VIDEOWRITER_INTERFACE_0_1
|
| +#define PPB_VIDEODESTINATION_PRIVATE_INTERFACE_0_1 \
|
| + "PPB_VideoDestination_Private;0.1"
|
| +#define PPB_VIDEODESTINATION_PRIVATE_INTERFACE \
|
| + PPB_VIDEODESTINATION_PRIVATE_INTERFACE_0_1
|
|
|
| /**
|
| * @file
|
| - * This file defines the <code>PPB_VideoWriter</code> struct for a video writer
|
| - * resource.
|
| + * This file defines the <code>PPB_VideoDestination_Private</code> interface
|
| + * for a video destination resource. A video destination sends video frames to
|
| + * a MediaStream video track.
|
| */
|
|
|
|
|
| @@ -33,79 +38,85 @@
|
| * @{
|
| */
|
| /**
|
| - * The <code>PPB_VideoWriter</code> interface contains pointers to several
|
| - * functions for creating video writer resources and using them to generate
|
| - * streams of video frames.
|
| + * The <code>PPB_VideoDestination_Private</code> interface contains pointers to
|
| + * several functions for creating video destination resources and using them to
|
| + * send video frames to a MediaStream in the browser.
|
| */
|
| -struct PPB_VideoWriter_0_1 {
|
| +struct PPB_VideoDestination_Private_0_1 {
|
| /**
|
| - * Creates a video writer resource.
|
| + * Creates a video destination 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.
|
| */
|
| PP_Resource (*Create)(PP_Instance instance);
|
| /**
|
| - * Determines if a given resource is a video writer.
|
| + * Determines if a resource is a video destination 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 writer or <code>PP_FALSE</code> otherwise.
|
| + * resource is a video destination resource or <code>PP_FALSE</code>
|
| + * otherwise.
|
| */
|
| - PP_Bool (*IsVideoWriter)(PP_Resource resource);
|
| + PP_Bool (*IsVideoDestination)(PP_Resource resource);
|
| /**
|
| - * Opens a video stream with the given id for writing.
|
| + * Opens a video destination to receive frames.
|
| *
|
| - * @param[in] writer A <code>PP_Resource</code> corresponding to a video
|
| - * writer resource.
|
| - * @param[out] stream_id A <code>PP_Var</code> holding a string uniquely
|
| - * identifying the stream. This string is generated by the host.
|
| + * @param[in] destination A <code>PP_Resource</code> corresponding to a video
|
| + * destination 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 writer isn't a valid video writer.
|
| - * Returns PP_ERROR_INPROGRESS if the writer has already opened a stream.
|
| + * @return An int32_t containing a result code from <code>pp_errors.h</code>.
|
| + * Returns PP_ERROR_BADRESOURCE if destination isn't a valid video
|
| + * destination.
|
| + * Returns PP_ERROR_INPROGRESS if destination is already open.
|
| + * Returns PP_ERROR_FAILED if the MediaStream doesn't exist or if there is
|
| + * some other browser error.
|
| */
|
| - int32_t (*Open)(PP_Resource writer,
|
| - struct PP_Var* stream_id,
|
| + int32_t (*Open)(PP_Resource destination,
|
| + struct PP_Var stream_url,
|
| struct PP_CompletionCallback callback);
|
| /**
|
| - * Puts a frame of video to the writer's open stream.
|
| + * Passes a frame from the plugin to the video destination.
|
| *
|
| * After this call, you should take care to release your references to the
|
| * image embedded in the video frame. If you paint to the image after
|
| - * PutFrame(), there is the possibility of artifacts because the browser may
|
| + * SendFrame(), there is the possibility of artifacts because the browser may
|
| * still be copying the frame to the stream.
|
| *
|
| - * @param[in] writer A <code>PP_Resource</code> corresponding to a video
|
| - * writer resource.
|
| - * @param[in] frame A <code>PP_VideoFrame</code> holding a video frame to
|
| - * write to the open stream.
|
| + * @param[in] destination A <code>PP_Resource</code> corresponding to a video
|
| + * destination resource.
|
| + * @param[in] frame A <code>PP_VideoFrame_Private</code> holding the video
|
| + * frame to send to the destination.
|
| *
|
| - * @return An int32_t containing an error code from <code>pp_errors.h</code>.
|
| - * Returns PP_ERROR_BADRESOURCE if writer isn't a valid video writer.
|
| - * Returns PP_ERROR_FAILED if the writer 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 destination isn't a valid video
|
| + * destination.
|
| + * Returns PP_ERROR_FAILED if destination is not open, if the video frame has
|
| + * an invalid image data resource, or if some other browser error occurs.
|
| */
|
| - int32_t (*PutFrame)(PP_Resource writer, const struct PP_VideoFrame* frame);
|
| + int32_t (*ReceiveFrame)(PP_Resource destination,
|
| + const struct PP_VideoFrame_Private* frame);
|
| /**
|
| - * Closes the writer's video stream.
|
| + * Closes the video destination.
|
| *
|
| - * @param[in] writer A <code>PP_Resource</code> corresponding to a video
|
| - * writer resource.
|
| + * @param[in] destination A <code>PP_Resource</code> corresponding to a video
|
| + * destination.
|
| */
|
| - void (*Close)(PP_Resource writer);
|
| + void (*Close)(PP_Resource destination);
|
| };
|
|
|
| -typedef struct PPB_VideoWriter_0_1 PPB_VideoWriter;
|
| +typedef struct PPB_VideoDestination_Private_0_1 PPB_VideoDestination_Private;
|
| /**
|
| * @}
|
| */
|
|
|
| -#endif /* PPAPI_C_PPB_VIDEO_WRITER_H_ */
|
| +#endif /* PPAPI_C_PRIVATE_PPB_VIDEO_DESTINATION_PRIVATE_H_ */
|
|
|
|
|