forked from sanyaade-mobiledev/chromium.src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PP_VideoFrame -> PP_VideoFrame_Private PPB_VideoReader -> PPB_VideoSource_Private PPB_VideoWriter -> PPB_VideoDestination_Private IDL, .h and C++ wrapper files are now in /private subdirectories. Renamed some methods to fit the API names better. Changed the Source Open method's stream_id param to [in]. BUG=230980 TEST=none Review URL: https://chromiumcodereview.appspot.com/14192054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196595 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
bbudge@chromium.org
committed
Apr 26, 2013
1 parent
ddeb6f9
commit b48e52e
Showing
25 changed files
with
981 additions
and
909 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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, which sends video frames to a MediaStream | ||
* video track in the browser. | ||
*/ | ||
|
||
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 video track in the browser. | ||
*/ | ||
interface PPB_VideoDestination_Private { | ||
/** | ||
* 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 putting frames. | ||
* | ||
* @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 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_url, | ||
[in] PP_CompletionCallback callback); | ||
|
||
/** | ||
* Puts a frame 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 | ||
* PutFame(), 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 PutFrame([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); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
/* 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_VideoSource_Private</code> interface for a | ||
* video source resource, which receives video frames from a MediaStream video | ||
* track in the browser. | ||
*/ | ||
|
||
label Chrome { | ||
M28 = 0.1 | ||
}; | ||
|
||
/** | ||
* 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_VideoSource_Private { | ||
/** | ||
* Creates a video source 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 source 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 source resource or <code>PP_FALSE</code> otherwise. | ||
*/ | ||
PP_Bool IsVideoSource([in] PP_Resource resource); | ||
|
||
/** | ||
* Opens a video source for getting frames. | ||
* | ||
* @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 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 source, | ||
[in] PP_Var stream_url, | ||
[in] PP_CompletionCallback callback); | ||
|
||
/** | ||
* 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] 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 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 source, | ||
[out] PP_VideoFrame_Private frame, | ||
[in] PP_CompletionCallback callback); | ||
|
||
/** | ||
* Closes the video source. | ||
* | ||
* @param[in] source A <code>PP_Resource</code> corresponding to a video | ||
* source resource. | ||
*/ | ||
void Close([in] PP_Resource source); | ||
}; | ||
|
Oops, something went wrong.