-{{+bindTo:partials.standard_nacl_article}}
+{{+bindTo:partials.standard_nacl_api}}
<h1>pp::MediaStreamVideoTrack Class Reference</h1>
<div id="doxygen-ref">
{{- dummy div to appease doxygen -}}
<div class="dyncontent">
<div class="center"><img src="classpp_1_1_media_stream_video_track__inherit__graph.png" border="0" usemap="#pp_1_1_media_stream_video_track_inherit__map" alt="Inheritance graph" /></div>
<map name="pp_1_1_media_stream_video_track_inherit__map" id="pp_1_1_media_stream_video_track_inherit__map">
-<area shape="rect" id="node2" href="classpp_1_1_resource.html" title="A reference counted module resource." alt="" coords="53,5,157,35"></area></map>
+<area shape="rect" id="node2" href="classpp_1_1_resource.html" title="A reference counted module resource." alt="" coords="52,5,156,32"></area></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<p><a href="classpp_1_1_media_stream_video_track-members.html">List of all members.</a></p>
<h2>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_video_track.html#afab1665269ee190c464473f521f5473a">MediaStreamVideoTrack</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_video_track.html#a08eec69e7bbf66c711de2821478cb4d4">MediaStreamVideoTrack</a> (const <a class="el" href="classpp_1_1_media_stream_video_track.html">MediaStreamVideoTrack</a> &other)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_video_track.html#a338b214467629e34e2d7981b1c7371e1">MediaStreamVideoTrack</a> (const <a class="el" href="classpp_1_1_resource.html">Resource</a> &resource)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_video_track.html#ad2d03ab8d65a7ca1b7f1528a07babdd6">MediaStreamVideoTrack</a> (const <a class="el" href="classpp_1_1_instance_handle.html">InstanceHandle</a> &instance)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_video_track.html#af9edc2e09f5a446493630b67ef99c557">MediaStreamVideoTrack</a> (<a class="el" href="namespacepp.html#a339083c1beec620267bf8b3c55decaa5">PassRef</a>, PP_Resource resource)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_video_track.html#a2ea78c7d8c2c7446407b5556d5992fbb">~MediaStreamVideoTrack</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_video_track.html#a1a7050062a28190a931e4b70b0e0b04d">Configure</a> (const int32_t attributes[], const <a class="el" href="classpp_1_1_completion_callback.html">CompletionCallback</a> &callback)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_video_track.html#aeea5ef2549e1caeddea6ed783d0efe32">GetFrame</a> (const <a class="el" href="classpp_1_1_completion_callback_with_output.html">CompletionCallbackWithOutput</a>< <a class="el" href="classpp_1_1_video_frame.html">VideoFrame</a> > &callback)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_video_track.html#ab3df0710c423f1c2b1e45da957bc65e4">RecycleFrame</a> (const <a class="el" href="classpp_1_1_video_frame.html">VideoFrame</a> &frame)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_video_track.html#a14c2317a98dd4f9458ba277783e57a7d">Close</a> ()</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_video_track.html#a0b37dca2ecdb94582b3cb6527328098d">GetEmptyFrame</a> (const <a class="el" href="classpp_1_1_completion_callback_with_output.html">CompletionCallbackWithOutput</a>< <a class="el" href="classpp_1_1_video_frame.html">VideoFrame</a> > &callback)</td></tr>
+<tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_video_track.html#a33a83be29146dc26f5eb2dca77131b05">PutFrame</a> (const <a class="el" href="classpp_1_1_video_frame.html">VideoFrame</a> &frame)</td></tr>
</table><h2>
Static Public Member Functions</h2><table class="memberdecls">
<tr><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_video_track.html#a53a235a74b0d6393d04d1ecda9125268">IsMediaStreamVideoTrack</a> (const <a class="el" href="classpp_1_1_resource.html">Resource</a> &resource)</td></tr>
</dl>
</div>
</div>
+<a class="anchor" id="ad2d03ab8d65a7ca1b7f1528a07babdd6"></a><!-- doxytag: member="pp::MediaStreamVideoTrack::MediaStreamVideoTrack" ref="ad2d03ab8d65a7ca1b7f1528a07babdd6" args="(const InstanceHandle &instance)" -->
+<div class="memitem">
+<div class="memproto">
+<table class="memname">
+<tr>
+<td class="memname"><a class="el" href="classpp_1_1_media_stream_video_track.html#afab1665269ee190c464473f521f5473a">pp::MediaStreamVideoTrack::MediaStreamVideoTrack</a> </td>
+<td>(</td>
+<td class="paramtype">const <a class="el" href="classpp_1_1_instance_handle.html">InstanceHandle</a> & </td>
+<td class="paramname"><em>instance</em></td><td>)</td>
+<td><code> [explicit]</code></td>
+</tr>
+</table>
+</div>
+<div class="memdoc">
+<p>Constructs a <code><a class="el" href="classpp_1_1_media_stream_video_track.html" title="The MediaStreamVideoTrack class contains methods for receiving video frames from a MediaStream video ...">MediaStreamVideoTrack</a></code> that outputs given frames to a new video track, which will be consumed by Javascript. </p>
+</div>
+</div>
<a class="anchor" id="af9edc2e09f5a446493630b67ef99c557"></a><!-- doxytag: member="pp::MediaStreamVideoTrack::MediaStreamVideoTrack" ref="af9edc2e09f5a446493630b67ef99c557" args="(PassRef, PP_Resource resource)" -->
<div class="memitem">
<div class="memproto">
</div>
<div class="memdoc">
<p>Configures underlying frame buffers for incoming frames. </p>
-<p>If the application doesn't want to drop frames, then the <code>PP_MEDIASTREAMVIDEOTRACK_ATTRIB_BUFFERED_FRAMES</code> should be chosen such that inter-frame processing time variability won't overrun the input buffer. If the buffer is overfilled, then frames will be dropped. The application can detect this by examining the timestamp on returned frames. If <code><a class="el" href="classpp_1_1_media_stream_video_track.html#a1a7050062a28190a931e4b70b0e0b04d" title="Configures underlying frame buffers for incoming frames.">Configure()</a></code> is not called, default settings will be used. Example usage from plugin code: </p>
+<p>If the application doesn't want to drop frames, then the <code>PP_MEDIASTREAMVIDEOTRACK_ATTRIB_BUFFERED_FRAMES</code> should be chosen such that inter-frame processing time variability won't overrun the input buffer. If the buffer is overfilled, then frames will be dropped. The application can detect this by examining the timestamp on returned frames. If some attributes are not specified, default values will be used for those unspecified attributes. If <code><a class="el" href="classpp_1_1_media_stream_video_track.html#a1a7050062a28190a931e4b70b0e0b04d" title="Configures underlying frame buffers for incoming frames.">Configure()</a></code> is not called, default settings will be used. Example usage from plugin code: </p>
<div class="fragment"><pre class="fragment"> int32_t attribs[] = {
PP_MEDIASTREAMVIDEOTRACK_ATTRIB_BUFFERED_FRAMES, 4,
PP_MEDIASTREAMVIDEOTRACK_ATTRIB_NONE};
</pre></div><dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">attrib_list</td><td>A list of attribute name-value pairs in which each attribute is immediately followed by the corresponding desired value. The list is terminated by <code>PP_MEDIASTREAMVIDEOTRACK_ATTRIB_NONE</code>. </td></tr>
-<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code>PP_CompletionCallback</code> to be called upon completion of <code><a class="el" href="classpp_1_1_media_stream_video_track.html#a1a7050062a28190a931e4b70b0e0b04d" title="Configures underlying frame buffers for incoming frames.">Configure()</a></code>.</td></tr>
+<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code><a class="el" href="classpp_1_1_completion_callback.html" title="This API enables you to implement and receive callbacks when Pepper operations complete asynchronousl...">CompletionCallback</a></code> to be called upon completion of <code><a class="el" href="classpp_1_1_media_stream_video_track.html#a1a7050062a28190a931e4b70b0e0b04d" title="Configures underlying frame buffers for incoming frames.">Configure()</a></code>.</td></tr>
</table>
</dd>
</dl>
-<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing a result code from <code>pp_errors.h</code>. </dd></dl>
+<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing a result code from <code>pp_errors.h</code>. Returns <code>PP_ERROR_INPROGRESS</code> if there is a pending call of <code><a class="el" href="classpp_1_1_media_stream_video_track.html#a1a7050062a28190a931e4b70b0e0b04d" title="Configures underlying frame buffers for incoming frames.">Configure()</a></code> or <code><a class="el" href="classpp_1_1_media_stream_video_track.html#aeea5ef2549e1caeddea6ed783d0efe32" title="Gets the next video frame from the MediaStream track.">GetFrame()</a></code>, or the plugin holds some frames which are not recycled with <code><a class="el" href="classpp_1_1_media_stream_video_track.html#ab3df0710c423f1c2b1e45da957bc65e4" title="Recycles a frame returned by GetFrame(), so the track can reuse the underlying buffer of this frame...">RecycleFrame()</a></code>. If an error is returned, all attributes and the underlying buffer will not be changed. </dd></dl>
</div>
</div>
<a class="anchor" id="a583de5b5879d53faf118713b1c4c7e63"></a><!-- doxytag: member="pp::MediaStreamVideoTrack::GetAttrib" ref="a583de5b5879d53faf118713b1c4c7e63" args="(PP_MediaStreamVideoTrack_Attrib attrib, int32_t *value)" -->
<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing a result code from <code>pp_errors.h</code>. </dd></dl>
</div>
</div>
+<a class="anchor" id="a0b37dca2ecdb94582b3cb6527328098d"></a><!-- doxytag: member="pp::MediaStreamVideoTrack::GetEmptyFrame" ref="a0b37dca2ecdb94582b3cb6527328098d" args="(const CompletionCallbackWithOutput< VideoFrame > &callback)" -->
+<div class="memitem">
+<div class="memproto">
+<table class="memname">
+<tr>
+<td class="memname">int32_t <a class="el" href="classpp_1_1_media_stream_video_track.html#a0b37dca2ecdb94582b3cb6527328098d">pp::MediaStreamVideoTrack::GetEmptyFrame</a> </td>
+<td>(</td>
+<td class="paramtype">const <a class="el" href="classpp_1_1_completion_callback_with_output.html">CompletionCallbackWithOutput</a>< <a class="el" href="classpp_1_1_video_frame.html">VideoFrame</a> > & </td>
+<td class="paramname"><em>callback</em></td><td>)</td>
+<td></td>
+</tr>
+</table>
+</div>
+<div class="memdoc">
+</div>
+</div>
<a class="anchor" id="aeea5ef2549e1caeddea6ed783d0efe32"></a><!-- doxytag: member="pp::MediaStreamVideoTrack::GetFrame" ref="aeea5ef2549e1caeddea6ed783d0efe32" args="(const CompletionCallbackWithOutput< VideoFrame > &callback)" -->
<div class="memitem">
<div class="memproto">
<p>If internal processing is slower than the incoming frame rate, new frames will be dropped from the incoming stream. Once the input buffer is full, frames will be dropped until <code><a class="el" href="classpp_1_1_media_stream_video_track.html#ab3df0710c423f1c2b1e45da957bc65e4" title="Recycles a frame returned by GetFrame(), so the track can reuse the underlying buffer of this frame...">RecycleFrame()</a></code> is called to free a spot for another frame to be buffered. If there are no frames in the input buffer, <code>PP_OK_COMPLETIONPENDING</code> will be returned immediately and the <code>callback</code> will be called when a new frame is received or some error happens.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
-<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code>PP_CompletionCallback</code> to be called upon completion of <code><a class="el" href="classpp_1_1_media_stream_video_track.html#aeea5ef2549e1caeddea6ed783d0efe32" title="Gets the next video frame from the MediaStream track.">GetFrame()</a></code>. If success, a <a class="el" href="classpp_1_1_video_frame.html">VideoFrame</a> will be passed into the completion callback function.</td></tr>
+<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code><a class="el" href="classpp_1_1_completion_callback_with_output.html" title="A CompletionCallbackWithOutput defines a completion callback that additionally stores a pointer to so...">CompletionCallbackWithOutput</a></code> to be called upon completion of <code><a class="el" href="classpp_1_1_media_stream_video_track.html#aeea5ef2549e1caeddea6ed783d0efe32" title="Gets the next video frame from the MediaStream track.">GetFrame()</a></code>. If success, a <a class="el" href="classpp_1_1_video_frame.html">VideoFrame</a> will be passed into the completion callback function.</td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if <code>resource</code> is a MediaStream video track. </dd></dl>
</div>
</div>
+<a class="anchor" id="a33a83be29146dc26f5eb2dca77131b05"></a><!-- doxytag: member="pp::MediaStreamVideoTrack::PutFrame" ref="a33a83be29146dc26f5eb2dca77131b05" args="(const VideoFrame &frame)" -->
+<div class="memitem">
+<div class="memproto">
+<table class="memname">
+<tr>
+<td class="memname">int32_t <a class="el" href="classpp_1_1_media_stream_video_track.html#a33a83be29146dc26f5eb2dca77131b05">pp::MediaStreamVideoTrack::PutFrame</a> </td>
+<td>(</td>
+<td class="paramtype">const <a class="el" href="classpp_1_1_video_frame.html">VideoFrame</a> & </td>
+<td class="paramname"><em>frame</em></td><td>)</td>
+<td></td>
+</tr>
+</table>
+</div>
+<div class="memdoc">
+</div>
+</div>
<a class="anchor" id="ab3df0710c423f1c2b1e45da957bc65e4"></a><!-- doxytag: member="pp::MediaStreamVideoTrack::RecycleFrame" ref="ab3df0710c423f1c2b1e45da957bc65e4" args="(const VideoFrame &frame)" -->
<div class="memitem">
<div class="memproto">
</ul>
</div><!-- contents -->
</div>
-{{/partials.standard_nacl_article}}
+{{/partials.standard_nacl_api}}