blob: 6aa84709f866448edf50237fab5bb97325859eda (
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
|
<html>
<head>
<title>libogg - Encoding</title>
<link rel=stylesheet href="style.css" type="text/css">
</head>
<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
<table border=0 width=100%>
<tr>
<td><p class=tiny>libogg documentation</p></td>
<td align=right><p class=tiny>libogg release 1.3.2 - 20140527</p></td>
</tr>
</table>
<h1>Encoding</h1>
<p>Libogg contains a set of functions used in the encoding process.
<p>
All the <b>libogg</b> specific functions are declared in "ogg/ogg.h".
<p>
<p>When encoding, the encoding engine will output raw packets which must be placed into an Ogg bitstream.
<p>Raw packets are inserted into the stream, and an <a href="ogg_page.html">ogg_page</a> is output when enough packets have been written to create a full page. The pages output are pointers to buffered packet segments, and can then be written out and saved as an ogg stream.
<p>There are a couple of basic steps:
<ul>
<li>Use the encoding engine to produce a raw packet of data.
<li>Call <a href="ogg_stream_packetin.html">ogg_stream_packetin</a> to submit a raw packet to the stream.
<li>Use <a href="ogg_stream_pageout.html">ogg_stream_pageout</a> to output a page, if enough data has been submitted. Otherwise, continue submitting data.
</ul>
<br><br>
<table border=1 color=black width=50% cellspacing=0 cellpadding=7>
<tr bgcolor=#cccccc>
<td><b>function</b></td>
<td><b>purpose</b></td>
</tr>
<tr valign=top>
<td><a href="ogg_stream_packetin.html">ogg_stream_packetin</a></td>
<td>Submits a raw packet to the streaming layer, so that it can be formed into a page.</td>
</tr>
<tr valign=top>
<td><a href="ogg_stream_iovecin.html">ogg_stream_iovecin</a></td>
<td>iovec version of ogg_stream_packetin() above.</td>
</tr>
<tr valign=top>
<td><a href="ogg_stream_pageout.html">ogg_stream_pageout</a></td>
<td>Outputs a completed page if the stream contains enough packets to form a full page.<td>
</tr>
<tr valign=top>
<td><a href="ogg_stream_pageout_fill.html">ogg_stream_pageout_fill</a></td>
<td>Similar to ogg_stream_pageout(), but specifies a page spill threshold in bytes.
</tr>
<tr valign=top>
<td><a href="ogg_stream_flush.html">ogg_stream_flush</a></td>
<td>Forces any remaining packets in the stream to be returned as a page of any size.<td>
</tr>
<tr valign=top>
<td><a href="ogg_stream_flush_fill.html">ogg_stream_flush_fill</a></td>
<td>Similar to ogg_stream_flush(), but specifies a page spill threshold in bytes.<td>
</tr>
</table>
<br><br>
<hr noshade>
<table border=0 width=100%>
<tr valign=top>
<td><p class=tiny>copyright © 2000-2014 Xiph.Org</p></td>
<td align=right><p class=tiny><a href="http://www.xiph.org/ogg/">Ogg Container Format</a></p></td>
</tr><tr>
<td><p class=tiny>libogg documentation</p></td>
<td align=right><p class=tiny>libogg release 1.3.2 - 20140527</p></td>
</tr>
</table>
</body>
</html>
|