Upstream version 11.40.271.0
[platform/framework/web/crosswalk.git] / src / native_client_sdk / doc_generated / pepper_stable / cpp / classpp_1_1_video_decoder.html
1 {{+bindTo:partials.standard_nacl_api}}
2 <h1>pp::VideoDecoder Class 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
10 </div>
11 <!--header-->
12 <div class="contents">
13 <!-- doxytag: class="pp::VideoDecoder" --><!-- doxytag: inherits="pp::Resource" --><div class="dynheader">
14 Inheritance diagram for pp::VideoDecoder:</div>
15 <div class="dyncontent">
16 <div class="center"><img src="classpp_1_1_video_decoder__inherit__graph.png" border="0" usemap="#pp_1_1_video_decoder_inherit__map" alt="Inheritance graph" /></div>
17 <map name="pp_1_1_video_decoder_inherit__map" id="pp_1_1_video_decoder_inherit__map">
18 <area shape="rect" id="node2" href="classpp_1_1_resource.html" title="A reference counted module resource." alt="" coords="20,5,124,32"></area></map>
19 <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
20 <p><a href="classpp_1_1_video_decoder-members.html">List of all members.</a></p>
21 <h2>
22 Public Member Functions</h2><table class="memberdecls">
23
24 <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_video_decoder.html#afc9613c960f58ff4c97804da4645cd64">VideoDecoder</a> ()</td></tr>
25 <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_video_decoder.html#a5c7b1010b42e179cf51e55266eb1491a">VideoDecoder</a> (const <a class="el" href="classpp_1_1_instance_handle.html">InstanceHandle</a> &amp;instance)</td></tr>
26 <tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_video_decoder.html#a0eec2949dd73ef6d52b6782cee3b427d">VideoDecoder</a> (const <a class="el" href="classpp_1_1_video_decoder.html">VideoDecoder</a> &amp;other)</td></tr>
27 <tr><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_video_decoder.html#a52d1b4e5b5427d3bfb263cdec051274e">Initialize</a> (const <a class="el" href="classpp_1_1_graphics3_d.html">Graphics3D</a> &amp;graphics3d_context, PP_VideoProfile profile, PP_HardwareAcceleration acceleration, const <a class="el" href="classpp_1_1_completion_callback.html">CompletionCallback</a> &amp;callback)</td></tr>
28 <tr><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_video_decoder.html#a2f1a48cf6d2f1854b20e6a747c9b03e3">Decode</a> (uint32_t decode_id, uint32_t size, const void *buffer, const <a class="el" href="classpp_1_1_completion_callback.html">CompletionCallback</a> &amp;callback)</td></tr>
29 <tr><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_video_decoder.html#aec1a1bc95b8d3eea64b942af48dff02a">GetPicture</a> (const <a class="el" href="classpp_1_1_completion_callback_with_output.html">CompletionCallbackWithOutput</a>&lt; PP_VideoPicture &gt; &amp;callback)</td></tr>
30 <tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_video_decoder.html#a7b9c4917ebd205572a0fe69a34f1bfd9">RecyclePicture</a> (const PP_VideoPicture &amp;picture)</td></tr>
31 <tr><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_video_decoder.html#adb59ebce58f83b1c27e9c427596fb366">Flush</a> (const <a class="el" href="classpp_1_1_completion_callback.html">CompletionCallback</a> &amp;callback)</td></tr>
32 <tr><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpp_1_1_video_decoder.html#aa05481906b07e929c9567bc22a48917a">Reset</a> (const <a class="el" href="classpp_1_1_completion_callback.html">CompletionCallback</a> &amp;callback)</td></tr>
33 </table>
34 <hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
35 <div class="textblock"><p>Video decoder interface. </p>
36 <p>Typical usage:</p>
37 <ul>
38 <li>Call Create() to create a new video decoder resource.</li>
39 <li>Call <a class="el" href="classpp_1_1_video_decoder.html#a52d1b4e5b5427d3bfb263cdec051274e" title="Initializes a video decoder resource.">Initialize()</a> to initialize it with a 3d graphics context and the desired codec profile.</li>
40 <li>Call <a class="el" href="classpp_1_1_video_decoder.html#a2f1a48cf6d2f1854b20e6a747c9b03e3" title="Decodes a bitstream buffer.">Decode()</a> continuously (waiting for each previous call to complete) to push bitstream buffers to the decoder.</li>
41 <li>Call <a class="el" href="classpp_1_1_video_decoder.html#aec1a1bc95b8d3eea64b942af48dff02a" 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>
42 <li>Call <a class="el" href="classpp_1_1_video_decoder.html#adb59ebce58f83b1c27e9c427596fb366" title="Flushes the decoder.">Flush()</a> to signal end of stream to the decoder and perform shutdown when it completes.</li>
43 <li>Call <a class="el" href="classpp_1_1_video_decoder.html#aa05481906b07e929c9567bc22a48917a" 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>
44 <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>
45 </ul>
46 <p>Available video codecs vary by platform. All: theora, vorbis, vp8. Chrome and ChromeOS: aac, h264. ChromeOS: mpeg4. </p>
47 </div><hr /><h2>Constructor &amp; Destructor Documentation</h2>
48 <a class="anchor" id="afc9613c960f58ff4c97804da4645cd64"></a><!-- doxytag: member="pp::VideoDecoder::VideoDecoder" ref="afc9613c960f58ff4c97804da4645cd64" args="()" -->
49 <div class="memitem">
50 <div class="memproto">
51 <table class="memname">
52 <tr>
53 <td class="memname"><a class="el" href="classpp_1_1_video_decoder.html#afc9613c960f58ff4c97804da4645cd64">pp::VideoDecoder::VideoDecoder</a> </td>
54 <td>(</td>
55 <td class="paramname"></td><td>)</td>
56 <td></td>
57 </tr>
58 </table>
59 </div>
60 <div class="memdoc">
61 <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_video_decoder.html" title="Video decoder interface.">VideoDecoder</a></code> object. </p>
62 </div>
63 </div>
64 <a class="anchor" id="a5c7b1010b42e179cf51e55266eb1491a"></a><!-- doxytag: member="pp::VideoDecoder::VideoDecoder" ref="a5c7b1010b42e179cf51e55266eb1491a" args="(const InstanceHandle &amp;instance)" -->
65 <div class="memitem">
66 <div class="memproto">
67 <table class="memname">
68 <tr>
69 <td class="memname"><a class="el" href="classpp_1_1_video_decoder.html#afc9613c960f58ff4c97804da4645cd64">pp::VideoDecoder::VideoDecoder</a> </td>
70 <td>(</td>
71 <td class="paramtype">const <a class="el" href="classpp_1_1_instance_handle.html">InstanceHandle</a> &amp;&#160;</td>
72 <td class="paramname"><em>instance</em></td><td>)</td>
73 <td><code> [explicit]</code></td>
74 </tr>
75 </table>
76 </div>
77 <div class="memdoc">
78 <p>A constructor used to create a <code><a class="el" href="classpp_1_1_video_decoder.html" title="Video decoder interface.">VideoDecoder</a></code> and associate it with the provided <code><a class="el" href="classpp_1_1_instance.html">Instance</a></code>. </p>
79 <dl class="params"><dt><b>Parameters:</b></dt><dd>
80 <table class="params">
81 <tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>The instance with which this resource will be associated. </td></tr>
82 </table>
83 </dd>
84 </dl>
85 </div>
86 </div>
87 <a class="anchor" id="a0eec2949dd73ef6d52b6782cee3b427d"></a><!-- doxytag: member="pp::VideoDecoder::VideoDecoder" ref="a0eec2949dd73ef6d52b6782cee3b427d" args="(const VideoDecoder &amp;other)" -->
88 <div class="memitem">
89 <div class="memproto">
90 <table class="memname">
91 <tr>
92 <td class="memname"><a class="el" href="classpp_1_1_video_decoder.html#afc9613c960f58ff4c97804da4645cd64">pp::VideoDecoder::VideoDecoder</a> </td>
93 <td>(</td>
94 <td class="paramtype">const <a class="el" href="classpp_1_1_video_decoder.html">VideoDecoder</a> &amp;&#160;</td>
95 <td class="paramname"><em>other</em></td><td>)</td>
96 <td></td>
97 </tr>
98 </table>
99 </div>
100 <div class="memdoc">
101 <p>The copy constructor for <code><a class="el" href="classpp_1_1_video_decoder.html" title="Video decoder interface.">VideoDecoder</a></code>. </p>
102 <dl class="params"><dt><b>Parameters:</b></dt><dd>
103 <table class="params">
104 <tr><td class="paramdir">[in]</td><td class="paramname">other</td><td>A reference to a <code><a class="el" href="classpp_1_1_video_decoder.html" title="Video decoder interface.">VideoDecoder</a></code>. </td></tr>
105 </table>
106 </dd>
107 </dl>
108 </div>
109 </div>
110 <hr /><h2>Member Function Documentation</h2>
111 <a class="anchor" id="a2f1a48cf6d2f1854b20e6a747c9b03e3"></a><!-- doxytag: member="pp::VideoDecoder::Decode" ref="a2f1a48cf6d2f1854b20e6a747c9b03e3" args="(uint32_t decode_id, uint32_t size, const void *buffer, const CompletionCallback &amp;callback)" -->
112 <div class="memitem">
113 <div class="memproto">
114 <table class="memname">
115 <tr>
116 <td class="memname">int32_t <a class="el" href="classpp_1_1_video_decoder.html#a2f1a48cf6d2f1854b20e6a747c9b03e3">pp::VideoDecoder::Decode</a> </td>
117 <td>(</td>
118 <td class="paramtype">uint32_t&#160;</td>
119 <td class="paramname"><em>decode_id</em>, </td>
120 </tr>
121 <tr>
122 <td class="paramkey"></td>
123 <td></td>
124 <td class="paramtype">uint32_t&#160;</td>
125 <td class="paramname"><em>size</em>, </td>
126 </tr>
127 <tr>
128 <td class="paramkey"></td>
129 <td></td>
130 <td class="paramtype">const void *&#160;</td>
131 <td class="paramname"><em>buffer</em>, </td>
132 </tr>
133 <tr>
134 <td class="paramkey"></td>
135 <td></td>
136 <td class="paramtype">const <a class="el" href="classpp_1_1_completion_callback.html">CompletionCallback</a> &amp;&#160;</td>
137 <td class="paramname"><em>callback</em>&#160;</td>
138 </tr>
139 <tr>
140 <td></td>
141 <td>)</td>
142 <td></td><td></td>
143 </tr>
144 </table>
145 </div>
146 <div class="memdoc">
147 <p>Decodes a bitstream buffer. </p>
148 <p>Copies |size| bytes of data from the plugin's |buffer|. The plugin should wait until the decoder signals completion by returning PP_OK or by running |callback| before calling <a class="el" href="classpp_1_1_video_decoder.html#a2f1a48cf6d2f1854b20e6a747c9b03e3" title="Decodes a bitstream buffer.">Decode()</a> again.</p>
149 <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>
150 <p>If the call to <a class="el" href="classpp_1_1_video_decoder.html#a2f1a48cf6d2f1854b20e6a747c9b03e3" 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="classpp_1_1_video_decoder.html#a2f1a48cf6d2f1854b20e6a747c9b03e3" 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>
151 <dl class="params"><dt><b>Parameters:</b></dt><dd>
152 <table class="params">
153 <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="classpp_1_1_video_decoder.html#a2f1a48cf6d2f1854b20e6a747c9b03e3" title="Decodes a bitstream buffer.">Decode()</a> with decoded pictures returned by <a class="el" href="classpp_1_1_video_decoder.html#aec1a1bc95b8d3eea64b942af48dff02a" title="Gets the next picture from the decoder.">GetPicture()</a>. </td></tr>
154 <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Buffer size in bytes. </td></tr>
155 <tr><td class="paramdir">[in]</td><td class="paramname">buffer</td><td>Starting address of buffer. </td></tr>
156 <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 on completion.</td></tr>
157 </table>
158 </dd>
159 </dl>
160 <dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code>pp_errors.h</code>. Returns PP_ERROR_FAILED if the decoder isn't initialized or if a <a class="el" href="classpp_1_1_video_decoder.html#adb59ebce58f83b1c27e9c427596fb366" title="Flushes the decoder.">Flush()</a> or <a class="el" href="classpp_1_1_video_decoder.html#aa05481906b07e929c9567bc22a48917a" title="Resets the decoder as quickly as possible.">Reset()</a> call is pending. Returns PP_ERROR_INPROGRESS if there is another <a class="el" href="classpp_1_1_video_decoder.html#a2f1a48cf6d2f1854b20e6a747c9b03e3" title="Decodes a bitstream buffer.">Decode()</a> call pending. Returns PP_ERROR_NOMEMORY if a bitstream buffer can't be created. Returns PP_ERROR_ABORTED when <a class="el" href="classpp_1_1_video_decoder.html#aa05481906b07e929c9567bc22a48917a" title="Resets the decoder as quickly as possible.">Reset()</a> is called while <a class="el" href="classpp_1_1_video_decoder.html#a2f1a48cf6d2f1854b20e6a747c9b03e3" title="Decodes a bitstream buffer.">Decode()</a> is pending. </dd></dl>
161 </div>
162 </div>
163 <a class="anchor" id="adb59ebce58f83b1c27e9c427596fb366"></a><!-- doxytag: member="pp::VideoDecoder::Flush" ref="adb59ebce58f83b1c27e9c427596fb366" args="(const CompletionCallback &amp;callback)" -->
164 <div class="memitem">
165 <div class="memproto">
166 <table class="memname">
167 <tr>
168 <td class="memname">int32_t <a class="el" href="classpp_1_1_video_decoder.html#adb59ebce58f83b1c27e9c427596fb366">pp::VideoDecoder::Flush</a> </td>
169 <td>(</td>
170 <td class="paramtype">const <a class="el" href="classpp_1_1_completion_callback.html">CompletionCallback</a> &amp;&#160;</td>
171 <td class="paramname"><em>callback</em></td><td>)</td>
172 <td></td>
173 </tr>
174 </table>
175 </div>
176 <div class="memdoc">
177 <p>Flushes the decoder. </p>
178 <p>The plugin should call <a class="el" href="classpp_1_1_video_decoder.html#adb59ebce58f83b1c27e9c427596fb366" title="Flushes the decoder.">Flush()</a> when it reaches the end of its video stream in order to stop cleanly. The decoder will run any pending <a class="el" href="classpp_1_1_video_decoder.html#a2f1a48cf6d2f1854b20e6a747c9b03e3" title="Decodes a bitstream buffer.">Decode()</a> call to completion. The plugin should make no further calls to the decoder other than <a class="el" href="classpp_1_1_video_decoder.html#aec1a1bc95b8d3eea64b942af48dff02a" title="Gets the next picture from the decoder.">GetPicture()</a> and <a class="el" href="classpp_1_1_video_decoder.html#a7b9c4917ebd205572a0fe69a34f1bfd9" title="Recycles a picture that the plugin has received from the decoder.">RecyclePicture()</a> until the decoder signals completion by running |callback|. Just before completion, any pending <a class="el" href="classpp_1_1_video_decoder.html#aec1a1bc95b8d3eea64b942af48dff02a" title="Gets the next picture from the decoder.">GetPicture()</a> call will complete by running its callback with result PP_ERROR_ABORTED to signal that no more pictures are available. Any pictures held by the plugin remain valid during and after the flush and should be recycled back to the decoder.</p>
179 <dl class="params"><dt><b>Parameters:</b></dt><dd>
180 <table class="params">
181 <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 on completion.</td></tr>
182 </table>
183 </dd>
184 </dl>
185 <dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code>pp_errors.h</code>. Returns PP_ERROR_FAILED if the decoder isn't initialized. </dd></dl>
186 </div>
187 </div>
188 <a class="anchor" id="aec1a1bc95b8d3eea64b942af48dff02a"></a><!-- doxytag: member="pp::VideoDecoder::GetPicture" ref="aec1a1bc95b8d3eea64b942af48dff02a" args="(const CompletionCallbackWithOutput&lt; PP_VideoPicture &gt; &amp;callback)" -->
189 <div class="memitem">
190 <div class="memproto">
191 <table class="memname">
192 <tr>
193 <td class="memname">int32_t <a class="el" href="classpp_1_1_video_decoder.html#aec1a1bc95b8d3eea64b942af48dff02a">pp::VideoDecoder::GetPicture</a> </td>
194 <td>(</td>
195 <td class="paramtype">const <a class="el" href="classpp_1_1_completion_callback_with_output.html">CompletionCallbackWithOutput</a>&lt; PP_VideoPicture &gt; &amp;&#160;</td>
196 <td class="paramname"><em>callback</em></td><td>)</td>
197 <td></td>
198 </tr>
199 </table>
200 </div>
201 <div class="memdoc">
202 <p>Gets the next picture from the decoder. </p>
203 <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="classpp_1_1_video_decoder.html#aec1a1bc95b8d3eea64b942af48dff02a" 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="classpp_1_1_video_decoder.html#a7b9c4917ebd205572a0fe69a34f1bfd9" title="Recycles a picture that the plugin has received from the decoder.">RecyclePicture()</a>.</p>
204 <dl class="params"><dt><b>Parameters:</b></dt><dd>
205 <table class="params">
206 <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 on completion, and on success, to hold the picture descriptor.</td></tr>
207 </table>
208 </dd>
209 </dl>
210 <dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code>pp_errors.h</code>. Returns PP_ERROR_FAILED if the decoder isn't initialized or if a <a class="el" href="classpp_1_1_video_decoder.html#aa05481906b07e929c9567bc22a48917a" title="Resets the decoder as quickly as possible.">Reset()</a> call is pending. Returns PP_ERROR_INPROGRESS if there is another <a class="el" href="classpp_1_1_video_decoder.html#aec1a1bc95b8d3eea64b942af48dff02a" title="Gets the next picture from the decoder.">GetPicture()</a> call pending. Returns PP_ERROR_ABORTED when <a class="el" href="classpp_1_1_video_decoder.html#aa05481906b07e929c9567bc22a48917a" title="Resets the decoder as quickly as possible.">Reset()</a> is called, or if a call to <a class="el" href="classpp_1_1_video_decoder.html#adb59ebce58f83b1c27e9c427596fb366" title="Flushes the decoder.">Flush()</a> completes while <a class="el" href="classpp_1_1_video_decoder.html#aec1a1bc95b8d3eea64b942af48dff02a" title="Gets the next picture from the decoder.">GetPicture()</a> is pending. </dd></dl>
211 </div>
212 </div>
213 <a class="anchor" id="a52d1b4e5b5427d3bfb263cdec051274e"></a><!-- doxytag: member="pp::VideoDecoder::Initialize" ref="a52d1b4e5b5427d3bfb263cdec051274e" args="(const Graphics3D &amp;graphics3d_context, PP_VideoProfile profile, PP_HardwareAcceleration acceleration, const CompletionCallback &amp;callback)" -->
214 <div class="memitem">
215 <div class="memproto">
216 <table class="memname">
217 <tr>
218 <td class="memname">int32_t <a class="el" href="classpp_1_1_video_decoder.html#a52d1b4e5b5427d3bfb263cdec051274e">pp::VideoDecoder::Initialize</a> </td>
219 <td>(</td>
220 <td class="paramtype">const <a class="el" href="classpp_1_1_graphics3_d.html">Graphics3D</a> &amp;&#160;</td>
221 <td class="paramname"><em>graphics3d_context</em>, </td>
222 </tr>
223 <tr>
224 <td class="paramkey"></td>
225 <td></td>
226 <td class="paramtype">PP_VideoProfile&#160;</td>
227 <td class="paramname"><em>profile</em>, </td>
228 </tr>
229 <tr>
230 <td class="paramkey"></td>
231 <td></td>
232 <td class="paramtype">PP_HardwareAcceleration&#160;</td>
233 <td class="paramname"><em>acceleration</em>, </td>
234 </tr>
235 <tr>
236 <td class="paramkey"></td>
237 <td></td>
238 <td class="paramtype">const <a class="el" href="classpp_1_1_completion_callback.html">CompletionCallback</a> &amp;&#160;</td>
239 <td class="paramname"><em>callback</em>&#160;</td>
240 </tr>
241 <tr>
242 <td></td>
243 <td>)</td>
244 <td></td><td></td>
245 </tr>
246 </table>
247 </div>
248 <div class="memdoc">
249 <p>Initializes a video decoder resource. </p>
250 <p>This should be called after Create() and before any other functions.</p>
251 <dl class="params"><dt><b>Parameters:</b></dt><dd>
252 <table class="params">
253 <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>
254 <tr><td class="paramdir">[in]</td><td class="paramname">profile</td><td>A <code>PP_VideoProfile</code> specifying the video codec profile. </td></tr>
255 <tr><td class="paramdir">[in]</td><td class="paramname">acceleration</td><td>A <code>PP_HardwareAcceleration</code> specifying whether to use a hardware accelerated or a software implementation. </td></tr>
256 <tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>A <code>PP_CompletionCallback</code> to be called upon completion.</td></tr>
257 </table>
258 </dd>
259 </dl>
260 <dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code>pp_errors.h</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="classpp_1_1_video_decoder.html#a52d1b4e5b5427d3bfb263cdec051274e" title="Initializes a video decoder resource.">Initialize()</a> again with different parameters to find a good configuration. </dd></dl>
261 </div>
262 </div>
263 <a class="anchor" id="a7b9c4917ebd205572a0fe69a34f1bfd9"></a><!-- doxytag: member="pp::VideoDecoder::RecyclePicture" ref="a7b9c4917ebd205572a0fe69a34f1bfd9" args="(const PP_VideoPicture &amp;picture)" -->
264 <div class="memitem">
265 <div class="memproto">
266 <table class="memname">
267 <tr>
268 <td class="memname">void <a class="el" href="classpp_1_1_video_decoder.html#a7b9c4917ebd205572a0fe69a34f1bfd9">pp::VideoDecoder::RecyclePicture</a> </td>
269 <td>(</td>
270 <td class="paramtype">const PP_VideoPicture &amp;&#160;</td>
271 <td class="paramname"><em>picture</em></td><td>)</td>
272 <td></td>
273 </tr>
274 </table>
275 </div>
276 <div class="memdoc">
277 <p>Recycles a picture that the plugin has received from the decoder. </p>
278 <p>The plugin should call this as soon as it has finished using the texture so the decoder can decode more pictures.</p>
279 <dl class="params"><dt><b>Parameters:</b></dt><dd>
280 <table class="params">
281 <tr><td class="paramdir">[in]</td><td class="paramname">picture</td><td>A <code>PP_VideoPicture</code> to return to the decoder. </td></tr>
282 </table>
283 </dd>
284 </dl>
285 </div>
286 </div>
287 <a class="anchor" id="aa05481906b07e929c9567bc22a48917a"></a><!-- doxytag: member="pp::VideoDecoder::Reset" ref="aa05481906b07e929c9567bc22a48917a" args="(const CompletionCallback &amp;callback)" -->
288 <div class="memitem">
289 <div class="memproto">
290 <table class="memname">
291 <tr>
292 <td class="memname">int32_t <a class="el" href="classpp_1_1_video_decoder.html#aa05481906b07e929c9567bc22a48917a">pp::VideoDecoder::Reset</a> </td>
293 <td>(</td>
294 <td class="paramtype">const <a class="el" href="classpp_1_1_completion_callback.html">CompletionCallback</a> &amp;&#160;</td>
295 <td class="paramname"><em>callback</em></td><td>)</td>
296 <td></td>
297 </tr>
298 </table>
299 </div>
300 <div class="memdoc">
301 <p>Resets the decoder as quickly as possible. </p>
302 <p>The plugin can call <a class="el" href="classpp_1_1_video_decoder.html#aa05481906b07e929c9567bc22a48917a" title="Resets the decoder as quickly as possible.">Reset()</a> to skip to another position in the video stream. After <a class="el" href="classpp_1_1_video_decoder.html#aa05481906b07e929c9567bc22a48917a" title="Resets the decoder as quickly as possible.">Reset()</a> returns, any pending calls to <a class="el" href="classpp_1_1_video_decoder.html#a2f1a48cf6d2f1854b20e6a747c9b03e3" title="Decodes a bitstream buffer.">Decode()</a> and <a class="el" href="classpp_1_1_video_decoder.html#aec1a1bc95b8d3eea64b942af48dff02a" title="Gets the next picture from the decoder.">GetPicture()</a>) abort, causing their callbacks to run with PP_ERROR_ABORTED. The plugin should not make further calls to the decoder other than <a class="el" href="classpp_1_1_video_decoder.html#a7b9c4917ebd205572a0fe69a34f1bfd9" title="Recycles a picture that the plugin has received from the decoder.">RecyclePicture()</a> until the decoder signals completion by running |callback|. Any pictures held by the plugin remain valid during and after the reset and should be recycled back to the decoder.</p>
303 <dl class="params"><dt><b>Parameters:</b></dt><dd>
304 <table class="params">
305 <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 on completion.</td></tr>
306 </table>
307 </dd>
308 </dl>
309 <dl class="return"><dt><b>Returns:</b></dt><dd>An int32_t containing an error code from <code>pp_errors.h</code>. Returns PP_ERROR_FAILED if the decoder isn't initialized. </dd></dl>
310 </div>
311 </div>
312 <hr />The documentation for this class was generated from the following file:<ul>
313 <li><a class="el" href="video__decoder_8h.html">video_decoder.h</a></li>
314 </ul>
315 </div><!-- contents -->
316 </div>
317 {{/partials.standard_nacl_api}}