/usr/share/doc/libtheora-doc/html/group__decfuncs.html is in libtheora-doc 1.1.1+dfsg.1-14.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>libtheora: Functions for Decoding</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libtheora
 <span id="projectnumber">1.1.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">Functions for Decoding</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Functions for decoding</h2></td></tr>
<tr><td class="ititle" colspan="2"><p><a class="anchor" id="amgrp9d29c94aa62f20426aa5ff062c7daedd"></a>You must link to <code>libtheoradec</code> if you use any of the functions in this section.</p>
<p>The functions are listed in the order they are used in a typical decode. The basic steps are:</p><ul>
<li>Parse the header packets by repeatedly calling <a class="el" href="group__decfuncs.html#ga006d01d36fbe64768c571e6a12b7fc50" title="Decodes the header packets of a Theora stream. ">th_decode_headerin()</a>.</li>
<li>Allocate a <a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729" title="The decoder context. ">th_dec_ctx</a> handle with <a class="el" href="group__decfuncs.html#ga0ef07a9a97849054aa606c595a2d807e" title="Allocates a decoder instance. ">th_decode_alloc()</a>.</li>
<li>Call <a class="el" href="group__decfuncs.html#gadef55431b68aaa59d0d7b32b2f118f27" title="Releases all storage used for the decoder setup information. ">th_setup_free()</a> to free any memory used for codec setup information.</li>
<li>Perform any additional decoder configuration with <a class="el" href="group__decfuncs.html#ga1a8051958d75b1012573b6e3c8f670e1" title="Decoder control function. ">th_decode_ctl()</a>.</li>
<li>For each video data packet:<ul>
<li>Submit the packet to the decoder via <a class="el" href="group__decfuncs.html#ga31c814bf09b2232aff69c57ae20f04eb" title="Submits a packet containing encoded video data to the decoder. ">th_decode_packetin()</a>.</li>
<li>Retrieve the uncompressed video data via <a class="el" href="group__decfuncs.html#gaa9cc8af63fa8540e0fc95572f259cdcb" title="Outputs the next available frame of decoded Y'CbCr data. ">th_decode_ycbcr_out()</a>.</li>
</ul>
</li>
<li>Call <a class="el" href="group__decfuncs.html#gafb6684ad8ba507b71112bc9de148e7d0" title="Frees an allocated decoder instance. ">th_decode_free()</a> to release all decoder memory. </li>
</ul>
</td></tr>
<tr class="memitem:ga006d01d36fbe64768c571e6a12b7fc50"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__decfuncs.html#ga006d01d36fbe64768c571e6a12b7fc50">th_decode_headerin</a> (<a class="el" href="structth__info.html">th_info</a> *_info, <a class="el" href="structth__comment.html">th_comment</a> *_tc, <a class="el" href="theoradec_8h.html#ab71cd2657455cc27d6c0127c66a89f28">th_setup_info</a> **_setup, ogg_packet *_op)</td></tr>
<tr class="memdesc:ga006d01d36fbe64768c571e6a12b7fc50"><td class="mdescLeft"> </td><td class="mdescRight">Decodes the header packets of a Theora stream. <a href="#ga006d01d36fbe64768c571e6a12b7fc50">More...</a><br /></td></tr>
<tr class="separator:ga006d01d36fbe64768c571e6a12b7fc50"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga0ef07a9a97849054aa606c595a2d807e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729">th_dec_ctx</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__decfuncs.html#ga0ef07a9a97849054aa606c595a2d807e">th_decode_alloc</a> (const <a class="el" href="structth__info.html">th_info</a> *_info, const <a class="el" href="theoradec_8h.html#ab71cd2657455cc27d6c0127c66a89f28">th_setup_info</a> *_setup)</td></tr>
<tr class="memdesc:ga0ef07a9a97849054aa606c595a2d807e"><td class="mdescLeft"> </td><td class="mdescRight">Allocates a decoder instance. <a href="#ga0ef07a9a97849054aa606c595a2d807e">More...</a><br /></td></tr>
<tr class="separator:ga0ef07a9a97849054aa606c595a2d807e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gadef55431b68aaa59d0d7b32b2f118f27"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__decfuncs.html#gadef55431b68aaa59d0d7b32b2f118f27">th_setup_free</a> (<a class="el" href="theoradec_8h.html#ab71cd2657455cc27d6c0127c66a89f28">th_setup_info</a> *_setup)</td></tr>
<tr class="memdesc:gadef55431b68aaa59d0d7b32b2f118f27"><td class="mdescLeft"> </td><td class="mdescRight">Releases all storage used for the decoder setup information. <a href="#gadef55431b68aaa59d0d7b32b2f118f27">More...</a><br /></td></tr>
<tr class="separator:gadef55431b68aaa59d0d7b32b2f118f27"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga1a8051958d75b1012573b6e3c8f670e1"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__decfuncs.html#ga1a8051958d75b1012573b6e3c8f670e1">th_decode_ctl</a> (<a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729">th_dec_ctx</a> *_dec, int _req, void *_buf, size_t _buf_sz)</td></tr>
<tr class="memdesc:ga1a8051958d75b1012573b6e3c8f670e1"><td class="mdescLeft"> </td><td class="mdescRight">Decoder control function. <a href="#ga1a8051958d75b1012573b6e3c8f670e1">More...</a><br /></td></tr>
<tr class="separator:ga1a8051958d75b1012573b6e3c8f670e1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga31c814bf09b2232aff69c57ae20f04eb"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__decfuncs.html#ga31c814bf09b2232aff69c57ae20f04eb">th_decode_packetin</a> (<a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729">th_dec_ctx</a> *_dec, const ogg_packet *_op, ogg_int64_t *_granpos)</td></tr>
<tr class="memdesc:ga31c814bf09b2232aff69c57ae20f04eb"><td class="mdescLeft"> </td><td class="mdescRight">Submits a packet containing encoded video data to the decoder. <a href="#ga31c814bf09b2232aff69c57ae20f04eb">More...</a><br /></td></tr>
<tr class="separator:ga31c814bf09b2232aff69c57ae20f04eb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa9cc8af63fa8540e0fc95572f259cdcb"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__decfuncs.html#gaa9cc8af63fa8540e0fc95572f259cdcb">th_decode_ycbcr_out</a> (<a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729">th_dec_ctx</a> *_dec, <a class="el" href="codec_8h.html#a343f7cfabad179cc4fe527cf06873f45">th_ycbcr_buffer</a> _ycbcr)</td></tr>
<tr class="memdesc:gaa9cc8af63fa8540e0fc95572f259cdcb"><td class="mdescLeft"> </td><td class="mdescRight">Outputs the next available frame of decoded Y'CbCr data. <a href="#gaa9cc8af63fa8540e0fc95572f259cdcb">More...</a><br /></td></tr>
<tr class="separator:gaa9cc8af63fa8540e0fc95572f259cdcb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gafb6684ad8ba507b71112bc9de148e7d0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__decfuncs.html#gafb6684ad8ba507b71112bc9de148e7d0">th_decode_free</a> (<a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729">th_dec_ctx</a> *_dec)</td></tr>
<tr class="memdesc:gafb6684ad8ba507b71112bc9de148e7d0"><td class="mdescLeft"> </td><td class="mdescRight">Frees an allocated decoder instance. <a href="#gafb6684ad8ba507b71112bc9de148e7d0">More...</a><br /></td></tr>
<tr class="separator:gafb6684ad8ba507b71112bc9de148e7d0"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga0ef07a9a97849054aa606c595a2d807e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729">th_dec_ctx</a>* th_decode_alloc </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structth__info.html">th_info</a> * </td>
<td class="paramname"><em>_info</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="theoradec_8h.html#ab71cd2657455cc27d6c0127c66a89f28">th_setup_info</a> * </td>
<td class="paramname"><em>_setup</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Allocates a decoder instance. </p>
<p><b>Security Warning:</b> The Theora format supports very large frame sizes, potentially even larger than the address space of a 32-bit machine, and creating a decoder context allocates the space for several frames of data. If the allocation fails here, your program will crash, possibly at some future point because the OS kernel returned a valid memory range and will only fail when it tries to map the pages in it the first time they are used. Even if it succeeds, you may experience a denial of service if the frame size is large enough to cause excessive paging. If you are integrating libtheora in a larger application where such things are undesirable, it is highly recommended that you check the frame size in <em>_info</em> before calling this function and refuse to decode streams where it is larger than some reasonable maximum. libtheora will not check this for you, because there may be machines that can handle such streams and applications that wish to. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">_info</td><td>A <a class="el" href="structth__info.html" title="Theora bitstream information. ">th_info</a> struct filled via <a class="el" href="group__decfuncs.html#ga006d01d36fbe64768c571e6a12b7fc50" title="Decodes the header packets of a Theora stream. ">th_decode_headerin()</a>. </td></tr>
<tr><td class="paramname">_setup</td><td>A <a class="el" href="theoradec_8h.html#ab71cd2657455cc27d6c0127c66a89f28" title="Setup information. ">th_setup_info</a> handle returned via <a class="el" href="group__decfuncs.html#ga006d01d36fbe64768c571e6a12b7fc50" title="Decodes the header packets of a Theora stream. ">th_decode_headerin()</a>. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The initialized <a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729" title="The decoder context. ">th_dec_ctx</a> handle. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">NULL</td><td>If the decoding parameters were invalid. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga1a8051958d75b1012573b6e3c8f670e1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int th_decode_ctl </td>
<td>(</td>
<td class="paramtype"><a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729">th_dec_ctx</a> * </td>
<td class="paramname"><em>_dec</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>_req</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>_buf</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>_buf_sz</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Decoder control function. </p>
<p>This is used to provide advanced control of the decoding process. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">_dec</td><td>A <a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729" title="The decoder context. ">th_dec_ctx</a> handle. </td></tr>
<tr><td class="paramname">_req</td><td>The control code to process. See <a class="el" href="theoradec_8h.html#decctlcodes">the list of available control codes</a> for details. </td></tr>
<tr><td class="paramname">_buf</td><td>The parameters for this control code. </td></tr>
<tr><td class="paramname">_buf_sz</td><td>The size of the parameter buffer. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="gafb6684ad8ba507b71112bc9de148e7d0"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void th_decode_free </td>
<td>(</td>
<td class="paramtype"><a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729">th_dec_ctx</a> * </td>
<td class="paramname"><em>_dec</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Frees an allocated decoder instance. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">_dec</td><td>A <a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729" title="The decoder context. ">th_dec_ctx</a> handle. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga006d01d36fbe64768c571e6a12b7fc50"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int th_decode_headerin </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structth__info.html">th_info</a> * </td>
<td class="paramname"><em>_info</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structth__comment.html">th_comment</a> * </td>
<td class="paramname"><em>_tc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="theoradec_8h.html#ab71cd2657455cc27d6c0127c66a89f28">th_setup_info</a> ** </td>
<td class="paramname"><em>_setup</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">ogg_packet * </td>
<td class="paramname"><em>_op</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Decodes the header packets of a Theora stream. </p>
<p>This should be called on the initial packets of the stream, in succession, until it returns <code>0</code>, indicating that all headers have been processed, or an error is encountered. At least three header packets are required, and additional optional header packets may follow. This can be used on the first packet of any logical stream to determine if that stream is a Theora stream. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">_info</td><td>A <a class="el" href="structth__info.html" title="Theora bitstream information. ">th_info</a> structure to fill in. This must have been previously initialized with <a class="el" href="group__basefuncs.html#ga430d9c605816a6ca0bdce3a0b965b926" title="Initializes a th_info structure. ">th_info_init()</a>. The application may immediately begin using the contents of this structure after the first header is decoded, though it must continue to be passed in on all subsequent calls. </td></tr>
<tr><td class="paramname">_tc</td><td>A <a class="el" href="structth__comment.html" title="The comment information. ">th_comment</a> structure to fill in. The application may immediately begin using the contents of this structure after the second header is decoded, though it must continue to be passed in on all subsequent calls. </td></tr>
<tr><td class="paramname">_setup</td><td>Returns a pointer to additional, private setup information needed by the decoder. The contents of this pointer must be initialized to <code>NULL</code> on the first call, and the returned value must continue to be passed in on all subsequent calls. </td></tr>
<tr><td class="paramname">_op</td><td>An <code>ogg_packet</code> structure which contains one of the initial packets of an Ogg logical stream. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A positive value indicates that a Theora header was successfully processed. </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">0</td><td>The first video data packet was encountered after all required header packets were parsed. The packet just passed in on this call should be saved and fed to <a class="el" href="group__decfuncs.html#ga31c814bf09b2232aff69c57ae20f04eb" title="Submits a packet containing encoded video data to the decoder. ">th_decode_packetin()</a> to begin decoding video data. </td></tr>
<tr><td class="paramname">TH_EFAULT</td><td>One of <em>_info</em>, <em>_tc</em>, or <em>_setup</em> was <code>NULL</code>. </td></tr>
<tr><td class="paramname">TH_EBADHEADER</td><td><em>_op</em> was <code>NULL</code>, the packet was not the next header packet in the expected sequence, or the format of the header data was invalid. </td></tr>
<tr><td class="paramname">TH_EVERSION</td><td>The packet data was a Theora info header, but for a bitstream version not decodable with this version of <code>libtheoradec</code>. </td></tr>
<tr><td class="paramname">TH_ENOTFORMAT</td><td>The packet was not a Theora header. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga31c814bf09b2232aff69c57ae20f04eb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int th_decode_packetin </td>
<td>(</td>
<td class="paramtype"><a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729">th_dec_ctx</a> * </td>
<td class="paramname"><em>_dec</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const ogg_packet * </td>
<td class="paramname"><em>_op</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">ogg_int64_t * </td>
<td class="paramname"><em>_granpos</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Submits a packet containing encoded video data to the decoder. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">_dec</td><td>A <a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729" title="The decoder context. ">th_dec_ctx</a> handle. </td></tr>
<tr><td class="paramname">_op</td><td>An <code>ogg_packet</code> containing encoded video data. </td></tr>
<tr><td class="paramname">_granpos</td><td>Returns the granule position of the decoded packet. If non-<code>NULL</code>, the granule position for this specific packet is stored in this location. This is computed incrementally from previously decoded packets. After a seek, the correct granule position must be set via <a class="el" href="theoradec_8h.html#a1e870c654d35394f0d490045df04e0f5" title="Sets the granule position. ">TH_DECCTL_SET_GRANPOS</a> for this to work properly. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">0</td><td>Success. A new decoded frame can be retrieved by calling <a class="el" href="group__decfuncs.html#gaa9cc8af63fa8540e0fc95572f259cdcb" title="Outputs the next available frame of decoded Y'CbCr data. ">th_decode_ycbcr_out()</a>. </td></tr>
<tr><td class="paramname">TH_DUPFRAME</td><td>The packet represented a dropped (0-byte) frame. The player can skip the call to <a class="el" href="group__decfuncs.html#gaa9cc8af63fa8540e0fc95572f259cdcb" title="Outputs the next available frame of decoded Y'CbCr data. ">th_decode_ycbcr_out()</a>, as the contents of the decoded frame buffer have not changed. </td></tr>
<tr><td class="paramname">TH_EFAULT</td><td><em>_dec</em> or <em>_op</em> was <code>NULL</code>. </td></tr>
<tr><td class="paramname">TH_EBADPACKET</td><td><em>_op</em> does not contain encoded video data. </td></tr>
<tr><td class="paramname">TH_EIMPL</td><td>The video data uses bitstream features which this library does not support. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="gaa9cc8af63fa8540e0fc95572f259cdcb"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int th_decode_ycbcr_out </td>
<td>(</td>
<td class="paramtype"><a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729">th_dec_ctx</a> * </td>
<td class="paramname"><em>_dec</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="codec_8h.html#a343f7cfabad179cc4fe527cf06873f45">th_ycbcr_buffer</a> </td>
<td class="paramname"><em>_ycbcr</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Outputs the next available frame of decoded Y'CbCr data. </p>
<p>If a striped decode callback has been set with <a class="el" href="theoradec_8h.html#ac95cc9e109474b0fa4bb920ab2cfdf1e" title="Sets the striped decode callback function. ">TH_DECCTL_SET_STRIPE_CB</a>, then the application does not need to call this function. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">_dec</td><td>A <a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729" title="The decoder context. ">th_dec_ctx</a> handle. </td></tr>
<tr><td class="paramname">_ycbcr</td><td>A video buffer structure to fill in. <code>libtheoradec</code> will fill in all the members of this structure, including the pointers to the uncompressed video data. The memory for this video data is owned by <code>libtheoradec</code>. It may be freed or overwritten without notification when subsequent frames are decoded. </td></tr>
</table>
</dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
<table class="retval">
<tr><td class="paramname">0</td><td>Success </td></tr>
<tr><td class="paramname">TH_EFAULT</td><td><em>_dec</em> or <em>_ycbcr</em> was <code>NULL</code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="gadef55431b68aaa59d0d7b32b2f118f27"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void th_setup_free </td>
<td>(</td>
<td class="paramtype"><a class="el" href="theoradec_8h.html#ab71cd2657455cc27d6c0127c66a89f28">th_setup_info</a> * </td>
<td class="paramname"><em>_setup</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Releases all storage used for the decoder setup information. </p>
<p>This should be called after you no longer want to create any decoders for a stream whose headers you have parsed with <a class="el" href="group__decfuncs.html#ga006d01d36fbe64768c571e6a12b7fc50" title="Decodes the header packets of a Theora stream. ">th_decode_headerin()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">_setup</td><td>The setup information to free. This can safely be <code>NULL</code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
|