struct_p_p_b___video_decoder__0__1.html revision f8ee788a64d60abd8f2d742a5fdedde054ecd910
1{{+bindTo:partials.standard_nacl_api}}
2<h1>PPB_VideoDecoder Struct Reference</h1>
3<div id="doxygen-ref">
4{{- dummy div to appease doxygen -}}
5  <div>
6<!-- Generated by Doxygen 1.7.6.1 -->
7
8
9</div>
10<!--header-->
11<div class="contents">
12<!-- doxytag: class="PPB_VideoDecoder" --><h2>
13Data Fields</h2><table class="memberdecls">
14
15<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___video_decoder__0__1.html#aab2c846ae7cf8c15e5337f8c768e3b27">Create</a> )(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance)</td></tr>
16<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___video_decoder__0__1.html#afe3b784d87af6e4856e8bc6c6bb6629d">IsVideoDecoder</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource)</td></tr>
17<tr><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___video_decoder__0__1.html#a477ac82814cc6677b082c6044df81b18">Initialize</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> video_decoder, <a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> graphics3d_context, <a class="el" href="group___enums.html#ga4d50d27186f68b2de578e82162206fea">PP_VideoProfile</a> profile, <a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a> allow_software_fallback, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td></tr>
18<tr><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___video_decoder__0__1.html#a8e2c5a3b99eff16845b8335be36e6d4c">Decode</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> video_decoder, uint32_t decode_id, uint32_t size, const void *buffer, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td></tr>
19<tr><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___video_decoder__0__1.html#aa058b25aa12485118536fb42130b367a">GetPicture</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> video_decoder, struct <a class="el" href="struct_p_p___video_picture.html">PP_VideoPicture</a> *picture, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td></tr>
20<tr><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___video_decoder__0__1.html#ae65877f22dc977a0747271809a741297">RecyclePicture</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> video_decoder, const struct <a class="el" href="struct_p_p___video_picture.html">PP_VideoPicture</a> *picture)</td></tr>
21<tr><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___video_decoder__0__1.html#a56052b4cdde98dbed1f8fdc3df379eb4">Flush</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> video_decoder, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td></tr>
22<tr><td class="memItemLeft" align="right" valign="top">int32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___video_decoder__0__1.html#a0ad3178247894ca37eadd796d157581a">Reset</a> )(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> video_decoder, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td></tr>
23</table>
24<hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
25<div class="textblock"><p>Video decoder interface. </p>
26<p>Typical usage:</p>
27<ul>
28<li>Call <a class="el" href="struct_p_p_b___video_decoder__0__1.html#aab2c846ae7cf8c15e5337f8c768e3b27" title="Creates a new video decoder resource.">Create()</a> to create a new video decoder resource.</li>
29<li>Call <a class="el" href="struct_p_p_b___video_decoder__0__1.html#a477ac82814cc6677b082c6044df81b18" title="Initializes a video decoder resource.">Initialize()</a> to initialize it with a 3d graphics context and the desired codec profile.</li>
30<li>Call <a class="el" href="struct_p_p_b___video_decoder__0__1.html#a8e2c5a3b99eff16845b8335be36e6d4c" title="Decodes a bitstream buffer.">Decode()</a> continuously (waiting for each previous call to complete) to push bitstream buffers to the decoder.</li>
31<li>Call <a class="el" href="struct_p_p_b___video_decoder__0__1.html#aa058b25aa12485118536fb42130b367a" title="Gets the next picture from the decoder.">GetPicture()</a> continuously (waiting for each previous call to complete) to pull decoded pictures from the decoder.</li>
32<li>Call <a class="el" href="struct_p_p_b___video_decoder__0__1.html#a56052b4cdde98dbed1f8fdc3df379eb4" title="Flushes the decoder.">Flush()</a> to signal end of stream to the decoder and perform shutdown when it completes.</li>
33<li>Call <a class="el" href="struct_p_p_b___video_decoder__0__1.html#a0ad3178247894ca37eadd796d157581a" title="Resets the decoder as quickly as possible.">Reset()</a> to quickly stop the decoder (e.g. to implement Seek) and wait for the callback before restarting decoding at another point.</li>
34<li>To destroy the decoder, the plugin should release all of its references to it. Any pending callbacks will abort before the decoder is destroyed.</li>
35</ul>
36<p>Available video codecs vary by platform. All: theora, vorbis, vp8. Chrome and ChromeOS: aac, h264. ChromeOS: mpeg4. </p>
37</div><hr /><h2>Field Documentation</h2>
38<a class="anchor" id="aab2c846ae7cf8c15e5337f8c768e3b27"></a><!-- doxytag: member="PPB_VideoDecoder::Create" ref="aab2c846ae7cf8c15e5337f8c768e3b27" args=")(PP_Instance instance)" -->
39<div class="memitem">
40<div class="memproto">
41<table class="memname">
42<tr>
43<td class="memname"><a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a>(* <a class="el" href="struct_p_p_b___video_decoder__0__1.html#aab2c846ae7cf8c15e5337f8c768e3b27">PPB_VideoDecoder::Create</a>)(<a class="el" href="group___typedefs.html#ga89b662403e6a687bb914b80114c0d19d">PP_Instance</a> instance)</td>
44</tr>
45</table>
46</div>
47<div class="memdoc">
48<p>Creates a new video decoder resource. </p>
49<dl class="params"><dt><b>Parameters:</b></dt><dd>
50<table class="params">
51<tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>A <code>PP_Instance</code> identifying the instance with the video decoder.</td></tr>
52</table>
53</dd>
54</dl>
55<dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_Resource</code> corresponding to a video decoder if successful or 0 otherwise. </dd></dl>
56</div>
57</div>
58<a class="anchor" id="a8e2c5a3b99eff16845b8335be36e6d4c"></a><!-- doxytag: member="PPB_VideoDecoder::Decode" ref="a8e2c5a3b99eff16845b8335be36e6d4c" args=")(PP_Resource video_decoder, uint32_t decode_id, uint32_t size, const void *buffer, struct PP_CompletionCallback callback)" -->
59<div class="memitem">
60<div class="memproto">
61<table class="memname">
62<tr>
63<td class="memname">int32_t(* <a class="el" href="struct_p_p_b___video_decoder__0__1.html#a8e2c5a3b99eff16845b8335be36e6d4c">PPB_VideoDecoder::Decode</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> video_decoder, uint32_t decode_id, uint32_t size, const void *buffer, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td>
64</tr>
65</table>
66</div>
67<div class="memdoc">
68<p>Decodes a bitstream buffer. </p>
69<p>Copies |size| bytes of data from the plugin's |buffer|. The plugin should maintain the buffer and not call <a class="el" href="struct_p_p_b___video_decoder__0__1.html#a8e2c5a3b99eff16845b8335be36e6d4c" title="Decodes a bitstream buffer.">Decode()</a> again until the decoder signals completion by returning PP_OK or by running |callback|.</p>
70<p>In general, each bitstream buffer should contain a demuxed bitstream frame for the selected video codec. For example, H264 decoders expect to receive one AnnexB NAL unit, including the 4 byte start code prefix, while VP8 decoders expect to receive a bitstream frame without the IVF frame header.</p>
71<p>If the call to <a class="el" href="struct_p_p_b___video_decoder__0__1.html#a8e2c5a3b99eff16845b8335be36e6d4c" title="Decodes a bitstream buffer.">Decode()</a> eventually results in a picture, the |decode_id| parameter is copied into the returned picture. The plugin can use this to associate decoded pictures with <a class="el" href="struct_p_p_b___video_decoder__0__1.html#a8e2c5a3b99eff16845b8335be36e6d4c" title="Decodes a bitstream buffer.">Decode()</a> calls (e.g. to assign timestamps or frame numbers to pictures.) This value is opaque to the API so the plugin is free to pass any value.</p>
72<dl class="params"><dt><b>Parameters:</b></dt><dd>
73<table class="params">
74<tr><td class="paramdir">[in]</td><td class="paramname">video_decoder</td><td>A <code>PP_Resource</code> identifying the video decoder. </td></tr>
75<tr><td class="paramdir">[in]</td><td class="paramname">decode_id</td><td>An optional value, chosen by the plugin, that can be used to associate calls to <a class="el" href="struct_p_p_b___video_decoder__0__1.html#a8e2c5a3b99eff16845b8335be36e6d4c" title="Decodes a bitstream buffer.">Decode()</a> with decoded pictures returned by <a class="el" href="struct_p_p_b___video_decoder__0__1.html#aa058b25aa12485118536fb42130b367a" title="Gets the next picture from the decoder.">GetPicture()</a>. </td></tr>
76<tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Buffer size in bytes. </td></tr>
77<tr><td class="paramdir">[in]</td><td class="paramname">buffer</td><td>Starting address of buffer. </td></tr>
78<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code><a class="el" href="struct_p_p___completion_callback.html" title="PP_CompletionCallback is a common mechanism for supporting potentially asynchronous calls in browser ...">PP_CompletionCallback</a></code> to be called on completion.</td></tr>
79</table>
80</dd>
81</dl>
82<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code><a class="el" href="pp__errors_8h.html" title="This file defines an enumeration of all PPAPI error codes.">pp_errors.h</a></code>. </dd></dl>
83</div>
84</div>
85<a class="anchor" id="a56052b4cdde98dbed1f8fdc3df379eb4"></a><!-- doxytag: member="PPB_VideoDecoder::Flush" ref="a56052b4cdde98dbed1f8fdc3df379eb4" args=")(PP_Resource video_decoder, struct PP_CompletionCallback callback)" -->
86<div class="memitem">
87<div class="memproto">
88<table class="memname">
89<tr>
90<td class="memname">int32_t(* <a class="el" href="struct_p_p_b___video_decoder__0__1.html#a56052b4cdde98dbed1f8fdc3df379eb4">PPB_VideoDecoder::Flush</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> video_decoder, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td>
91</tr>
92</table>
93</div>
94<div class="memdoc">
95<p>Flushes the decoder. </p>
96<p>The plugin should call this when it reaches the end of its video stream in order to stop cleanly. The decoder will run all pending calls to completion. The plugin should make no further calls to the decoder other than <a class="el" href="struct_p_p_b___video_decoder__0__1.html#aa058b25aa12485118536fb42130b367a" title="Gets the next picture from the decoder.">GetPicture()</a> and <a class="el" href="struct_p_p_b___video_decoder__0__1.html#ae65877f22dc977a0747271809a741297" title="Recycles a picture that the plugin has received from the decoder.">RecyclePicture()</a> until the decoder signals completion by running the callback. Just before completion, any pending <a class="el" href="struct_p_p_b___video_decoder__0__1.html#aa058b25aa12485118536fb42130b367a" title="Gets the next picture from the decoder.">GetPicture()</a> call will complete by running the callback with result PP_ERROR_ABORTED to signal that no more pictures are available.</p>
97<dl class="params"><dt><b>Parameters:</b></dt><dd>
98<table class="params">
99<tr><td class="paramdir">[in]</td><td class="paramname">video_decoder</td><td>A <code>PP_Resource</code> identifying the video decoder. </td></tr>
100<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code><a class="el" href="struct_p_p___completion_callback.html" title="PP_CompletionCallback is a common mechanism for supporting potentially asynchronous calls in browser ...">PP_CompletionCallback</a></code> to be called on completion.</td></tr>
101</table>
102</dd>
103</dl>
104<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code><a class="el" href="pp__errors_8h.html" title="This file defines an enumeration of all PPAPI error codes.">pp_errors.h</a></code>. </dd></dl>
105</div>
106</div>
107<a class="anchor" id="aa058b25aa12485118536fb42130b367a"></a><!-- doxytag: member="PPB_VideoDecoder::GetPicture" ref="aa058b25aa12485118536fb42130b367a" args=")(PP_Resource video_decoder, struct PP_VideoPicture *picture, struct PP_CompletionCallback callback)" -->
108<div class="memitem">
109<div class="memproto">
110<table class="memname">
111<tr>
112<td class="memname">int32_t(* <a class="el" href="struct_p_p_b___video_decoder__0__1.html#aa058b25aa12485118536fb42130b367a">PPB_VideoDecoder::GetPicture</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> video_decoder, struct <a class="el" href="struct_p_p___video_picture.html">PP_VideoPicture</a> *picture, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td>
113</tr>
114</table>
115</div>
116<div class="memdoc">
117<p>Gets the next picture from the decoder. </p>
118<p>The picture is valid after the decoder signals completion by returning PP_OK or running |callback|. The plugin can call <a class="el" href="struct_p_p_b___video_decoder__0__1.html#aa058b25aa12485118536fb42130b367a" title="Gets the next picture from the decoder.">GetPicture()</a> again after the decoder signals completion. When the plugin is finished using the picture, it should return it to the system by calling <a class="el" href="struct_p_p_b___video_decoder__0__1.html#ae65877f22dc977a0747271809a741297" title="Recycles a picture that the plugin has received from the decoder.">RecyclePicture()</a>.</p>
119<dl class="params"><dt><b>Parameters:</b></dt><dd>
120<table class="params">
121<tr><td class="paramdir">[in]</td><td class="paramname">video_decoder</td><td>A <code>PP_Resource</code> identifying the video decoder. </td></tr>
122<tr><td class="paramdir">[out]</td><td class="paramname">picture</td><td>A <code><a class="el" href="struct_p_p___video_picture.html" title="Struct describing a decoded video picture.">PP_VideoPicture</a></code> to hold the decoded picture. </td></tr>
123<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code><a class="el" href="struct_p_p___completion_callback.html" title="PP_CompletionCallback is a common mechanism for supporting potentially asynchronous calls in browser ...">PP_CompletionCallback</a></code> to be called on completion.</td></tr>
124</table>
125</dd>
126</dl>
127<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code><a class="el" href="pp__errors_8h.html" title="This file defines an enumeration of all PPAPI error codes.">pp_errors.h</a></code>. Returns PP_OK if a picture is available. Returns PP_ERROR_ABORTED when <a class="el" href="struct_p_p_b___video_decoder__0__1.html#a0ad3178247894ca37eadd796d157581a" title="Resets the decoder as quickly as possible.">Reset()</a> is called, or if a call to <a class="el" href="struct_p_p_b___video_decoder__0__1.html#a56052b4cdde98dbed1f8fdc3df379eb4" title="Flushes the decoder.">Flush()</a> completes while <a class="el" href="struct_p_p_b___video_decoder__0__1.html#aa058b25aa12485118536fb42130b367a" title="Gets the next picture from the decoder.">GetPicture()</a> is pending. </dd></dl>
128</div>
129</div>
130<a class="anchor" id="a477ac82814cc6677b082c6044df81b18"></a><!-- doxytag: member="PPB_VideoDecoder::Initialize" ref="a477ac82814cc6677b082c6044df81b18" args=")(PP_Resource video_decoder, PP_Resource graphics3d_context, PP_VideoProfile profile, PP_Bool allow_software_fallback, struct PP_CompletionCallback callback)" -->
131<div class="memitem">
132<div class="memproto">
133<table class="memname">
134<tr>
135<td class="memname">int32_t(* <a class="el" href="struct_p_p_b___video_decoder__0__1.html#a477ac82814cc6677b082c6044df81b18">PPB_VideoDecoder::Initialize</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> video_decoder, <a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> graphics3d_context, <a class="el" href="group___enums.html#ga4d50d27186f68b2de578e82162206fea">PP_VideoProfile</a> profile, <a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a> allow_software_fallback, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td>
136</tr>
137</table>
138</div>
139<div class="memdoc">
140<p>Initializes a video decoder resource. </p>
141<p>This should be called after <a class="el" href="struct_p_p_b___video_decoder__0__1.html#aab2c846ae7cf8c15e5337f8c768e3b27" title="Creates a new video decoder resource.">Create()</a> and before any other functions.</p>
142<dl class="params"><dt><b>Parameters:</b></dt><dd>
143<table class="params">
144<tr><td class="paramdir">[in]</td><td class="paramname">video_decoder</td><td>A <code>PP_Resource</code> identifying the video decoder. </td></tr>
145<tr><td class="paramdir">[in]</td><td class="paramname">graphics3d_context</td><td>A <code>PPB_Graphics3D</code> resource to use during decoding. </td></tr>
146<tr><td class="paramdir">[in]</td><td class="paramname">profile</td><td>A <code>PP_VideoProfile</code> specifying the video codec profile. </td></tr>
147<tr><td class="paramdir">[in]</td><td class="paramname">allow_software_fallback</td><td>A <code>PP_Bool</code> specifying whether the decoder can fall back to software decoding if a suitable hardware decoder isn't available. </td></tr>
148<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code><a class="el" href="struct_p_p___completion_callback.html" title="PP_CompletionCallback is a common mechanism for supporting potentially asynchronous calls in browser ...">PP_CompletionCallback</a></code> to be called upon completion.</td></tr>
149</table>
150</dd>
151</dl>
152<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code><a class="el" href="pp__errors_8h.html" title="This file defines an enumeration of all PPAPI error codes.">pp_errors.h</a></code>. Returns PP_ERROR_NOTSUPPORTED if video decoding is not available, or the requested profile is not supported. In this case, the client may call <a class="el" href="struct_p_p_b___video_decoder__0__1.html#a477ac82814cc6677b082c6044df81b18" title="Initializes a video decoder resource.">Initialize()</a> again with different parameters to find a good configuration. </dd></dl>
153</div>
154</div>
155<a class="anchor" id="afe3b784d87af6e4856e8bc6c6bb6629d"></a><!-- doxytag: member="PPB_VideoDecoder::IsVideoDecoder" ref="afe3b784d87af6e4856e8bc6c6bb6629d" args=")(PP_Resource resource)" -->
156<div class="memitem">
157<div class="memproto">
158<table class="memname">
159<tr>
160<td class="memname"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* <a class="el" href="struct_p_p_b___video_decoder__0__1.html#afe3b784d87af6e4856e8bc6c6bb6629d">PPB_VideoDecoder::IsVideoDecoder</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> resource)</td>
161</tr>
162</table>
163</div>
164<div class="memdoc">
165<p>Determines if the given resource is a video decoder. </p>
166<dl class="params"><dt><b>Parameters:</b></dt><dd>
167<table class="params">
168<tr><td class="paramdir">[in]</td><td class="paramname">resource</td><td>A <code>PP_Resource</code> identifying a resource.</td></tr>
169</table>
170</dd>
171</dl>
172<dl class="return"><dt><b>Returns:</b></dt><dd><code>PP_TRUE</code> if the resource is a <code>PPB_VideoDecoder</code>, <code>PP_FALSE</code> if the resource is invalid or some other type. </dd></dl>
173</div>
174</div>
175<a class="anchor" id="ae65877f22dc977a0747271809a741297"></a><!-- doxytag: member="PPB_VideoDecoder::RecyclePicture" ref="ae65877f22dc977a0747271809a741297" args=")(PP_Resource video_decoder, const struct PP_VideoPicture *picture)" -->
176<div class="memitem">
177<div class="memproto">
178<table class="memname">
179<tr>
180<td class="memname">void(* <a class="el" href="struct_p_p_b___video_decoder__0__1.html#ae65877f22dc977a0747271809a741297">PPB_VideoDecoder::RecyclePicture</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> video_decoder, const struct <a class="el" href="struct_p_p___video_picture.html">PP_VideoPicture</a> *picture)</td>
181</tr>
182</table>
183</div>
184<div class="memdoc">
185<p>Recycles a picture that the plugin has received from the decoder. </p>
186<p>The plugin should call this as soon as it has finished using the texture so the decoder can decode more pictures.</p>
187<dl class="params"><dt><b>Parameters:</b></dt><dd>
188<table class="params">
189<tr><td class="paramdir">[in]</td><td class="paramname">video_decoder</td><td>A <code>PP_Resource</code> identifying the video decoder. </td></tr>
190<tr><td class="paramdir">[in]</td><td class="paramname">picture</td><td>A <code><a class="el" href="struct_p_p___video_picture.html" title="Struct describing a decoded video picture.">PP_VideoPicture</a></code> to return to the decoder. </td></tr>
191</table>
192</dd>
193</dl>
194</div>
195</div>
196<a class="anchor" id="a0ad3178247894ca37eadd796d157581a"></a><!-- doxytag: member="PPB_VideoDecoder::Reset" ref="a0ad3178247894ca37eadd796d157581a" args=")(PP_Resource video_decoder, struct PP_CompletionCallback callback)" -->
197<div class="memitem">
198<div class="memproto">
199<table class="memname">
200<tr>
201<td class="memname">int32_t(* <a class="el" href="struct_p_p_b___video_decoder__0__1.html#a0ad3178247894ca37eadd796d157581a">PPB_VideoDecoder::Reset</a>)(<a class="el" href="group___typedefs.html#gafdc3895ee80f4750d0d95ae1b677e9b7">PP_Resource</a> video_decoder, struct <a class="el" href="struct_p_p___completion_callback.html">PP_CompletionCallback</a> callback)</td>
202</tr>
203</table>
204</div>
205<div class="memdoc">
206<p>Resets the decoder as quickly as possible. </p>
207<p>The plugin can call <a class="el" href="struct_p_p_b___video_decoder__0__1.html#a0ad3178247894ca37eadd796d157581a" title="Resets the decoder as quickly as possible.">Reset()</a> to skip to another position in the video stream. Pending calls to <a class="el" href="struct_p_p_b___video_decoder__0__1.html#a8e2c5a3b99eff16845b8335be36e6d4c" title="Decodes a bitstream buffer.">Decode()</a> and <a class="el" href="struct_p_p_b___video_decoder__0__1.html#aa058b25aa12485118536fb42130b367a" title="Gets the next picture from the decoder.">GetPicture()</a>) are immediately aborted, causing their callbacks to run with PP_ERROR_ABORTED. The plugin should not make any further calls to the decoder until the decoder signals completion by running |callback|.</p>
208<dl class="params"><dt><b>Parameters:</b></dt><dd>
209<table class="params">
210<tr><td class="paramdir">[in]</td><td class="paramname">video_decoder</td><td>A <code>PP_Resource</code> identifying the video decoder. </td></tr>
211<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code><a class="el" href="struct_p_p___completion_callback.html" title="PP_CompletionCallback is a common mechanism for supporting potentially asynchronous calls in browser ...">PP_CompletionCallback</a></code> to be called on completion.</td></tr>
212</table>
213</dd>
214</dl>
215<dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code><a class="el" href="pp__errors_8h.html" title="This file defines an enumeration of all PPAPI error codes.">pp_errors.h</a></code>. </dd></dl>
216</div>
217</div>
218<hr />The documentation for this struct was generated from the following file:<ul>
219<li><a class="el" href="ppb__video__decoder_8h.html">ppb_video_decoder.h</a></li>
220</ul>
221</div><!-- contents -->
222</div>
223{{/partials.standard_nacl_api}}
224