| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542 |
- <!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"/>
- <title>libtheora: Functions Shared by Encode and Decode</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <link href="doxygen.css" rel="stylesheet" type="text/css"/>
- </head>
- <body>
- <!-- Generated by Doxygen 1.6.1 -->
- <div class="navigation" id="top">
- <div class="tabs">
- <ul>
- <li><a href="index.html"><span>Main Page</span></a></li>
- <li><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>
- <div class="contents">
- <h1>Functions Shared by Encode and Decode</h1><table border="0" cellpadding="0" cellspacing="0">
- <tr><td colspan="2"><h2>Basic shared functions</h2></td></tr>
- <tr><td colspan="2"><p><a class="anchor" id="amgrpb625c22fa07613c734f71c378fe32d7a"></a> </p>
- <br/><br/></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga04846066738d9f2024fc9961162b2dbc">th_version_string</a> (void)</td></tr>
- <tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieves a human-readable string to identify the library vendor and version. <a href="#ga04846066738d9f2024fc9961162b2dbc"></a><br/></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top">ogg_uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#gab723a75c0f95b3eb817f7f769846016b">th_version_number</a> (void)</td></tr>
- <tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the library version number. <a href="#gab723a75c0f95b3eb817f7f769846016b"></a><br/></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top">ogg_int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga95b10e76fc4c05d0240ea2dfd9fd62bd">th_granule_frame</a> (void *_encdec, ogg_int64_t _granpos)</td></tr>
- <tr><td class="mdescLeft"> </td><td class="mdescRight">Converts a granule position to an absolute frame index, starting at <code>0</code>. <a href="#ga95b10e76fc4c05d0240ea2dfd9fd62bd"></a><br/></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga707e1e281de788af0df39ef00f3fb432">th_granule_time</a> (void *_encdec, ogg_int64_t _granpos)</td></tr>
- <tr><td class="mdescLeft"> </td><td class="mdescRight">Converts a granule position to an absolute time in seconds. <a href="#ga707e1e281de788af0df39ef00f3fb432"></a><br/></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga02f3f38261a9b39452d8a5e6f8737cc1">th_packet_isheader</a> (ogg_packet *_op)</td></tr>
- <tr><td class="mdescLeft"> </td><td class="mdescRight">Determines whether a Theora packet is a header or not. <a href="#ga02f3f38261a9b39452d8a5e6f8737cc1"></a><br/></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#gafe95cfd06f0fef413266c9168a66248a">th_packet_iskeyframe</a> (ogg_packet *_op)</td></tr>
- <tr><td class="mdescLeft"> </td><td class="mdescRight">Determines whether a theora packet is a key frame or not. <a href="#gafe95cfd06f0fef413266c9168a66248a"></a><br/></td></tr>
- <tr><td colspan="2"><h2>Functions for manipulating header data</h2></td></tr>
- <tr><td colspan="2"><p><a class="anchor" id="amgrp14ef5f819e97c870c128539ed1f334e3"></a> </p>
- <br/><br/></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga430d9c605816a6ca0bdce3a0b965b926">th_info_init</a> (<a class="el" href="structth__info.html">th_info</a> *_info)</td></tr>
- <tr><td class="mdescLeft"> </td><td class="mdescRight">Initializes a <a class="el" href="structth__info.html" title="Theora bitstream information.">th_info</a> structure. <a href="#ga430d9c605816a6ca0bdce3a0b965b926"></a><br/></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#gab3d6441ab4a4969859ef5fd78a9e3c1c">th_info_clear</a> (<a class="el" href="structth__info.html">th_info</a> *_info)</td></tr>
- <tr><td class="mdescLeft"> </td><td class="mdescRight">Clears a <a class="el" href="structth__info.html" title="Theora bitstream information.">th_info</a> structure. <a href="#gab3d6441ab4a4969859ef5fd78a9e3c1c"></a><br/></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga6c8ab25988e7ea9d7b1e31a54cf58f09">th_comment_init</a> (<a class="el" href="structth__comment.html">th_comment</a> *_tc)</td></tr>
- <tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize a <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> structure. <a href="#ga6c8ab25988e7ea9d7b1e31a54cf58f09"></a><br/></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga19a1f7b8032db957df151a34e5ac9272">th_comment_add</a> (<a class="el" href="structth__comment.html">th_comment</a> *_tc, char *_comment)</td></tr>
- <tr><td class="mdescLeft"> </td><td class="mdescRight">Add a comment to an initialized <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> structure. <a href="#ga19a1f7b8032db957df151a34e5ac9272"></a><br/></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga6c5edc201ca220a30787ca6c1ddcaeaf">th_comment_add_tag</a> (<a class="el" href="structth__comment.html">th_comment</a> *_tc, char *_tag, char *_val)</td></tr>
- <tr><td class="mdescLeft"> </td><td class="mdescRight">Add a comment to an initialized <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> structure. <a href="#ga6c5edc201ca220a30787ca6c1ddcaeaf"></a><br/></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga33c8b4f57a03217636d704c2ebb211fa">th_comment_query</a> (<a class="el" href="structth__comment.html">th_comment</a> *_tc, char *_tag, int _count)</td></tr>
- <tr><td class="mdescLeft"> </td><td class="mdescRight">Look up a comment value by its tag. <a href="#ga33c8b4f57a03217636d704c2ebb211fa"></a><br/></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#ga81d518dc4426f63ceaedcbe2668679fc">th_comment_query_count</a> (<a class="el" href="structth__comment.html">th_comment</a> *_tc, char *_tag)</td></tr>
- <tr><td class="mdescLeft"> </td><td class="mdescRight">Look up the number of instances of a tag. <a href="#ga81d518dc4426f63ceaedcbe2668679fc"></a><br/></td></tr>
- <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__basefuncs.html#gae736c1afa514947a3feb223143af95e3">th_comment_clear</a> (<a class="el" href="structth__comment.html">th_comment</a> *_tc)</td></tr>
- <tr><td class="mdescLeft"> </td><td class="mdescRight">Clears a <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> structure. <a href="#gae736c1afa514947a3feb223143af95e3"></a><br/></td></tr>
- </table>
- <hr/><h2>Function Documentation</h2>
- <a class="anchor" id="ga19a1f7b8032db957df151a34e5ac9272"></a><!-- doxytag: member="codec.h::th_comment_add" ref="ga19a1f7b8032db957df151a34e5ac9272" args="(th_comment *_tc, char *_comment)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void th_comment_add </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">char * </td>
- <td class="paramname"> <em>_comment</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Add a comment to an initialized <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> structure. </p>
- <dl class="note"><dt><b>Note:</b></dt><dd>Neither <a class="el" href="group__basefuncs.html#ga19a1f7b8032db957df151a34e5ac9272" title="Add a comment to an initialized th_comment structure.">th_comment_add()</a> nor <a class="el" href="group__basefuncs.html#ga6c5edc201ca220a30787ca6c1ddcaeaf" title="Add a comment to an initialized th_comment structure.">th_comment_add_tag()</a> support comments containing null values, although the bitstream format does support them. To add such comments you will need to manipulate the <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> structure directly. </dd></dl>
- <dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>_tc</em> </td><td>The <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> struct to add the comment to. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>_comment</em> </td><td>Must be a null-terminated UTF-8 string containing the comment in "TAG=the value" form. </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="ga6c5edc201ca220a30787ca6c1ddcaeaf"></a><!-- doxytag: member="codec.h::th_comment_add_tag" ref="ga6c5edc201ca220a30787ca6c1ddcaeaf" args="(th_comment *_tc, char *_tag, char *_val)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void th_comment_add_tag </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">char * </td>
- <td class="paramname"> <em>_tag</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">char * </td>
- <td class="paramname"> <em>_val</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Add a comment to an initialized <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> structure. </p>
- <dl class="note"><dt><b>Note:</b></dt><dd>Neither <a class="el" href="group__basefuncs.html#ga19a1f7b8032db957df151a34e5ac9272" title="Add a comment to an initialized th_comment structure.">th_comment_add()</a> nor <a class="el" href="group__basefuncs.html#ga6c5edc201ca220a30787ca6c1ddcaeaf" title="Add a comment to an initialized th_comment structure.">th_comment_add_tag()</a> support comments containing null values, although the bitstream format does support them. To add such comments you will need to manipulate the <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> structure directly. </dd></dl>
- <dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>_tc</em> </td><td>The <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> struct to add the comment to. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>_tag</em> </td><td>A null-terminated string containing the tag associated with the comment. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>_val</em> </td><td>The corresponding value as a null-terminated string. </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="gae736c1afa514947a3feb223143af95e3"></a><!-- doxytag: member="codec.h::th_comment_clear" ref="gae736c1afa514947a3feb223143af95e3" args="(th_comment *_tc)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void th_comment_clear </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structth__comment.html">th_comment</a> * </td>
- <td class="paramname"> <em>_tc</em></td>
- <td> ) </td>
- <td></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Clears a <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> structure. </p>
- <p>This should be called on a <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> structure after it is no longer needed. It will free all memory used by the structure members. </p>
- <dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>_tc</em> </td><td>The <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> struct to clear. </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="ga6c8ab25988e7ea9d7b1e31a54cf58f09"></a><!-- doxytag: member="codec.h::th_comment_init" ref="ga6c8ab25988e7ea9d7b1e31a54cf58f09" args="(th_comment *_tc)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void th_comment_init </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structth__comment.html">th_comment</a> * </td>
- <td class="paramname"> <em>_tc</em></td>
- <td> ) </td>
- <td></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Initialize a <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> structure. </p>
- <p>This should be called on a freshly allocated <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> structure before attempting to use it. </p>
- <dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>_tc</em> </td><td>The <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> struct to initialize. </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="ga33c8b4f57a03217636d704c2ebb211fa"></a><!-- doxytag: member="codec.h::th_comment_query" ref="ga33c8b4f57a03217636d704c2ebb211fa" args="(th_comment *_tc, char *_tag, int _count)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">char* th_comment_query </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">char * </td>
- <td class="paramname"> <em>_tag</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"> <em>_count</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Look up a comment value by its tag. </p>
- <dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>_tc</em> </td><td>An initialized <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> structure. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>_tag</em> </td><td>The tag to look up. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>_count</em> </td><td>The instance of the tag. The same tag can appear multiple times, each with a distinct value, so an index is required to retrieve them all. The order in which these values appear is significant and should be preserved. Use <a class="el" href="group__basefuncs.html#ga81d518dc4426f63ceaedcbe2668679fc" title="Look up the number of instances of a tag.">th_comment_query_count()</a> to get the legal range for the <em>_count</em> parameter. </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="return"><dt><b>Returns:</b></dt><dd>A pointer to the queried tag's value. This points directly to data in the <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> structure. It should not be modified or freed by the application, and modifications to the structure may invalidate the pointer. </dd></dl>
- <dl><dt><b>Return values:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>NULL</em> </td><td>If no matching tag is found. </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="ga81d518dc4426f63ceaedcbe2668679fc"></a><!-- doxytag: member="codec.h::th_comment_query_count" ref="ga81d518dc4426f63ceaedcbe2668679fc" args="(th_comment *_tc, char *_tag)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int th_comment_query_count </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">char * </td>
- <td class="paramname"> <em>_tag</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Look up the number of instances of a tag. </p>
- <p>Call this first when querying for a specific tag and then iterate over the number of instances with separate calls to <a class="el" href="group__basefuncs.html#ga33c8b4f57a03217636d704c2ebb211fa" title="Look up a comment value by its tag.">th_comment_query()</a> to retrieve all the values for that tag in order. </p>
- <dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>_tc</em> </td><td>An initialized <a class="el" href="structth__comment.html" title="The comment information.">th_comment</a> structure. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>_tag</em> </td><td>The tag to look up. </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="return"><dt><b>Returns:</b></dt><dd>The number on instances of this particular tag. </dd></dl>
- </div>
- </div>
- <a class="anchor" id="ga95b10e76fc4c05d0240ea2dfd9fd62bd"></a><!-- doxytag: member="codec.h::th_granule_frame" ref="ga95b10e76fc4c05d0240ea2dfd9fd62bd" args="(void *_encdec, ogg_int64_t _granpos)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">ogg_int64_t th_granule_frame </td>
- <td>(</td>
- <td class="paramtype">void * </td>
- <td class="paramname"> <em>_encdec</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">ogg_int64_t </td>
- <td class="paramname"> <em>_granpos</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Converts a granule position to an absolute frame index, starting at <code>0</code>. </p>
- <p>The granule position is interpreted in the context of a given <a class="el" href="theoraenc_8h.html#af5cc40472b925456d42526a035d66edd" title="The encoder context.">th_enc_ctx</a> or <a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729" title="The decoder context.">th_dec_ctx</a> handle (either will suffice). </p>
- <dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>_encdec</em> </td><td>A previously allocated <a class="el" href="theoraenc_8h.html#af5cc40472b925456d42526a035d66edd" title="The encoder context.">th_enc_ctx</a> or <a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729" title="The decoder context.">th_dec_ctx</a> handle. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>_granpos</em> </td><td>The granule position to convert. </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="return"><dt><b>Returns:</b></dt><dd>The absolute frame index corresponding to <em>_granpos</em>. </dd></dl>
- <dl><dt><b>Return values:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>-1</em> </td><td>The given granule position was invalid (i.e. negative). </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="ga707e1e281de788af0df39ef00f3fb432"></a><!-- doxytag: member="codec.h::th_granule_time" ref="ga707e1e281de788af0df39ef00f3fb432" args="(void *_encdec, ogg_int64_t _granpos)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">double th_granule_time </td>
- <td>(</td>
- <td class="paramtype">void * </td>
- <td class="paramname"> <em>_encdec</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">ogg_int64_t </td>
- <td class="paramname"> <em>_granpos</em></td><td> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td><td></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Converts a granule position to an absolute time in seconds. </p>
- <p>The granule position is interpreted in the context of a given <a class="el" href="theoraenc_8h.html#af5cc40472b925456d42526a035d66edd" title="The encoder context.">th_enc_ctx</a> or <a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729" title="The decoder context.">th_dec_ctx</a> handle (either will suffice). </p>
- <dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>_encdec</em> </td><td>A previously allocated <a class="el" href="theoraenc_8h.html#af5cc40472b925456d42526a035d66edd" title="The encoder context.">th_enc_ctx</a> or <a class="el" href="theoradec_8h.html#a843d70bb02563885a8d54b9c1a781729" title="The decoder context.">th_dec_ctx</a> handle. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>_granpos</em> </td><td>The granule position to convert. </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="return"><dt><b>Returns:</b></dt><dd>The absolute time in seconds corresponding to <em>_granpos</em>. This is the "end time" for the frame, or the latest time it should be displayed. It is not the presentation time. </dd></dl>
- <dl><dt><b>Return values:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>-1</em> </td><td>The given granule position was invalid (i.e. negative). </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="gab3d6441ab4a4969859ef5fd78a9e3c1c"></a><!-- doxytag: member="codec.h::th_info_clear" ref="gab3d6441ab4a4969859ef5fd78a9e3c1c" args="(th_info *_info)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void th_info_clear </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structth__info.html">th_info</a> * </td>
- <td class="paramname"> <em>_info</em></td>
- <td> ) </td>
- <td></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Clears a <a class="el" href="structth__info.html" title="Theora bitstream information.">th_info</a> structure. </p>
- <p>This should be called on a <a class="el" href="structth__info.html" title="Theora bitstream information.">th_info</a> structure after it is no longer needed. </p>
- <dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>_info</em> </td><td>The <a class="el" href="structth__info.html" title="Theora bitstream information.">th_info</a> struct to clear. </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="ga430d9c605816a6ca0bdce3a0b965b926"></a><!-- doxytag: member="codec.h::th_info_init" ref="ga430d9c605816a6ca0bdce3a0b965b926" args="(th_info *_info)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void th_info_init </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structth__info.html">th_info</a> * </td>
- <td class="paramname"> <em>_info</em></td>
- <td> ) </td>
- <td></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Initializes a <a class="el" href="structth__info.html" title="Theora bitstream information.">th_info</a> structure. </p>
- <p>This should be called on a freshly allocated <a class="el" href="structth__info.html" title="Theora bitstream information.">th_info</a> structure before attempting to use it. </p>
- <dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>_info</em> </td><td>The <a class="el" href="structth__info.html" title="Theora bitstream information.">th_info</a> struct to initialize. </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="ga02f3f38261a9b39452d8a5e6f8737cc1"></a><!-- doxytag: member="codec.h::th_packet_isheader" ref="ga02f3f38261a9b39452d8a5e6f8737cc1" args="(ogg_packet *_op)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int th_packet_isheader </td>
- <td>(</td>
- <td class="paramtype">ogg_packet * </td>
- <td class="paramname"> <em>_op</em></td>
- <td> ) </td>
- <td></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Determines whether a Theora packet is a header or not. </p>
- <p>This function does no verification beyond checking the packet type bit, so it should not be used for bitstream identification; use <a class="el" href="group__decfuncs.html#ga006d01d36fbe64768c571e6a12b7fc50" title="Decodes the header packets of a Theora stream.">th_decode_headerin()</a> for that. As per the Theora specification, an empty (0-byte) packet is treated as a data packet (a delta frame with no coded blocks). </p>
- <dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>_op</em> </td><td>An <code>ogg_packet</code> containing encoded Theora data. </td></tr>
- </table>
- </dd>
- </dl>
- <dl><dt><b>Return values:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>1</em> </td><td>The packet is a header packet </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>0</em> </td><td>The packet is a video data packet. </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="gafe95cfd06f0fef413266c9168a66248a"></a><!-- doxytag: member="codec.h::th_packet_iskeyframe" ref="gafe95cfd06f0fef413266c9168a66248a" args="(ogg_packet *_op)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int th_packet_iskeyframe </td>
- <td>(</td>
- <td class="paramtype">ogg_packet * </td>
- <td class="paramname"> <em>_op</em></td>
- <td> ) </td>
- <td></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Determines whether a theora packet is a key frame or not. </p>
- <p>This function does no verification beyond checking the packet type and key frame bits, so it should not be used for bitstream identification; use <a class="el" href="group__decfuncs.html#ga006d01d36fbe64768c571e6a12b7fc50" title="Decodes the header packets of a Theora stream.">th_decode_headerin()</a> for that. As per the Theora specification, an empty (0-byte) packet is treated as a delta frame (with no coded blocks). </p>
- <dl><dt><b>Parameters:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>_op</em> </td><td>An <code>ogg_packet</code> containing encoded Theora data. </td></tr>
- </table>
- </dd>
- </dl>
- <dl><dt><b>Return values:</b></dt><dd>
- <table border="0" cellspacing="2" cellpadding="0">
- <tr><td valign="top"></td><td valign="top"><em>1</em> </td><td>The packet contains a key frame. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>0</em> </td><td>The packet contains a delta frame. </td></tr>
- <tr><td valign="top"></td><td valign="top"><em>-1</em> </td><td>The packet is not a video data packet. </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a class="anchor" id="gab723a75c0f95b3eb817f7f769846016b"></a><!-- doxytag: member="codec.h::th_version_number" ref="gab723a75c0f95b3eb817f7f769846016b" args="(void)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">ogg_uint32_t th_version_number </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td>
- <td> ) </td>
- <td></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Retrieves the library version number. </p>
- <p>This is the highest bitstream version that the encoder library will produce, or that the decoder library can decode. This number is composed of a 16-bit major version, 8-bit minor version and 8 bit sub-version, composed as follows: </p>
- <div class="fragment"><pre class="fragment"> (VERSION_MAJOR<<16)+(VERSION_MINOR<<8)+(VERSION_SUBMINOR)
- </pre></div> <dl class="return"><dt><b>Returns:</b></dt><dd>the version number. </dd></dl>
- </div>
- </div>
- <a class="anchor" id="ga04846066738d9f2024fc9961162b2dbc"></a><!-- doxytag: member="codec.h::th_version_string" ref="ga04846066738d9f2024fc9961162b2dbc" args="(void)" -->
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">const char* th_version_string </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td>
- <td> ) </td>
- <td></td>
- </tr>
- </table>
- </div>
- <div class="memdoc">
- <p>Retrieves a human-readable string to identify the library vendor and version. </p>
- <dl class="return"><dt><b>Returns:</b></dt><dd>the version string. </dd></dl>
- </div>
- </div>
- </div>
- <hr size="1"/><address style="text-align: right;"><small>Generated on 28 Sep 2009 for libtheora by
- <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
- </body>
- </html>
|