| OLD | NEW |
| 1 /* Copyright 2014 The Chromium Authors. All rights reserved. | 1 /* Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 | 5 |
| 6 /** | 6 /** |
| 7 * Defines the <code>PPB_MediaStreamVideoTrack</code> interface. Used for | 7 * Defines the <code>PPB_MediaStreamVideoTrack</code> interface. Used for |
| 8 * receiving video frames from a MediaStream video track in the browser. | 8 * receiving video frames from a MediaStream video track in the browser. |
| 9 * This interface is still in development (Dev API status) and may change. | 9 * This interface is still in development (Dev API status) and may change. |
| 10 */ | 10 */ |
| 11 |
| 12 [generate_thunk] |
| 13 |
| 11 label Chrome { | 14 label Chrome { |
| 12 [channel=dev] M34 = 0.1 | 15 [channel=dev] M34 = 0.1 |
| 13 }; | 16 }; |
| 14 | 17 |
| 15 /** | 18 /** |
| 16 */ | 19 */ |
| 17 interface PPB_MediaStreamVideoTrack { | 20 interface PPB_MediaStreamVideoTrack { |
| 18 /** | 21 /** |
| 19 * Determines if a resource is a MediaStream video track resource. | 22 * Determines if a resource is a MediaStream video track resource. |
| 20 * | 23 * |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 /** | 61 /** |
| 59 * Checks whether the underlying MediaStream track has ended. | 62 * Checks whether the underlying MediaStream track has ended. |
| 60 * Calls to GetFrame while the track has ended are safe to make and will | 63 * Calls to GetFrame while the track has ended are safe to make and will |
| 61 * complete, but will fail. | 64 * complete, but will fail. |
| 62 * | 65 * |
| 63 * @param[in] video_track The <code>PP_Resource</code> to check. | 66 * @param[in] video_track The <code>PP_Resource</code> to check. |
| 64 * | 67 * |
| 65 * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given | 68 * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given |
| 66 * MediaStream track has ended or <code>PP_FALSE</code> otherwise. | 69 * MediaStream track has ended or <code>PP_FALSE</code> otherwise. |
| 67 */ | 70 */ |
| 71 [on_failure=PP_TRUE] |
| 68 PP_Bool HasEnded([in] PP_Resource video_track); | 72 PP_Bool HasEnded([in] PP_Resource video_track); |
| 69 | 73 |
| 70 /** | 74 /** |
| 71 * Gets the next video frame from the MediaStream track. | 75 * Gets the next video frame from the MediaStream track. |
| 72 * If internal processing is slower than the incoming frame rate, new frames | 76 * If internal processing is slower than the incoming frame rate, new frames |
| 73 * will be dropped from the incoming stream. Once the input buffer is full, | 77 * will be dropped from the incoming stream. Once the input buffer is full, |
| 74 * frames will be dropped until <code>RecycleFrame()</code> is called to free | 78 * frames will be dropped until <code>RecycleFrame()</code> is called to free |
| 75 * a spot for another frame to be buffered. | 79 * a spot for another frame to be buffered. |
| 76 * If there are no frames in the input buffer, | 80 * If there are no frames in the input buffer, |
| 77 * <code>PP_OK_COMPLETIONPENDING</code> will be returned immediately and the | 81 * <code>PP_OK_COMPLETIONPENDING</code> will be returned immediately and the |
| 78 * <code>callback</code> will be called, when a new frame is received or an | 82 * <code>callback</code> will be called when a new frame is received or an |
| 79 * error happens. | 83 * error happens. |
| 80 * If the caller holds a frame returned by the previous call of | |
| 81 * <code>GetFrame()</code>, <code>PP_ERROR_INPROGRESS</code> will be returned. | |
| 82 * The caller should recycle the previous frame before getting the next frame. | |
| 83 * | 84 * |
| 84 * @param[in] video_track A <code>PP_Resource</code> corresponding to a video | 85 * @param[in] video_track A <code>PP_Resource</code> corresponding to a video |
| 85 * resource. | 86 * resource. |
| 86 * @param[out] frame A <code>PP_Resource</code> corresponding to a VideoFrame | 87 * @param[out] frame A <code>PP_Resource</code> corresponding to a VideoFrame |
| 87 * resource. | 88 * resource. |
| 88 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon | 89 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
| 89 * completion of GetFrame(). | 90 * completion of GetFrame(). |
| 90 * | 91 * |
| 91 * @return An int32_t containing a result code from <code>pp_errors.h</code>. | 92 * @return An int32_t containing a result code from <code>pp_errors.h</code>. |
| 92 * Returns PP_ERROR_NOMEMORY if <code>max_buffered_frames</code> frames buffer | 93 * Returns PP_ERROR_NOMEMORY if <code>max_buffered_frames</code> frames buffer |
| (...skipping 22 matching lines...) Expand all Loading... |
| 115 /** | 116 /** |
| 116 * Closes the MediaStream video track and disconnects it from video source. | 117 * Closes the MediaStream video track and disconnects it from video source. |
| 117 * After calling <code>Close()</code>, no new frames will be received. | 118 * After calling <code>Close()</code>, no new frames will be received. |
| 118 * | 119 * |
| 119 * @param[in] video_track A <code>PP_Resource</code> corresponding to a | 120 * @param[in] video_track A <code>PP_Resource</code> corresponding to a |
| 120 * MediaStream video track resource. | 121 * MediaStream video track resource. |
| 121 */ | 122 */ |
| 122 void Close([in] PP_Resource video_track); | 123 void Close([in] PP_Resource video_track); |
| 123 }; | 124 }; |
| 124 | 125 |
| OLD | NEW |