{{+bindTo:partials.standard_nacl_api}}
<h1>pp::MediaStreamVideoTrack Class Reference</h1>
<div id="doxygen-ref">
{{- dummy div to appease doxygen -}}
<div>
<!-- Generated by Doxygen 1.7.6.1 -->
</div>
<!--header-->
<div class="contents">
<!-- doxytag: class="pp::MediaStreamVideoTrack" --><!-- doxytag: inherits="pp::Resource" --><div class="dynheader">
Inheritance diagram for pp::MediaStreamVideoTrack:</div>
<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="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>
Public Member Functions</h2><table class="memberdecls">
<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#a583de5b5879d53faf118713b1c4c7e63">GetAttrib</a> (PP_MediaStreamVideoTrack_Attrib attrib, int32_t *value)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_video_track.html#a7f6e47d4d127856184f6143841b52f24">GetId</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_media_stream_video_track.html#acada0b5f53399c99f3cd37c3a6a6c86d">HasEnded</a> () const </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>
</table>
<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The <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> class contains methods for receiving video frames from a MediaStream video track in the browser. </p>
</div><hr /><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="afab1665269ee190c464473f521f5473a"></a><!-- doxytag: member="pp::MediaStreamVideoTrack::MediaStreamVideoTrack" ref="afab1665269ee190c464473f521f5473a" args="()" -->
<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="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Default constructor for creating an <a class="el" href="classpp_1_1_resource.html#a859068e34cdc2dc0b78754c255323aa9" title="This functions determines if this resource is invalid or uninitialized.">is_null()</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> object. </p>
</div>
</div>
<a class="anchor" id="a08eec69e7bbf66c711de2821478cb4d4"></a><!-- doxytag: member="pp::MediaStreamVideoTrack::MediaStreamVideoTrack" ref="a08eec69e7bbf66c711de2821478cb4d4" args="(const MediaStreamVideoTrack &other)" -->
<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_media_stream_video_track.html">MediaStreamVideoTrack</a> & </td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>The copy constructor for <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>. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">other</td><td>A reference to 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>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a338b214467629e34e2d7981b1c7371e1"></a><!-- doxytag: member="pp::MediaStreamVideoTrack::MediaStreamVideoTrack" ref="a338b214467629e34e2d7981b1c7371e1" args="(const Resource &resource)" -->
<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_resource.html">Resource</a> & </td>
<td class="paramname"><em>resource</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> from a <code><a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a></code>. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code>PPB_MediaStreamVideoTrack</code> resource. </td></tr>
</table>
</dd>
</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">
<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"><a class="el" href="namespacepp.html#a339083c1beec620267bf8b3c55decaa5">PassRef</a> </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">PP_Resource </td>
<td class="paramname"><em>resource</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A constructor used when you have received a <code>PP_Resource</code> as a return value that has had 1 ref added for you. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code>PPB_MediaStreamVideoTrack</code> resource. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a2ea78c7d8c2c7446407b5556d5992fbb"></a><!-- doxytag: member="pp::MediaStreamVideoTrack::~MediaStreamVideoTrack" ref="a2ea78c7d8c2c7446407b5556d5992fbb" args="()" -->
<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#a2ea78c7d8c2c7446407b5556d5992fbb">pp::MediaStreamVideoTrack::~MediaStreamVideoTrack</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr /><h2>Member Function Documentation</h2>
<a class="anchor" id="a14c2317a98dd4f9458ba277783e57a7d"></a><!-- doxytag: member="pp::MediaStreamVideoTrack::Close" ref="a14c2317a98dd4f9458ba277783e57a7d" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classpp_1_1_media_stream_video_track.html#a14c2317a98dd4f9458ba277783e57a7d">pp::MediaStreamVideoTrack::Close</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Closes the MediaStream video track, and disconnects it from video source. </p>
<p>After calling <code><a class="el" href="classpp_1_1_media_stream_video_track.html#a14c2317a98dd4f9458ba277783e57a7d" title="Closes the MediaStream video track, and disconnects it from video source.">Close()</a></code>, no new frames will be received. </p>
</div>
</div>
<a class="anchor" id="a1a7050062a28190a931e4b70b0e0b04d"></a><!-- doxytag: member="pp::MediaStreamVideoTrack::Configure" ref="a1a7050062a28190a931e4b70b0e0b04d" args="(const int32_t attributes[], const CompletionCallback &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#a1a7050062a28190a931e4b70b0e0b04d">pp::MediaStreamVideoTrack::Configure</a> </td>
<td>(</td>
<td class="paramtype">const int32_t </td>
<td class="paramname"><em>attributes</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classpp_1_1_completion_callback.html">CompletionCallback</a> & </td>
<td class="paramname"><em>callback</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</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 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};
track.Configure(attribs, callback);
</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><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>. 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)" -->
<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#a583de5b5879d53faf118713b1c4c7e63">pp::MediaStreamVideoTrack::GetAttrib</a> </td>
<td>(</td>
<td class="paramtype">PP_MediaStreamVideoTrack_Attrib </td>
<td class="paramname"><em>attrib</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t * </td>
<td class="paramname"><em>value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets attribute value for a given attribute name. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">attrib</td><td>A <code>PP_MediaStreamVideoTrack_Attrib</code> for querying. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">value</td><td>A int32_t for storing the attribute value.</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>
</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">
<table class="memname">
<tr>
<td class="memname">int32_t <a class="el" href="classpp_1_1_media_stream_video_track.html#aeea5ef2549e1caeddea6ed783d0efe32">pp::MediaStreamVideoTrack::GetFrame</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">
<p>Gets the next video frame from the MediaStream track. </p>
<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><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>An int32_t containing a result code from <code>pp_errors.h</code>. Returns PP_ERROR_NOMEMORY if <code>max_buffered_frames</code> frames buffer was not allocated successfully. </dd></dl>
</div>
</div>
<a class="anchor" id="a7f6e47d4d127856184f6143841b52f24"></a><!-- doxytag: member="pp::MediaStreamVideoTrack::GetId" ref="a7f6e47d4d127856184f6143841b52f24" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::string <a class="el" href="classpp_1_1_media_stream_video_track.html#a7f6e47d4d127856184f6143841b52f24">pp::MediaStreamVideoTrack::GetId</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the track ID of the underlying MediaStream video track. </p>
</div>
</div>
<a class="anchor" id="acada0b5f53399c99f3cd37c3a6a6c86d"></a><!-- doxytag: member="pp::MediaStreamVideoTrack::HasEnded" ref="acada0b5f53399c99f3cd37c3a6a6c86d" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="classpp_1_1_media_stream_video_track.html#acada0b5f53399c99f3cd37c3a6a6c86d">pp::MediaStreamVideoTrack::HasEnded</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Checks whether the underlying MediaStream track has ended. </p>
<p>Calls to GetFrame while the track has ended are safe to make and will complete, but will fail. </p>
</div>
</div>
<a class="anchor" id="a53a235a74b0d6393d04d1ecda9125268"></a><!-- doxytag: member="pp::MediaStreamVideoTrack::IsMediaStreamVideoTrack" ref="a53a235a74b0d6393d04d1ecda9125268" args="(const Resource &resource)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static bool <a class="el" href="classpp_1_1_media_stream_video_track.html#a53a235a74b0d6393d04d1ecda9125268">pp::MediaStreamVideoTrack::IsMediaStreamVideoTrack</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classpp_1_1_resource.html">Resource</a> & </td>
<td class="paramname"><em>resource</em></td><td>)</td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Checks whether a <code><a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a></code> is a MediaStream video track, to test whether it is appropriate for use with the <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> constructor. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code><a class="el" href="classpp_1_1_resource.html" title="A reference counted module resource.">Resource</a></code> to test.</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">
<table class="memname">
<tr>
<td class="memname">int32_t <a class="el" href="classpp_1_1_media_stream_video_track.html#ab3df0710c423f1c2b1e45da957bc65e4">pp::MediaStreamVideoTrack::RecycleFrame</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">
<p>Recycles a frame returned by <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>, so the track can reuse the underlying buffer of this frame. </p>
<p>And the frame will become invalid. The caller should release all references it holds to <code>frame</code> and not use it anymore.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">frame</td><td>A <a class="el" href="classpp_1_1_video_frame.html">VideoFrame</a> returned by <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>.</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>
</div>
</div>
<hr />The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="media__stream__video__track_8h.html">media_stream_video_track.h</a></li>
</ul>
</div><!-- contents -->
</div>
{{/partials.standard_nacl_api}}