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

Unified Diff: ppapi/api/private/ppb_video_destination_private.idl

Issue 14192054: Rename PPAPI Video Stream APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/api/private/ppb_video_destination_private.idl
diff --git a/ppapi/api/private/ppb_video_destination_private.idl b/ppapi/api/private/ppb_video_destination_private.idl
new file mode 100644
index 0000000000000000000000000000000000000000..4d2ca190b28fdfbca79474fbfdb6132c7ef44f4d
--- /dev/null
+++ b/ppapi/api/private/ppb_video_destination_private.idl
@@ -0,0 +1,95 @@
+/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/**
+ * 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.
+ */
+
+ label Chrome {
+ M28 = 0.1
+ };
+
+/**
+ * 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.
+ */
+interface PPB_VideoDestination_Private {
juberti 2013/04/24 23:46:05 I think this is reversed - a VideoSource is what e
+ /**
+ * Creates a video destination resource.
+ *
+ * @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([in] PP_Instance instance);
+
+ /**
+ * Determines if a resource is a video destination 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 destination resource or <code>PP_FALSE</code>
+ * otherwise.
+ */
+ PP_Bool IsVideoDestination([in] PP_Resource resource);
+
+ /**
+ * Opens a video destination for sending frames.
+ *
+ * @param[in] destination A <code>PP_Resource</code> corresponding to a video
+ * destination resource.
+ * @param[in] stream_id A <code>PP_Var</code> holding a string uniquely
+ * identifying a MediaStream.
+ * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
+ * completion of Open().
+ *
+ * @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([in] PP_Resource destination,
+ [in] PP_Var stream_id,
juberti 2013/04/24 23:46:05 stream_url
+ [in] PP_CompletionCallback callback);
+
+ /**
+ * Sends a frame of video 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
+ * SendFrame(), there is the possibility of artifacts because the browser may
+ * still be copying the frame to the 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 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 SendFrame([in] PP_Resource destination,
+ [in] PP_VideoFrame_Private frame);
+
+ /**
+ * Closes the video destination.
+ *
+ * @param[in] destination A <code>PP_Resource</code> corresponding to a video
+ * destination.
+ */
+ void Close([in] PP_Resource destination);
+};
+

Powered by Google App Engine
This is Rietveld 408576698