Upstream version 11.40.271.0
[platform/framework/web/crosswalk.git] / src / native_client_sdk / doc_generated / pepper_beta / c / struct_p_p_b___video_decoder__0__2.html
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>
13 Data 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__2.html#aaca90b3aba351b89cd777c8c563360c4">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__2.html#a3748268a6df835f3eb661b0c690c37bb">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__2.html#a821341ce72fe1db025913f562626b119">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#ga6a3fd7e22be02521243b52481afadae5">PP_HardwareAcceleration</a> acceleration, 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__2.html#ad2e85b80316537e0e01724e1b1875a15">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__2.html#a53284466cb36653f3d91a4889b292811">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__2.html#a30fbc6abf22cae02032bdc713ee41d1e">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__2.html#a1a85da162f50990f318ff8bff61ceacc">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__2.html#a4697495911e69da035d786dc69ce22ca">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__2.html#aaca90b3aba351b89cd777c8c563360c4" 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__2.html#a821341ce72fe1db025913f562626b119" 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__2.html#ad2e85b80316537e0e01724e1b1875a15" 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__2.html#a53284466cb36653f3d91a4889b292811" 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__2.html#a1a85da162f50990f318ff8bff61ceacc" 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__2.html#a4697495911e69da035d786dc69ce22ca" 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="aaca90b3aba351b89cd777c8c563360c4"></a><!-- doxytag: member="PPB_VideoDecoder::Create" ref="aaca90b3aba351b89cd777c8c563360c4" 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__2.html#aaca90b3aba351b89cd777c8c563360c4">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="ad2e85b80316537e0e01724e1b1875a15"></a><!-- doxytag: member="PPB_VideoDecoder::Decode" ref="ad2e85b80316537e0e01724e1b1875a15" 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__2.html#ad2e85b80316537e0e01724e1b1875a15">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 wait until the decoder signals completion by returning PP_OK or by running |callback| before calling <a class="el" href="struct_p_p_b___video_decoder__0__2.html#ad2e85b80316537e0e01724e1b1875a15" title="Decodes a bitstream buffer.">Decode()</a> again.</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__2.html#ad2e85b80316537e0e01724e1b1875a15" 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__2.html#ad2e85b80316537e0e01724e1b1875a15" 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__2.html#ad2e85b80316537e0e01724e1b1875a15" title="Decodes a bitstream buffer.">Decode()</a> with decoded pictures returned by <a class="el" href="struct_p_p_b___video_decoder__0__2.html#a53284466cb36653f3d91a4889b292811" 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>. Returns PP_ERROR_FAILED if the decoder isn't initialized or if a <a class="el" href="struct_p_p_b___video_decoder__0__2.html#a1a85da162f50990f318ff8bff61ceacc" title="Flushes the decoder.">Flush()</a> or <a class="el" href="struct_p_p_b___video_decoder__0__2.html#a4697495911e69da035d786dc69ce22ca" 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="struct_p_p_b___video_decoder__0__2.html#ad2e85b80316537e0e01724e1b1875a15" 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="struct_p_p_b___video_decoder__0__2.html#a4697495911e69da035d786dc69ce22ca" title="Resets the decoder as quickly as possible.">Reset()</a> is called while <a class="el" href="struct_p_p_b___video_decoder__0__2.html#ad2e85b80316537e0e01724e1b1875a15" title="Decodes a bitstream buffer.">Decode()</a> is pending. </dd></dl>
83 </div>
84 </div>
85 <a class="anchor" id="a1a85da162f50990f318ff8bff61ceacc"></a><!-- doxytag: member="PPB_VideoDecoder::Flush" ref="a1a85da162f50990f318ff8bff61ceacc" 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__2.html#a1a85da162f50990f318ff8bff61ceacc">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 <a class="el" href="struct_p_p_b___video_decoder__0__2.html#a1a85da162f50990f318ff8bff61ceacc" 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="struct_p_p_b___video_decoder__0__2.html#ad2e85b80316537e0e01724e1b1875a15" 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="struct_p_p_b___video_decoder__0__2.html#a53284466cb36653f3d91a4889b292811" title="Gets the next picture from the decoder.">GetPicture()</a> and <a class="el" href="struct_p_p_b___video_decoder__0__2.html#a30fbc6abf22cae02032bdc713ee41d1e" 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="struct_p_p_b___video_decoder__0__2.html#a53284466cb36653f3d91a4889b292811" 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>
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>. Returns PP_ERROR_FAILED if the decoder isn't initialized. </dd></dl>
105 </div>
106 </div>
107 <a class="anchor" id="a53284466cb36653f3d91a4889b292811"></a><!-- doxytag: member="PPB_VideoDecoder::GetPicture" ref="a53284466cb36653f3d91a4889b292811" 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__2.html#a53284466cb36653f3d91a4889b292811">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__2.html#a53284466cb36653f3d91a4889b292811" 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__2.html#a30fbc6abf22cae02032bdc713ee41d1e" 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_ERROR_FAILED if the decoder isn't initialized or if a <a class="el" href="struct_p_p_b___video_decoder__0__2.html#a4697495911e69da035d786dc69ce22ca" 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="struct_p_p_b___video_decoder__0__2.html#a53284466cb36653f3d91a4889b292811" title="Gets the next picture from the decoder.">GetPicture()</a> call pending. Returns PP_ERROR_ABORTED when <a class="el" href="struct_p_p_b___video_decoder__0__2.html#a4697495911e69da035d786dc69ce22ca" 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__2.html#a1a85da162f50990f318ff8bff61ceacc" title="Flushes the decoder.">Flush()</a> completes while <a class="el" href="struct_p_p_b___video_decoder__0__2.html#a53284466cb36653f3d91a4889b292811" title="Gets the next picture from the decoder.">GetPicture()</a> is pending. </dd></dl>
128 </div>
129 </div>
130 <a class="anchor" id="a821341ce72fe1db025913f562626b119"></a><!-- doxytag: member="PPB_VideoDecoder::Initialize" ref="a821341ce72fe1db025913f562626b119" args=")(PP_Resource video_decoder, PP_Resource graphics3d_context, PP_VideoProfile profile, PP_HardwareAcceleration acceleration, 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__2.html#a821341ce72fe1db025913f562626b119">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#ga6a3fd7e22be02521243b52481afadae5">PP_HardwareAcceleration</a> acceleration, 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__2.html#aaca90b3aba351b89cd777c8c563360c4" 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">acceleration</td><td>A <code>PP_HardwareAcceleration</code> specifying whether to use a hardware accelerated or a software implementation. </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__2.html#a821341ce72fe1db025913f562626b119" 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="a3748268a6df835f3eb661b0c690c37bb"></a><!-- doxytag: member="PPB_VideoDecoder::IsVideoDecoder" ref="a3748268a6df835f3eb661b0c690c37bb" 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__2.html#a3748268a6df835f3eb661b0c690c37bb">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="a30fbc6abf22cae02032bdc713ee41d1e"></a><!-- doxytag: member="PPB_VideoDecoder::RecyclePicture" ref="a30fbc6abf22cae02032bdc713ee41d1e" 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__2.html#a30fbc6abf22cae02032bdc713ee41d1e">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="a4697495911e69da035d786dc69ce22ca"></a><!-- doxytag: member="PPB_VideoDecoder::Reset" ref="a4697495911e69da035d786dc69ce22ca" 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__2.html#a4697495911e69da035d786dc69ce22ca">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__2.html#a4697495911e69da035d786dc69ce22ca" title="Resets the decoder as quickly as possible.">Reset()</a> to skip to another position in the video stream. After <a class="el" href="struct_p_p_b___video_decoder__0__2.html#a4697495911e69da035d786dc69ce22ca" title="Resets the decoder as quickly as possible.">Reset()</a> returns, any pending calls to <a class="el" href="struct_p_p_b___video_decoder__0__2.html#ad2e85b80316537e0e01724e1b1875a15" title="Decodes a bitstream buffer.">Decode()</a> and <a class="el" href="struct_p_p_b___video_decoder__0__2.html#a53284466cb36653f3d91a4889b292811" 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="struct_p_p_b___video_decoder__0__2.html#a30fbc6abf22cae02032bdc713ee41d1e" 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>
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>. Returns PP_ERROR_FAILED if the decoder isn't initialized. </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}}