| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 5 |
<meta http-equiv="X-UA-Compatible" content="IE=11"/> |
| 6 |
<meta name="generator" content="Doxygen 1.9.4"/> |
| 7 |
<meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 8 |
<title>libkate: Decoding</title> |
| 9 |
<link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 10 |
<script type="text/javascript" src="jquery.js"></script> |
| 11 |
<script type="text/javascript" src="dynsections.js"></script> |
| 12 |
<link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 13 |
</head> |
| 14 |
<body> |
| 15 |
<div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 16 |
<div id="titlearea"> |
| 17 |
<table cellspacing="0" cellpadding="0"> |
| 18 |
<tbody> |
| 19 |
<tr id="projectrow"> |
| 20 |
<td id="projectalign"> |
| 21 |
<div id="projectname">libkate<span id="projectnumber"> 0.4.3</span> |
| 22 |
</div> |
| 23 |
</td> |
| 24 |
</tr> |
| 25 |
</tbody> |
| 26 |
</table> |
| 27 |
</div> |
| 28 |
<!-- end header part --> |
| 29 |
<!-- Generated by Doxygen 1.9.4 --> |
| 30 |
<script type="text/javascript" src="menudata.js"></script> |
| 31 |
<script type="text/javascript" src="menu.js"></script> |
| 32 |
<script type="text/javascript"> |
| 33 |
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ |
| 34 |
$(function() { |
| 35 |
initMenu('',false,false,'search.php','Search'); |
| 36 |
}); |
| 37 |
/* @license-end */ |
| 38 |
</script> |
| 39 |
<div id="main-nav"></div> |
| 40 |
</div><!-- top --> |
| 41 |
<div class="header"> |
| 42 |
<div class="summary"> |
| 43 |
<a href="#func-members">Functions</a> </div> |
| 44 |
<div class="headertitle"><div class="title">Decoding</div></div> |
| 45 |
</div><!--header--> |
| 46 |
<div class="contents"> |
| 47 |
<table class="memberdecls"> |
| 48 |
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a> |
| 49 |
Functions</h2></td></tr> |
| 50 |
<tr class="memitem:ga8c115ec78611f65acb573ad4cd0e43b1"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__decoding.html#ga8c115ec78611f65acb573ad4cd0e43b1">kate_decode_is_idheader</a> (const <a class="el" href="structkate__packet.html">kate_packet</a> *kp)</td></tr> |
| 51 |
<tr class="separator:ga8c115ec78611f65acb573ad4cd0e43b1"><td class="memSeparator" colspan="2"> </td></tr> |
| 52 |
<tr class="memitem:ga6ee6e5b8aa60a784f29245203e42d5f0"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__decoding.html#ga6ee6e5b8aa60a784f29245203e42d5f0">kate_decode_headerin</a> (<a class="el" href="structkate__info.html">kate_info</a> *ki, <a class="el" href="structkate__comment.html">kate_comment</a> *kc, <a class="el" href="structkate__packet.html">kate_packet</a> *kp)</td></tr> |
| 53 |
<tr class="separator:ga6ee6e5b8aa60a784f29245203e42d5f0"><td class="memSeparator" colspan="2"> </td></tr> |
| 54 |
<tr class="memitem:gaecc12ec59e4b3256f50b5c135d4fe90f"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__decoding.html#gaecc12ec59e4b3256f50b5c135d4fe90f">kate_decode_init</a> (<a class="el" href="structkate__state.html">kate_state</a> *k, <a class="el" href="structkate__info.html">kate_info</a> *ki)</td></tr> |
| 55 |
<tr class="separator:gaecc12ec59e4b3256f50b5c135d4fe90f"><td class="memSeparator" colspan="2"> </td></tr> |
| 56 |
<tr class="memitem:gaa64b1bc38a77b954377609c79e47bd55"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__decoding.html#gaa64b1bc38a77b954377609c79e47bd55">kate_decode_packetin</a> (<a class="el" href="structkate__state.html">kate_state</a> *k, <a class="el" href="structkate__packet.html">kate_packet</a> *kp)</td></tr> |
| 57 |
<tr class="separator:gaa64b1bc38a77b954377609c79e47bd55"><td class="memSeparator" colspan="2"> </td></tr> |
| 58 |
<tr class="memitem:gacdc7b2786e9fb2c8c685ebe3f483852c"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__decoding.html#gacdc7b2786e9fb2c8c685ebe3f483852c">kate_decode_eventout</a> (<a class="el" href="structkate__state.html">kate_state</a> *k, kate_const <a class="el" href="structkate__event.html">kate_event</a> **event)</td></tr> |
| 59 |
<tr class="separator:gacdc7b2786e9fb2c8c685ebe3f483852c"><td class="memSeparator" colspan="2"> </td></tr> |
| 60 |
<tr class="memitem:gade688e85ce9eaee37f98c7b1cde89674"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__decoding.html#gade688e85ce9eaee37f98c7b1cde89674">kate_decode_seek</a> (<a class="el" href="structkate__state.html">kate_state</a> *k)</td></tr> |
| 61 |
<tr class="separator:gade688e85ce9eaee37f98c7b1cde89674"><td class="memSeparator" colspan="2"> </td></tr> |
| 62 |
</table> |
| 63 |
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| 64 |
<h2 class="groupheader">Function Documentation</h2> |
| 65 |
<a id="gacdc7b2786e9fb2c8c685ebe3f483852c" name="gacdc7b2786e9fb2c8c685ebe3f483852c"></a> |
| 66 |
<h2 class="memtitle"><span class="permalink"><a href="#gacdc7b2786e9fb2c8c685ebe3f483852c">◆ </a></span>kate_decode_eventout()</h2> |
| 67 |
|
| 68 |
<div class="memitem"> |
| 69 |
<div class="memproto"> |
| 70 |
<table class="memname"> |
| 71 |
<tr> |
| 72 |
<td class="memname">int kate_decode_eventout </td> |
| 73 |
<td>(</td> |
| 74 |
<td class="paramtype"><a class="el" href="structkate__state.html">kate_state</a> * </td> |
| 75 |
<td class="paramname"><em>k</em>, </td> |
| 76 |
</tr> |
| 77 |
<tr> |
| 78 |
<td class="paramkey"></td> |
| 79 |
<td></td> |
| 80 |
<td class="paramtype">kate_const <a class="el" href="structkate__event.html">kate_event</a> ** </td> |
| 81 |
<td class="paramname"><em>event</em> </td> |
| 82 |
</tr> |
| 83 |
<tr> |
| 84 |
<td></td> |
| 85 |
<td>)</td> |
| 86 |
<td></td><td></td> |
| 87 |
</tr> |
| 88 |
</table> |
| 89 |
</div><div class="memdoc"> |
| 90 |
<p >Requests a pointer to the event decoded by the last packet, if there is one. </p><dl class="params"><dt>Parameters</dt><dd> |
| 91 |
<table class="params"> |
| 92 |
<tr><td class="paramname">k</td><td>the <a class="el" href="structkate__state.html">kate_state</a> to get the event from </td></tr> |
| 93 |
<tr><td class="paramname">event</td><td>a pointer to where to place the pointer to the event, if any </td></tr> |
| 94 |
</table> |
| 95 |
</dd> |
| 96 |
</dl> |
| 97 |
<dl class="section return"><dt>Returns</dt><dd>0 success, an event was returned </dd> |
| 98 |
<dd> |
| 99 |
1 success, but there was no event to return </dd> |
| 100 |
<dd> |
| 101 |
KATE_E_* error </dd></dl> |
| 102 |
|
| 103 |
<p class="reference">References <a class="el" href="kate_8h.html#ad1c08cc8ee706e7bec0a3ef7d93905c0">KATE_E_INIT</a>, and <a class="el" href="kate_8h.html#ae8ebebffaa4e6519c307a079d6d13107">KATE_E_INVALID_PARAMETER</a>.</p> |
| 104 |
|
| 105 |
<p class="reference">Referenced by <a class="el" href="group__high.html#ga4c9bac57e090c34e778b6f080cd4df82">kate_high_decode_packetin()</a>.</p> |
| 106 |
|
| 107 |
</div> |
| 108 |
</div> |
| 109 |
<a id="ga6ee6e5b8aa60a784f29245203e42d5f0" name="ga6ee6e5b8aa60a784f29245203e42d5f0"></a> |
| 110 |
<h2 class="memtitle"><span class="permalink"><a href="#ga6ee6e5b8aa60a784f29245203e42d5f0">◆ </a></span>kate_decode_headerin()</h2> |
| 111 |
|
| 112 |
<div class="memitem"> |
| 113 |
<div class="memproto"> |
| 114 |
<table class="memname"> |
| 115 |
<tr> |
| 116 |
<td class="memname">int kate_decode_headerin </td> |
| 117 |
<td>(</td> |
| 118 |
<td class="paramtype"><a class="el" href="structkate__info.html">kate_info</a> * </td> |
| 119 |
<td class="paramname"><em>ki</em>, </td> |
| 120 |
</tr> |
| 121 |
<tr> |
| 122 |
<td class="paramkey"></td> |
| 123 |
<td></td> |
| 124 |
<td class="paramtype"><a class="el" href="structkate__comment.html">kate_comment</a> * </td> |
| 125 |
<td class="paramname"><em>kc</em>, </td> |
| 126 |
</tr> |
| 127 |
<tr> |
| 128 |
<td class="paramkey"></td> |
| 129 |
<td></td> |
| 130 |
<td class="paramtype"><a class="el" href="structkate__packet.html">kate_packet</a> * </td> |
| 131 |
<td class="paramname"><em>kp</em> </td> |
| 132 |
</tr> |
| 133 |
<tr> |
| 134 |
<td></td> |
| 135 |
<td>)</td> |
| 136 |
<td></td><td></td> |
| 137 |
</tr> |
| 138 |
</table> |
| 139 |
</div><div class="memdoc"> |
| 140 |
<p >Decodes a header packet, and updates the <a class="el" href="structkate__info.html">kate_info</a> and <a class="el" href="structkate__comment.html">kate_comment</a> structures from the decoded data. </p><dl class="params"><dt>Parameters</dt><dd> |
| 141 |
<table class="params"> |
| 142 |
<tr><td class="paramname">ki</td><td>the <a class="el" href="structkate__info.html">kate_info</a> structure to update </td></tr> |
| 143 |
<tr><td class="paramname">kc</td><td>the <a class="el" href="structkate__comment.html">kate_comment</a> structure to update </td></tr> |
| 144 |
<tr><td class="paramname">kp</td><td>the packet to decode </td></tr> |
| 145 |
</table> |
| 146 |
</dd> |
| 147 |
</dl> |
| 148 |
<dl class="section return"><dt>Returns</dt><dd>0 success </dd> |
| 149 |
<dd> |
| 150 |
1 success, and all headers have been decoded </dd> |
| 151 |
<dd> |
| 152 |
KATE_E_* error </dd></dl> |
| 153 |
|
| 154 |
<p class="reference">References <a class="el" href="structkate__packet.html#aabf779dd48628d3ed726280bbce09791">kate_packet::data</a>, <a class="el" href="kate_8h.html#a3079c05a311796154325309b607aa723">KATE_E_BAD_PACKET</a>, <a class="el" href="kate_8h.html#ae8ebebffaa4e6519c307a079d6d13107">KATE_E_INVALID_PARAMETER</a>, and <a class="el" href="structkate__packet.html#a32674c8a6d9f8efc1d38ea9dfbcca204">kate_packet::nbytes</a>.</p> |
| 155 |
|
| 156 |
<p class="reference">Referenced by <a class="el" href="group__high.html#ga4c9bac57e090c34e778b6f080cd4df82">kate_high_decode_packetin()</a>, and <a class="el" href="oggkate_8h.html#ad9a723eff7f66cadae79719d09aebd4d">kate_ogg_decode_headerin()</a>.</p> |
| 157 |
|
| 158 |
</div> |
| 159 |
</div> |
| 160 |
<a id="gaecc12ec59e4b3256f50b5c135d4fe90f" name="gaecc12ec59e4b3256f50b5c135d4fe90f"></a> |
| 161 |
<h2 class="memtitle"><span class="permalink"><a href="#gaecc12ec59e4b3256f50b5c135d4fe90f">◆ </a></span>kate_decode_init()</h2> |
| 162 |
|
| 163 |
<div class="memitem"> |
| 164 |
<div class="memproto"> |
| 165 |
<table class="memname"> |
| 166 |
<tr> |
| 167 |
<td class="memname">int kate_decode_init </td> |
| 168 |
<td>(</td> |
| 169 |
<td class="paramtype"><a class="el" href="structkate__state.html">kate_state</a> * </td> |
| 170 |
<td class="paramname"><em>k</em>, </td> |
| 171 |
</tr> |
| 172 |
<tr> |
| 173 |
<td class="paramkey"></td> |
| 174 |
<td></td> |
| 175 |
<td class="paramtype"><a class="el" href="structkate__info.html">kate_info</a> * </td> |
| 176 |
<td class="paramname"><em>ki</em> </td> |
| 177 |
</tr> |
| 178 |
<tr> |
| 179 |
<td></td> |
| 180 |
<td>)</td> |
| 181 |
<td></td><td></td> |
| 182 |
</tr> |
| 183 |
</table> |
| 184 |
</div><div class="memdoc"> |
| 185 |
<p >Initializes a <a class="el" href="structkate__state.html">kate_state</a> structure for decoding using the supplied <a class="el" href="structkate__info.html">kate_info</a> structure. When done, the <a class="el" href="structkate__state.html">kate_state</a> should be cleared using kate_clear. </p><dl class="params"><dt>Parameters</dt><dd> |
| 186 |
<table class="params"> |
| 187 |
<tr><td class="paramname">k</td><td>the <a class="el" href="structkate__state.html">kate_state</a> to initialize for decoding </td></tr> |
| 188 |
<tr><td class="paramname">ki</td><td>the <a class="el" href="structkate__info.html">kate_info</a> structure initialized from the decoded headers </td></tr> |
| 189 |
</table> |
| 190 |
</dd> |
| 191 |
</dl> |
| 192 |
<dl class="section return"><dt>Returns</dt><dd>0 success </dd> |
| 193 |
<dd> |
| 194 |
KATE_E_* error </dd></dl> |
| 195 |
|
| 196 |
<p class="reference">References <a class="el" href="kate_8h.html#ae8ebebffaa4e6519c307a079d6d13107">KATE_E_INVALID_PARAMETER</a>, <a class="el" href="kate_8h.html#ace0a2017701cecf1b747df1744f02412">KATE_E_OUT_OF_MEMORY</a>, and <a class="el" href="structkate__state.html#a74beb182759b404cd99e78614a7d5deb">kate_state::ki</a>.</p> |
| 197 |
|
| 198 |
</div> |
| 199 |
</div> |
| 200 |
<a id="ga8c115ec78611f65acb573ad4cd0e43b1" name="ga8c115ec78611f65acb573ad4cd0e43b1"></a> |
| 201 |
<h2 class="memtitle"><span class="permalink"><a href="#ga8c115ec78611f65acb573ad4cd0e43b1">◆ </a></span>kate_decode_is_idheader()</h2> |
| 202 |
|
| 203 |
<div class="memitem"> |
| 204 |
<div class="memproto"> |
| 205 |
<table class="memname"> |
| 206 |
<tr> |
| 207 |
<td class="memname">int kate_decode_is_idheader </td> |
| 208 |
<td>(</td> |
| 209 |
<td class="paramtype">const <a class="el" href="structkate__packet.html">kate_packet</a> * </td> |
| 210 |
<td class="paramname"><em>kp</em></td><td>)</td> |
| 211 |
<td></td> |
| 212 |
</tr> |
| 213 |
</table> |
| 214 |
</div><div class="memdoc"> |
| 215 |
<p >Checks if a packet is a Kate ID header </p><dl class="params"><dt>Parameters</dt><dd> |
| 216 |
<table class="params"> |
| 217 |
<tr><td class="paramname">kp</td><td>the packet to inspect </td></tr> |
| 218 |
</table> |
| 219 |
</dd> |
| 220 |
</dl> |
| 221 |
<dl class="section return"><dt>Returns</dt><dd>0 the packet is not an ID header </dd> |
| 222 |
<dd> |
| 223 |
!=0 the packet is an ID header </dd></dl> |
| 224 |
|
| 225 |
<p class="reference">References <a class="el" href="structkate__packet.html#aabf779dd48628d3ed726280bbce09791">kate_packet::data</a>, and <a class="el" href="structkate__packet.html#a32674c8a6d9f8efc1d38ea9dfbcca204">kate_packet::nbytes</a>.</p> |
| 226 |
|
| 227 |
<p class="reference">Referenced by <a class="el" href="oggkate_8h.html#a76fb6b637e8608f2c1f482d72e8f04de">kate_ogg_decode_is_idheader()</a>.</p> |
| 228 |
|
| 229 |
</div> |
| 230 |
</div> |
| 231 |
<a id="gaa64b1bc38a77b954377609c79e47bd55" name="gaa64b1bc38a77b954377609c79e47bd55"></a> |
| 232 |
<h2 class="memtitle"><span class="permalink"><a href="#gaa64b1bc38a77b954377609c79e47bd55">◆ </a></span>kate_decode_packetin()</h2> |
| 233 |
|
| 234 |
<div class="memitem"> |
| 235 |
<div class="memproto"> |
| 236 |
<table class="memname"> |
| 237 |
<tr> |
| 238 |
<td class="memname">int kate_decode_packetin </td> |
| 239 |
<td>(</td> |
| 240 |
<td class="paramtype"><a class="el" href="structkate__state.html">kate_state</a> * </td> |
| 241 |
<td class="paramname"><em>k</em>, </td> |
| 242 |
</tr> |
| 243 |
<tr> |
| 244 |
<td class="paramkey"></td> |
| 245 |
<td></td> |
| 246 |
<td class="paramtype"><a class="el" href="structkate__packet.html">kate_packet</a> * </td> |
| 247 |
<td class="paramname"><em>kp</em> </td> |
| 248 |
</tr> |
| 249 |
<tr> |
| 250 |
<td></td> |
| 251 |
<td>)</td> |
| 252 |
<td></td><td></td> |
| 253 |
</tr> |
| 254 |
</table> |
| 255 |
</div><div class="memdoc"> |
| 256 |
<p >Decodes a data packet. </p><dl class="params"><dt>Parameters</dt><dd> |
| 257 |
<table class="params"> |
| 258 |
<tr><td class="paramname">k</td><td>the <a class="el" href="structkate__state.html">kate_state</a> to decode to </td></tr> |
| 259 |
<tr><td class="paramname">kp</td><td>the packet to decode </td></tr> |
| 260 |
</table> |
| 261 |
</dd> |
| 262 |
</dl> |
| 263 |
<dl class="section return"><dt>Returns</dt><dd>0 success </dd> |
| 264 |
<dd> |
| 265 |
1 success, and we're at end of stream </dd> |
| 266 |
<dd> |
| 267 |
KATE_E_* error </dd></dl> |
| 268 |
|
| 269 |
<p class="reference">References <a class="el" href="structkate__packet.html#aabf779dd48628d3ed726280bbce09791">kate_packet::data</a>, <a class="el" href="kate_8h.html#ad1c08cc8ee706e7bec0a3ef7d93905c0">KATE_E_INIT</a>, <a class="el" href="kate_8h.html#ae8ebebffaa4e6519c307a079d6d13107">KATE_E_INVALID_PARAMETER</a>, <a class="el" href="structkate__state.html#a74beb182759b404cd99e78614a7d5deb">kate_state::ki</a>, and <a class="el" href="structkate__packet.html#a32674c8a6d9f8efc1d38ea9dfbcca204">kate_packet::nbytes</a>.</p> |
| 270 |
|
| 271 |
<p class="reference">Referenced by <a class="el" href="group__high.html#ga4c9bac57e090c34e778b6f080cd4df82">kate_high_decode_packetin()</a>, and <a class="el" href="oggkate_8h.html#a66a5a414cf4ad9b094b27a78c00e83a7">kate_ogg_decode_packetin()</a>.</p> |
| 272 |
|
| 273 |
</div> |
| 274 |
</div> |
| 275 |
<a id="gade688e85ce9eaee37f98c7b1cde89674" name="gade688e85ce9eaee37f98c7b1cde89674"></a> |
| 276 |
<h2 class="memtitle"><span class="permalink"><a href="#gade688e85ce9eaee37f98c7b1cde89674">◆ </a></span>kate_decode_seek()</h2> |
| 277 |
|
| 278 |
<div class="memitem"> |
| 279 |
<div class="memproto"> |
| 280 |
<table class="memname"> |
| 281 |
<tr> |
| 282 |
<td class="memname">int kate_decode_seek </td> |
| 283 |
<td>(</td> |
| 284 |
<td class="paramtype"><a class="el" href="structkate__state.html">kate_state</a> * </td> |
| 285 |
<td class="paramname"><em>k</em></td><td>)</td> |
| 286 |
<td></td> |
| 287 |
</tr> |
| 288 |
</table> |
| 289 |
</div><div class="memdoc"> |
| 290 |
<p >Informs the Kate decoder that seeking has occured. This will cause the decoder to use any future repeat packets to recover data from past events which are still active, but which original packets were before the seek point, and therefore unavailable. </p><dl class="params"><dt>Parameters</dt><dd> |
| 291 |
<table class="params"> |
| 292 |
<tr><td class="paramname">k</td><td>the <a class="el" href="structkate__state.html">kate_state</a> for which a seek occured </td></tr> |
| 293 |
</table> |
| 294 |
</dd> |
| 295 |
</dl> |
| 296 |
<dl class="section return"><dt>Returns</dt><dd>0 success </dd> |
| 297 |
<dd> |
| 298 |
KATE_E_* error </dd></dl> |
| 299 |
|
| 300 |
<p class="reference">References <a class="el" href="kate_8h.html#ad1c08cc8ee706e7bec0a3ef7d93905c0">KATE_E_INIT</a>, and <a class="el" href="kate_8h.html#ae8ebebffaa4e6519c307a079d6d13107">KATE_E_INVALID_PARAMETER</a>.</p> |
| 301 |
|
| 302 |
</div> |
| 303 |
</div> |
| 304 |
</div><!-- contents --> |
| 305 |
<!-- start footer part --> |
| 306 |
<hr class="footer"/><address class="footer"><small> |
| 307 |
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4 |
| 308 |
</small></address> |
| 309 |
</body> |
| 310 |
</html> |