Welcome to mirror list, hosted at ThFree Co, Russian Federation.

theora_8h.html « html « libtheora « doc « libtheora-1.1.1 « Libraries - github.com/WolfireGames/overgrowth.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2adc3b1be80e8fe3b87be25cef51b9a310fb3bdc (plain)
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
<!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: theora.h File Reference</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&nbsp;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>theora.h File Reference</h1>
<p>The libtheora pre-1.0 legacy C API.  
<a href="#_details">More...</a></p>
<code>#include &lt;stddef.h&gt;</code><br/>
<code>#include &lt;ogg/ogg.h&gt;</code><br/>

<p><a href="theora_8h_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structyuv__buffer.html">yuv_buffer</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A YUV buffer for passing uncompressed frames to and from the codec.  <a href="structyuv__buffer.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structtheora__info.html">theora_info</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Theora bitstream info.  <a href="structtheora__info.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structtheora__state.html">theora_state</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Codec internal state and context.  <a href="structtheora__state.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structtheora__comment.html">theora_comment</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Comment header metadata.  <a href="structtheora__comment.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#gaa4370e13ed3aea6441ccf69dcab2506e">OC_FAULT</a>&nbsp;&nbsp;&nbsp;-1</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">General failure.  <a href="group__oldfuncs.html#gaa4370e13ed3aea6441ccf69dcab2506e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga43d15091b1a03a734a124e9a04d3be55">OC_EINVAL</a>&nbsp;&nbsp;&nbsp;-10</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Library encountered invalid internal data.  <a href="group__oldfuncs.html#ga43d15091b1a03a734a124e9a04d3be55"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga38b9fa0af856d5930c534db26e2ac2d1">OC_DISABLED</a>&nbsp;&nbsp;&nbsp;-11</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Requested action is disabled.  <a href="group__oldfuncs.html#ga38b9fa0af856d5930c534db26e2ac2d1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga809cbad2eb36be17a235a3cadfb737ba">OC_BADHEADER</a>&nbsp;&nbsp;&nbsp;-20</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Header packet was corrupt/invalid.  <a href="group__oldfuncs.html#ga809cbad2eb36be17a235a3cadfb737ba"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga9558d6d9eacd2273c8da27f945d725ad">OC_NOTFORMAT</a>&nbsp;&nbsp;&nbsp;-21</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Packet is not a theora packet.  <a href="group__oldfuncs.html#ga9558d6d9eacd2273c8da27f945d725ad"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga4611cfd61160405721d1e2ab0ec2564b">OC_VERSION</a>&nbsp;&nbsp;&nbsp;-22</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Bitstream version is not handled.  <a href="group__oldfuncs.html#ga4611cfd61160405721d1e2ab0ec2564b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga895dc2597b3bf9c97bf7701c6eff5b0c">OC_IMPL</a>&nbsp;&nbsp;&nbsp;-23</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Feature or action not implemented.  <a href="group__oldfuncs.html#ga895dc2597b3bf9c97bf7701c6eff5b0c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga117774c062a63dfad2a5b4d092fa2bb1">OC_BADPACKET</a>&nbsp;&nbsp;&nbsp;-24</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Packet is corrupt.  <a href="group__oldfuncs.html#ga117774c062a63dfad2a5b4d092fa2bb1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga60be4dc92c933eac3542bce3ce076496">OC_NEWPACKET</a>&nbsp;&nbsp;&nbsp;-25</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Packet is an (ignorable) unhandled extension.  <a href="group__oldfuncs.html#ga60be4dc92c933eac3542bce3ce076496"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga84a8d2f5080ad62b415a4e7551941cbb">OC_DUPFRAME</a>&nbsp;&nbsp;&nbsp;1</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Packet is a dropped frame.  <a href="group__oldfuncs.html#ga84a8d2f5080ad62b415a4e7551941cbb"></a><br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">theora_control() codes</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrp13fd61986cff4566fe89a40e30b74ad9"></a> </p>
<br/><br/></div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#gab31f251c9319f2140d247585d30b3d07">TH_DECCTL_GET_PPLEVEL_MAX</a>&nbsp;&nbsp;&nbsp;(1)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the maximum post-processing level.  <a href="group__oldfuncs.html#gab31f251c9319f2140d247585d30b3d07"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga87774c35e1a755a84e2d705b38ebef0d">TH_DECCTL_SET_PPLEVEL</a>&nbsp;&nbsp;&nbsp;(3)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the post-processing level.  <a href="group__oldfuncs.html#ga87774c35e1a755a84e2d705b38ebef0d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga27e755e15b4b5604c54974b304037a49">TH_ENCCTL_SET_KEYFRAME_FREQUENCY_FORCE</a>&nbsp;&nbsp;&nbsp;(4)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the maximum distance between key frames.  <a href="group__oldfuncs.html#ga27e755e15b4b5604c54974b304037a49"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga1e870c654d35394f0d490045df04e0f5">TH_DECCTL_SET_GRANPOS</a>&nbsp;&nbsp;&nbsp;(5)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the granule position.  <a href="group__oldfuncs.html#ga1e870c654d35394f0d490045df04e0f5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga3befcdd66678f8d27034f9c4b16d1b9c">TH_ENCCTL_SET_QUANT_PARAMS</a>&nbsp;&nbsp;&nbsp;(2)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the quantization parameters to use.  <a href="group__oldfuncs.html#ga3befcdd66678f8d27034f9c4b16d1b9c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga382d685a39a34d8e6ba76b00d804efd8">TH_ENCCTL_SET_VP3_COMPATIBLE</a>&nbsp;&nbsp;&nbsp;(10)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Disables any encoder features that would prevent lossless transcoding back to VP3.  <a href="group__oldfuncs.html#ga382d685a39a34d8e6ba76b00d804efd8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga9baf5bdd206e80c78a8fd44687e89783">TH_ENCCTL_GET_SPLEVEL_MAX</a>&nbsp;&nbsp;&nbsp;(12)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the maximum speed level.  <a href="group__oldfuncs.html#ga9baf5bdd206e80c78a8fd44687e89783"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#gabd9fbcb6a25a77d991d3620164fe59d6">TH_ENCCTL_SET_SPLEVEL</a>&nbsp;&nbsp;&nbsp;(14)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the speed level.  <a href="group__oldfuncs.html#gabd9fbcb6a25a77d991d3620164fe59d6"></a><br/></td></tr>
<tr><td colspan="2"><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#gaa567da4ce591f7373149ce3ef3acdac9">theora_colorspace</a> { <a class="el" href="group__oldfuncs.html#ggaa567da4ce591f7373149ce3ef3acdac9abf217cf83d7d7cbf73295e6689f5cf5f">OC_CS_UNSPECIFIED</a>, 
<a class="el" href="group__oldfuncs.html#ggaa567da4ce591f7373149ce3ef3acdac9ab20c9851a21ab148fef0bf2c00c0a294">OC_CS_ITU_REC_470M</a>, 
<a class="el" href="group__oldfuncs.html#ggaa567da4ce591f7373149ce3ef3acdac9a04f8fa2da26f9ec513f514163705666a">OC_CS_ITU_REC_470BG</a>, 
<a class="el" href="group__oldfuncs.html#ggaa567da4ce591f7373149ce3ef3acdac9a640b572f11fa7102d434e1c605aaa186">OC_CS_NSPACES</a>
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>A Colorspace. </p>
 <a href="group__oldfuncs.html#gaa567da4ce591f7373149ce3ef3acdac9">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#gae169da05bfaaf4e964a6866552d45079">theora_pixelformat</a> { <a class="el" href="group__oldfuncs.html#ggae169da05bfaaf4e964a6866552d45079a4e451af01be2645511b0e431f5225d2b">OC_PF_420</a>, 
<a class="el" href="group__oldfuncs.html#ggae169da05bfaaf4e964a6866552d45079a7d21c63341ad299766839c83ed1216eb">OC_PF_RSVD</a>, 
<a class="el" href="group__oldfuncs.html#ggae169da05bfaaf4e964a6866552d45079a36a88c55b7ddd5aedeac2d61d57fee5b">OC_PF_422</a>, 
<a class="el" href="group__oldfuncs.html#ggae169da05bfaaf4e964a6866552d45079a1d5c6d1b0365e06b4a87880b7825f044">OC_PF_444</a>
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>A Chroma subsampling. </p>
 <a href="group__oldfuncs.html#gae169da05bfaaf4e964a6866552d45079">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga5a3da8fd262a60f055f96536eec06df2">theora_version_string</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieve a human-readable string to identify the encoder vendor and version.  <a href="group__oldfuncs.html#ga5a3da8fd262a60f055f96536eec06df2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ogg_uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#gad181f4b19d455dcc2bef2533530b84c8">theora_version_number</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieve a 32-bit version number.  <a href="group__oldfuncs.html#gad181f4b19d455dcc2bef2533530b84c8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga0f7ad4d4b2343278cb4ba8fb2bd5109a">theora_encode_init</a> (<a class="el" href="structtheora__state.html">theora_state</a> *th, <a class="el" href="structtheora__info.html">theora_info</a> *ti)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize the theora encoder.  <a href="group__oldfuncs.html#ga0f7ad4d4b2343278cb4ba8fb2bd5109a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#gac0d33d896ca70cedfc94c5986d947078">theora_encode_YUVin</a> (<a class="el" href="structtheora__state.html">theora_state</a> *t, <a class="el" href="structyuv__buffer.html">yuv_buffer</a> *yuv)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Submit a YUV buffer to the theora encoder.  <a href="group__oldfuncs.html#gac0d33d896ca70cedfc94c5986d947078"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga5f4929677a735bc2198c2309d235f1b3">theora_encode_packetout</a> (<a class="el" href="structtheora__state.html">theora_state</a> *t, int last_p, ogg_packet *op)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Request the next packet of encoded video.  <a href="group__oldfuncs.html#ga5f4929677a735bc2198c2309d235f1b3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga451feb58d6bde726edbae193689887be">theora_encode_header</a> (<a class="el" href="structtheora__state.html">theora_state</a> *t, ogg_packet *op)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Request a packet containing the initial header.  <a href="group__oldfuncs.html#ga451feb58d6bde726edbae193689887be"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga45e8db0713eaaca0f1144f3724cb834a">theora_encode_comment</a> (<a class="el" href="structtheora__comment.html">theora_comment</a> *tc, ogg_packet *op)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Request a comment header packet from provided metadata.  <a href="group__oldfuncs.html#ga45e8db0713eaaca0f1144f3724cb834a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga5085baf20855b283fa01fc948505d9d2">theora_encode_tables</a> (<a class="el" href="structtheora__state.html">theora_state</a> *t, ogg_packet *op)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Request a packet containing the codebook tables for the stream.  <a href="group__oldfuncs.html#ga5085baf20855b283fa01fc948505d9d2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga02915e63c1bd733ee291f577a8b75a82">theora_decode_header</a> (<a class="el" href="structtheora__info.html">theora_info</a> *ci, <a class="el" href="structtheora__comment.html">theora_comment</a> *cc, ogg_packet *op)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Decode an Ogg packet, with the expectation that the packet contains an initial header, comment data or codebook tables.  <a href="group__oldfuncs.html#ga02915e63c1bd733ee291f577a8b75a82"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga264907c66003799ff77ecbd09eb33d2c">theora_decode_init</a> (<a class="el" href="structtheora__state.html">theora_state</a> *th, <a class="el" href="structtheora__info.html">theora_info</a> *c)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize a <a class="el" href="structtheora__state.html" title="Codec internal state and context.">theora_state</a> handle for decoding.  <a href="group__oldfuncs.html#ga264907c66003799ff77ecbd09eb33d2c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#gaa65a9e53b46fd54ab344bd599fa96975">theora_decode_packetin</a> (<a class="el" href="structtheora__state.html">theora_state</a> *th, ogg_packet *op)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Input a packet containing encoded data into the theora decoder.  <a href="group__oldfuncs.html#gaa65a9e53b46fd54ab344bd599fa96975"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga09d47c80e1e94bff0a46a496816b8daa">theora_decode_YUVout</a> (<a class="el" href="structtheora__state.html">theora_state</a> *th, <a class="el" href="structyuv__buffer.html">yuv_buffer</a> *yuv)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Output the next available frame of decoded YUV data.  <a href="group__oldfuncs.html#ga09d47c80e1e94bff0a46a496816b8daa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#gab969f9d0407683f0e5abe73d0839a25b">theora_packet_isheader</a> (ogg_packet *op)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Report whether a theora packet is a header or not This function does no verification beyond checking the header flag bit so it should not be used for bitstream identification; use <a class="el" href="group__oldfuncs.html#ga02915e63c1bd733ee291f577a8b75a82" title="Decode an Ogg packet, with the expectation that the packet contains an initial header...">theora_decode_header()</a> for that.  <a href="group__oldfuncs.html#gab969f9d0407683f0e5abe73d0839a25b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga39ccc8f847a748d7074c926b4fdd12b2">theora_packet_iskeyframe</a> (ogg_packet *op)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Report whether a theora packet is a keyframe or not.  <a href="group__oldfuncs.html#ga39ccc8f847a748d7074c926b4fdd12b2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#gacd9360e6a47139c761002410af457a02">theora_granule_shift</a> (<a class="el" href="structtheora__info.html">theora_info</a> *ti)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Report the granulepos shift radix.  <a href="group__oldfuncs.html#gacd9360e6a47139c761002410af457a02"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ogg_int64_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga7bfa3ceb2fb4b41a282456c56e1dd269">theora_granule_frame</a> (<a class="el" href="structtheora__state.html">theora_state</a> *th, ogg_int64_t granulepos)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert a granulepos to an absolute frame index, starting at 0.  <a href="group__oldfuncs.html#ga7bfa3ceb2fb4b41a282456c56e1dd269"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga4376358b12b9fa23ce6fe21cb5c65ac6">theora_granule_time</a> (<a class="el" href="structtheora__state.html">theora_state</a> *th, ogg_int64_t granulepos)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert a granulepos to absolute time in seconds.  <a href="group__oldfuncs.html#ga4376358b12b9fa23ce6fe21cb5c65ac6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga3091c87d48f1faba018c5956379a6d90">theora_info_init</a> (<a class="el" href="structtheora__info.html">theora_info</a> *c)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize a <a class="el" href="structtheora__info.html" title="Theora bitstream info.">theora_info</a> structure.  <a href="group__oldfuncs.html#ga3091c87d48f1faba018c5956379a6d90"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#gaba7022d58edbc4825cacad03f68b3e0d">theora_info_clear</a> (<a class="el" href="structtheora__info.html">theora_info</a> *c)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clear a <a class="el" href="structtheora__info.html" title="Theora bitstream info.">theora_info</a> structure.  <a href="group__oldfuncs.html#gaba7022d58edbc4825cacad03f68b3e0d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#gab252d5d81b925136dda72e8f1c09c5eb">theora_clear</a> (<a class="el" href="structtheora__state.html">theora_state</a> *t)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Free all internal data associated with a <a class="el" href="structtheora__state.html" title="Codec internal state and context.">theora_state</a> handle.  <a href="group__oldfuncs.html#gab252d5d81b925136dda72e8f1c09c5eb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga811b92785df3bdbbebb3de612d9d6ce0">theora_comment_init</a> (<a class="el" href="structtheora__comment.html">theora_comment</a> *tc)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize an allocated <a class="el" href="structtheora__comment.html" title="Comment header metadata.">theora_comment</a> structure.  <a href="group__oldfuncs.html#ga811b92785df3bdbbebb3de612d9d6ce0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga650642ed23894e41109bbc42ec393ed4">theora_comment_add</a> (<a class="el" href="structtheora__comment.html">theora_comment</a> *tc, char *comment)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a comment to an initialized <a class="el" href="structtheora__comment.html" title="Comment header metadata.">theora_comment</a> structure.  <a href="group__oldfuncs.html#ga650642ed23894e41109bbc42ec393ed4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga339bd80b5bf4bb168b7052d8ec0b5a92">theora_comment_add_tag</a> (<a class="el" href="structtheora__comment.html">theora_comment</a> *tc, char *tag, char *value)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a comment to an initialized <a class="el" href="structtheora__comment.html" title="Comment header metadata.">theora_comment</a> structure.  <a href="group__oldfuncs.html#ga339bd80b5bf4bb168b7052d8ec0b5a92"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga4361f6001abb5c83c36a2ddfb648a8dc">theora_comment_query</a> (<a class="el" href="structtheora__comment.html">theora_comment</a> *tc, char *tag, int count)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Look up a comment value by tag.  <a href="group__oldfuncs.html#ga4361f6001abb5c83c36a2ddfb648a8dc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga10f66a3c752442a3e0c0098e0f88df8b">theora_comment_query_count</a> (<a class="el" href="structtheora__comment.html">theora_comment</a> *tc, char *tag)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Look up the number of instances of a tag.  <a href="group__oldfuncs.html#ga10f66a3c752442a3e0c0098e0f88df8b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga04c07c2eefba3a433e43f9fbde14719f">theora_comment_clear</a> (<a class="el" href="structtheora__comment.html">theora_comment</a> *tc)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clear an allocated <a class="el" href="structtheora__comment.html" title="Comment header metadata.">theora_comment</a> struct so that it can be freed.  <a href="group__oldfuncs.html#ga04c07c2eefba3a433e43f9fbde14719f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__oldfuncs.html#ga186773db3bc8cd550047e7df1b2ba2c9">theora_control</a> (<a class="el" href="structtheora__state.html">theora_state</a> *th, int req, void *buf, size_t buf_sz)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Encoder control function.  <a href="group__oldfuncs.html#ga186773db3bc8cd550047e7df1b2ba2c9"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>The libtheora pre-1.0 legacy C API. </p>
<h2><a class="anchor" id="intro">
Introduction</a></h2>
<p>This is the documentation for the libtheora legacy C API, declared in the <a class="el" href="theora_8h.html" title="The libtheora pre-1.0 legacy C API.">theora.h</a> header, which describes the old interface used before the 1.0 release. This API was widely deployed for several years and remains supported, but for new code we recommend the cleaner API declared in <a class="el" href="theoradec_8h.html" title="The libtheoradec C decoding API.">theoradec.h</a> and <a class="el" href="theoraenc_8h.html" title="The libtheoraenc C encoding API.">theoraenc.h</a>.</p>
<p>libtheora is the reference implementation for <a href="http://www.theora.org/">Theora</a>, a free video codec. Theora is derived from On2's VP3 codec with improved integration with Ogg multimedia formats by <a href="http://www.xiph.org/">Xiph.Org</a>.</p>
<h2><a class="anchor" id="overview">
Overview</a></h2>
<p>This library will both decode and encode theora packets to/from raw YUV frames. In either case, the packets will most likely either come from or need to be embedded in an Ogg stream. Use <a href="http://xiph.org/ogg/">libogg</a> or <a href="http://www.annodex.net/software/liboggz/index.html">liboggz</a> to extract/package these packets.</p>
<h2><a class="anchor" id="decoding">
Decoding Process</a></h2>
<p>Decoding can be separated into the following steps:</p>
<ol type="1">
<li>initialise <a class="el" href="structtheora__info.html" title="Theora bitstream info.">theora_info</a> and <a class="el" href="structtheora__comment.html" title="Comment header metadata.">theora_comment</a> structures using <a class="el" href="group__oldfuncs.html#ga3091c87d48f1faba018c5956379a6d90" title="Initialize a theora_info structure.">theora_info_init()</a> and <a class="el" href="group__oldfuncs.html#ga811b92785df3bdbbebb3de612d9d6ce0" title="Initialize an allocated theora_comment structure.">theora_comment_init()</a>: <div class="fragment"><pre class="fragment">
 theora_info     info;
 theora_comment  comment;
   
 theora_info_init(&amp;info);
 theora_comment_init(&amp;comment);
 </pre></div></li>
<li>retrieve header packets from Ogg stream (there should be 3) and decode into <a class="el" href="structtheora__info.html" title="Theora bitstream info.">theora_info</a> and <a class="el" href="structtheora__comment.html" title="Comment header metadata.">theora_comment</a> structures using <a class="el" href="group__oldfuncs.html#ga02915e63c1bd733ee291f577a8b75a82" title="Decode an Ogg packet, with the expectation that the packet contains an initial header...">theora_decode_header()</a>. See <a class="el" href="theora_8h.html#identification">Identifying Theora Packets</a> for more information on identifying which packets are theora packets. <div class="fragment"><pre class="fragment">
 int i;
 for (i = 0; i &lt; 3; i++)
 {
   (get a theora packet "op" from the Ogg stream)
   theora_decode_header(&amp;info, &amp;comment, op);
 }
 </pre></div></li>
<li>initialise the decoder based on the information retrieved into the <a class="el" href="structtheora__info.html" title="Theora bitstream info.">theora_info</a> struct by <a class="el" href="group__oldfuncs.html#ga02915e63c1bd733ee291f577a8b75a82" title="Decode an Ogg packet, with the expectation that the packet contains an initial header...">theora_decode_header()</a>. You will need a <a class="el" href="structtheora__state.html" title="Codec internal state and context.">theora_state</a> struct. <div class="fragment"><pre class="fragment">
 theora_state state;
 
 theora_decode_init(&amp;state, &amp;info);
 </pre></div></li>
<li>pass in packets and retrieve decoded frames! See the <a class="el" href="structyuv__buffer.html" title="A YUV buffer for passing uncompressed frames to and from the codec.">yuv_buffer</a> documentation for information on how to retrieve raw YUV data. <div class="fragment"><pre class="fragment">
 yuf_buffer buffer;
 while (last packet was not e_o_s) {
   (get a theora packet "op" from the Ogg stream)
   theora_decode_packetin(&amp;state, op);
   theora_decode_YUVout(&amp;state, &amp;buffer);
 }
 </pre></div></li>
</ol>
<h3><a class="anchor" id="identification">
Identifying Theora Packets</a></h3>
<p>All streams inside an Ogg file have a unique serial_no attached to the stream. Typically, you will want to</p>
<ul>
<li>retrieve the serial_no for each b_o_s (beginning of stream) page encountered within the Ogg file;</li>
<li>test the first (only) packet on that page to determine if it is a theora packet;</li>
<li>once you have found a theora b_o_s page then use the retrieved serial_no to identify future packets belonging to the same theora stream.</li>
</ul>
<p>Note that you <em>cannot</em> use <a class="el" href="group__oldfuncs.html#gab969f9d0407683f0e5abe73d0839a25b" title="Report whether a theora packet is a header or not This function does no verification...">theora_packet_isheader()</a> to determine if a packet is a theora packet or not, as this function does not perform any checking beyond whether a header bit is present. Instead, use the <a class="el" href="group__oldfuncs.html#ga02915e63c1bd733ee291f577a8b75a82" title="Decode an Ogg packet, with the expectation that the packet contains an initial header...">theora_decode_header()</a> function and check the return value; or examine the header bytes at the beginning of the Ogg page. </p>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on 28 Sep 2009 for libtheora by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>