1.4.5 migration and bug fixes
[platform/upstream/gst-rtsp-server.git] / docs / libs / html / gst-rtsp-server-GstRTSPAddressPool.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GStreamer RTSP Server Reference Manual: GstRTSPAddressPool</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="index.html" title="GStreamer RTSP Server Reference Manual">
8 <link rel="up" href="ch01.html" title="">
9 <link rel="prev" href="gst-rtsp-server-GstRTSPSdp.html" title="GstRTSPSdp">
10 <link rel="next" href="gst-rtsp-server-GstRTSPThreadPool.html" title="GstRTSPThreadPool">
11 <meta name="generator" content="GTK-Doc V1.21 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18                   <a href="#gst-rtsp-server-GstRTSPAddressPool.description" class="shortcut">Description</a></span>
19 </td>
20 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
21 <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
22 <td><a accesskey="p" href="gst-rtsp-server-GstRTSPSdp.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23 <td><a accesskey="n" href="gst-rtsp-server-GstRTSPThreadPool.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
24 </tr></table>
25 <div class="refentry">
26 <a name="gst-rtsp-server-GstRTSPAddressPool"></a><div class="titlepage"></div>
27 <div class="refnamediv"><table width="100%"><tr>
28 <td valign="top">
29 <h2><span class="refentrytitle"><a name="gst-rtsp-server-GstRTSPAddressPool.top_of_page"></a>GstRTSPAddressPool</span></h2>
30 <p>GstRTSPAddressPool — A pool of network addresses</p>
31 </td>
32 <td class="gallery_image" valign="top" align="right"></td>
33 </tr></table></div>
34 <div class="refsect1">
35 <a name="gst-rtsp-server-GstRTSPAddressPool.functions"></a><h2>Functions</h2>
36 <div class="informaltable"><table width="100%" border="0">
37 <colgroup>
38 <col width="150px" class="functions_return">
39 <col class="functions_name">
40 </colgroup>
41 <tbody>
42 <tr>
43 <td class="function_type">
44 <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddress" title="struct GstRTSPAddress"><span class="returnvalue">GstRTSPAddress</span></a> *
45 </td>
46 <td class="function_name">
47 <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#gst-rtsp-address-copy" title="gst_rtsp_address_copy ()">gst_rtsp_address_copy</a> <span class="c_punctuation">()</span>
48 </td>
49 </tr>
50 <tr>
51 <td class="function_type">
52 <span class="returnvalue">void</span>
53 </td>
54 <td class="function_name">
55 <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#gst-rtsp-address-free" title="gst_rtsp_address_free ()">gst_rtsp_address_free</a> <span class="c_punctuation">()</span>
56 </td>
57 </tr>
58 <tr>
59 <td class="function_type">
60 <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool"><span class="returnvalue">GstRTSPAddressPool</span></a> *
61 </td>
62 <td class="function_name">
63 <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#gst-rtsp-address-pool-new" title="gst_rtsp_address_pool_new ()">gst_rtsp_address_pool_new</a> <span class="c_punctuation">()</span>
64 </td>
65 </tr>
66 <tr>
67 <td class="function_type">
68 <span class="returnvalue">void</span>
69 </td>
70 <td class="function_name">
71 <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#gst-rtsp-address-pool-clear" title="gst_rtsp_address_pool_clear ()">gst_rtsp_address_pool_clear</a> <span class="c_punctuation">()</span>
72 </td>
73 </tr>
74 <tr>
75 <td class="function_type">
76 <span class="returnvalue">void</span>
77 </td>
78 <td class="function_name">
79 <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#gst-rtsp-address-pool-dump" title="gst_rtsp_address_pool_dump ()">gst_rtsp_address_pool_dump</a> <span class="c_punctuation">()</span>
80 </td>
81 </tr>
82 <tr>
83 <td class="function_type">
84 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
85 </td>
86 <td class="function_name">
87 <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#gst-rtsp-address-pool-add-range" title="gst_rtsp_address_pool_add_range ()">gst_rtsp_address_pool_add_range</a> <span class="c_punctuation">()</span>
88 </td>
89 </tr>
90 <tr>
91 <td class="function_type">
92 <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
93 </td>
94 <td class="function_name">
95 <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#gst-rtsp-address-pool-has-unicast-addresses" title="gst_rtsp_address_pool_has_unicast_addresses ()">gst_rtsp_address_pool_has_unicast_addresses</a> <span class="c_punctuation">()</span>
96 </td>
97 </tr>
98 <tr>
99 <td class="function_type">
100 <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddress" title="struct GstRTSPAddress"><span class="returnvalue">GstRTSPAddress</span></a> *
101 </td>
102 <td class="function_name">
103 <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#gst-rtsp-address-pool-acquire-address" title="gst_rtsp_address_pool_acquire_address ()">gst_rtsp_address_pool_acquire_address</a> <span class="c_punctuation">()</span>
104 </td>
105 </tr>
106 <tr>
107 <td class="function_type">
108 <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPoolResult" title="enum GstRTSPAddressPoolResult"><span class="returnvalue">GstRTSPAddressPoolResult</span></a>
109 </td>
110 <td class="function_name">
111 <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#gst-rtsp-address-pool-reserve-address" title="gst_rtsp_address_pool_reserve_address ()">gst_rtsp_address_pool_reserve_address</a> <span class="c_punctuation">()</span>
112 </td>
113 </tr>
114 </tbody>
115 </table></div>
116 </div>
117 <div class="refsect1">
118 <a name="gst-rtsp-server-GstRTSPAddressPool.other"></a><h2>Types and Values</h2>
119 <div class="informaltable"><table width="100%" border="0">
120 <colgroup>
121 <col width="150px" class="name">
122 <col class="description">
123 </colgroup>
124 <tbody>
125 <tr>
126 <td class="define_keyword">#define</td>
127 <td class="function_name"><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GST-RTSP-ADDRESS-POOL-ANY-IPV4:CAPS" title="GST_RTSP_ADDRESS_POOL_ANY_IPV4">GST_RTSP_ADDRESS_POOL_ANY_IPV4</a></td>
128 </tr>
129 <tr>
130 <td class="define_keyword">#define</td>
131 <td class="function_name"><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GST-RTSP-ADDRESS-POOL-ANY-IPV6:CAPS" title="GST_RTSP_ADDRESS_POOL_ANY_IPV6">GST_RTSP_ADDRESS_POOL_ANY_IPV6</a></td>
132 </tr>
133 <tr>
134 <td class="datatype_keyword">struct</td>
135 <td class="function_name"><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddress" title="struct GstRTSPAddress">GstRTSPAddress</a></td>
136 </tr>
137 <tr>
138 <td class="datatype_keyword">enum</td>
139 <td class="function_name"><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressFlags" title="enum GstRTSPAddressFlags">GstRTSPAddressFlags</a></td>
140 </tr>
141 <tr>
142 <td class="datatype_keyword">struct</td>
143 <td class="function_name"><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool">GstRTSPAddressPool</a></td>
144 </tr>
145 <tr>
146 <td class="datatype_keyword">struct</td>
147 <td class="function_name"><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPoolClass" title="struct GstRTSPAddressPoolClass">GstRTSPAddressPoolClass</a></td>
148 </tr>
149 <tr>
150 <td class="datatype_keyword">enum</td>
151 <td class="function_name"><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPoolResult" title="enum GstRTSPAddressPoolResult">GstRTSPAddressPoolResult</a></td>
152 </tr>
153 </tbody>
154 </table></div>
155 </div>
156 <div class="refsect1">
157 <a name="gst-rtsp-server-GstRTSPAddressPool.description"></a><h2>Description</h2>
158 <p>The <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool"><span class="type">GstRTSPAddressPool</span></a> is an object that maintains a collection of network
159 addresses. It is used to allocate server ports and server multicast addresses
160 but also to reserve client provided destination addresses.</p>
161 <p>A range of addresses can be added with <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#gst-rtsp-address-pool-add-range" title="gst_rtsp_address_pool_add_range ()"><code class="function">gst_rtsp_address_pool_add_range()</code></a>.
162 Both multicast and unicast addresses can be added.</p>
163 <p>With <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#gst-rtsp-address-pool-acquire-address" title="gst_rtsp_address_pool_acquire_address ()"><code class="function">gst_rtsp_address_pool_acquire_address()</code></a> an unused address and port range
164 can be acquired from the pool. With <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#gst-rtsp-address-pool-reserve-address" title="gst_rtsp_address_pool_reserve_address ()"><code class="function">gst_rtsp_address_pool_reserve_address()</code></a> a
165 specific address can be retrieved. Both methods return a boxed
166 <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddress" title="struct GstRTSPAddress"><span class="type">GstRTSPAddress</span></a> that should be freed with <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#gst-rtsp-address-free" title="gst_rtsp_address_free ()"><code class="function">gst_rtsp_address_free()</code></a> after
167 usage, which brings the address back into the pool.</p>
168 <p>Last reviewed on 2013-07-16 (1.0.0)</p>
169 </div>
170 <div class="refsect1">
171 <a name="gst-rtsp-server-GstRTSPAddressPool.functions_details"></a><h2>Functions</h2>
172 <div class="refsect2">
173 <a name="gst-rtsp-address-copy"></a><h3>gst_rtsp_address_copy ()</h3>
174 <pre class="programlisting"><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddress" title="struct GstRTSPAddress"><span class="returnvalue">GstRTSPAddress</span></a> *
175 gst_rtsp_address_copy (<em class="parameter"><code><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddress" title="struct GstRTSPAddress"><span class="type">GstRTSPAddress</span></a> *addr</code></em>);</pre>
176 <p>Make a copy of <em class="parameter"><code>addr</code></em>
177 .</p>
178 <div class="refsect3">
179 <a name="id-1.2.14.6.2.5"></a><h4>Parameters</h4>
180 <div class="informaltable"><table width="100%" border="0">
181 <colgroup>
182 <col width="150px" class="parameters_name">
183 <col class="parameters_description">
184 <col width="200px" class="parameters_annotations">
185 </colgroup>
186 <tbody><tr>
187 <td class="parameter_name"><p>addr</p></td>
188 <td class="parameter_description"><p>a <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddress" title="struct GstRTSPAddress"><span class="type">GstRTSPAddress</span></a></p></td>
189 <td class="parameter_annotations"> </td>
190 </tr></tbody>
191 </table></div>
192 </div>
193 <div class="refsect3">
194 <a name="id-1.2.14.6.2.6"></a><h4>Returns</h4>
195 <p> a copy of <em class="parameter"><code>addr</code></em>
196 .</p>
197 <p></p>
198 </div>
199 </div>
200 <hr>
201 <div class="refsect2">
202 <a name="gst-rtsp-address-free"></a><h3>gst_rtsp_address_free ()</h3>
203 <pre class="programlisting"><span class="returnvalue">void</span>
204 gst_rtsp_address_free (<em class="parameter"><code><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddress" title="struct GstRTSPAddress"><span class="type">GstRTSPAddress</span></a> *addr</code></em>);</pre>
205 <p>Free <em class="parameter"><code>addr</code></em>
206  and releasing it back into the pool when owned by a
207 pool.</p>
208 <div class="refsect3">
209 <a name="id-1.2.14.6.3.5"></a><h4>Parameters</h4>
210 <div class="informaltable"><table width="100%" border="0">
211 <colgroup>
212 <col width="150px" class="parameters_name">
213 <col class="parameters_description">
214 <col width="200px" class="parameters_annotations">
215 </colgroup>
216 <tbody><tr>
217 <td class="parameter_name"><p>addr</p></td>
218 <td class="parameter_description"><p>a <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddress" title="struct GstRTSPAddress"><span class="type">GstRTSPAddress</span></a></p></td>
219 <td class="parameter_annotations"> </td>
220 </tr></tbody>
221 </table></div>
222 </div>
223 </div>
224 <hr>
225 <div class="refsect2">
226 <a name="gst-rtsp-address-pool-new"></a><h3>gst_rtsp_address_pool_new ()</h3>
227 <pre class="programlisting"><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool"><span class="returnvalue">GstRTSPAddressPool</span></a> *
228 gst_rtsp_address_pool_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
229 <p>Make a new <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool"><span class="type">GstRTSPAddressPool</span></a>.</p>
230 <div class="refsect3">
231 <a name="id-1.2.14.6.4.5"></a><h4>Returns</h4>
232 <p> a new <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool"><span class="type">GstRTSPAddressPool</span></a>. </p>
233 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
234 </div>
235 </div>
236 <hr>
237 <div class="refsect2">
238 <a name="gst-rtsp-address-pool-clear"></a><h3>gst_rtsp_address_pool_clear ()</h3>
239 <pre class="programlisting"><span class="returnvalue">void</span>
240 gst_rtsp_address_pool_clear (<em class="parameter"><code><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool"><span class="type">GstRTSPAddressPool</span></a> *pool</code></em>);</pre>
241 <p>Clear all addresses in <em class="parameter"><code>pool</code></em>
242 . There should be no outstanding
243 allocations.</p>
244 <div class="refsect3">
245 <a name="id-1.2.14.6.5.5"></a><h4>Parameters</h4>
246 <div class="informaltable"><table width="100%" border="0">
247 <colgroup>
248 <col width="150px" class="parameters_name">
249 <col class="parameters_description">
250 <col width="200px" class="parameters_annotations">
251 </colgroup>
252 <tbody><tr>
253 <td class="parameter_name"><p>pool</p></td>
254 <td class="parameter_description"><p>a <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool"><span class="type">GstRTSPAddressPool</span></a></p></td>
255 <td class="parameter_annotations"> </td>
256 </tr></tbody>
257 </table></div>
258 </div>
259 </div>
260 <hr>
261 <div class="refsect2">
262 <a name="gst-rtsp-address-pool-dump"></a><h3>gst_rtsp_address_pool_dump ()</h3>
263 <pre class="programlisting"><span class="returnvalue">void</span>
264 gst_rtsp_address_pool_dump (<em class="parameter"><code><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool"><span class="type">GstRTSPAddressPool</span></a> *pool</code></em>);</pre>
265 <p>Dump the free and allocated addresses to stdout.</p>
266 <div class="refsect3">
267 <a name="id-1.2.14.6.6.5"></a><h4>Parameters</h4>
268 <div class="informaltable"><table width="100%" border="0">
269 <colgroup>
270 <col width="150px" class="parameters_name">
271 <col class="parameters_description">
272 <col width="200px" class="parameters_annotations">
273 </colgroup>
274 <tbody><tr>
275 <td class="parameter_name"><p>pool</p></td>
276 <td class="parameter_description"><p>a <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool"><span class="type">GstRTSPAddressPool</span></a></p></td>
277 <td class="parameter_annotations"> </td>
278 </tr></tbody>
279 </table></div>
280 </div>
281 </div>
282 <hr>
283 <div class="refsect2">
284 <a name="gst-rtsp-address-pool-add-range"></a><h3>gst_rtsp_address_pool_add_range ()</h3>
285 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
286 gst_rtsp_address_pool_add_range (<em class="parameter"><code><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool"><span class="type">GstRTSPAddressPool</span></a> *pool</code></em>,
287                                  <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *min_address</code></em>,
288                                  <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *max_address</code></em>,
289                                  <em class="parameter"><code><span class="type">guint16</span> min_port</code></em>,
290                                  <em class="parameter"><code><span class="type">guint16</span> max_port</code></em>,
291                                  <em class="parameter"><code><span class="type">guint8</span> ttl</code></em>);</pre>
292 <p>Adds the addresses from <em class="parameter"><code>min_addess</code></em>
293  to <em class="parameter"><code>max_address</code></em>
294  (inclusive)
295 to <em class="parameter"><code>pool</code></em>
296 . The valid port range for the addresses will be from <em class="parameter"><code>min_port</code></em>
297  to
298 <em class="parameter"><code>max_port</code></em>
299  inclusive.</p>
300 <p>When <em class="parameter"><code>ttl</code></em>
301  is 0, <em class="parameter"><code>min_address</code></em>
302  and <em class="parameter"><code>max_address</code></em>
303  should be unicast addresses.
304 <em class="parameter"><code>min_address</code></em>
305  and <em class="parameter"><code>max_address</code></em>
306  can be set to
307 <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GST-RTSP-ADDRESS-POOL-ANY-IPV4:CAPS" title="GST_RTSP_ADDRESS_POOL_ANY_IPV4"><span class="type">GST_RTSP_ADDRESS_POOL_ANY_IPV4</span></a> or <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GST-RTSP-ADDRESS-POOL-ANY-IPV6:CAPS" title="GST_RTSP_ADDRESS_POOL_ANY_IPV6"><span class="type">GST_RTSP_ADDRESS_POOL_ANY_IPV6</span></a> to bind
308 to all available IPv4 or IPv6 addresses.</p>
309 <p>When <em class="parameter"><code>ttl</code></em>
310  &gt; 0, <em class="parameter"><code>min_address</code></em>
311  and <em class="parameter"><code>max_address</code></em>
312  should be multicast addresses.</p>
313 <div class="refsect3">
314 <a name="id-1.2.14.6.7.7"></a><h4>Parameters</h4>
315 <div class="informaltable"><table width="100%" border="0">
316 <colgroup>
317 <col width="150px" class="parameters_name">
318 <col class="parameters_description">
319 <col width="200px" class="parameters_annotations">
320 </colgroup>
321 <tbody>
322 <tr>
323 <td class="parameter_name"><p>pool</p></td>
324 <td class="parameter_description"><p>a <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool"><span class="type">GstRTSPAddressPool</span></a></p></td>
325 <td class="parameter_annotations"> </td>
326 </tr>
327 <tr>
328 <td class="parameter_name"><p>min_address</p></td>
329 <td class="parameter_description"><p>a minimum address to add</p></td>
330 <td class="parameter_annotations"> </td>
331 </tr>
332 <tr>
333 <td class="parameter_name"><p>max_address</p></td>
334 <td class="parameter_description"><p>a maximum address to add</p></td>
335 <td class="parameter_annotations"> </td>
336 </tr>
337 <tr>
338 <td class="parameter_name"><p>min_port</p></td>
339 <td class="parameter_description"><p>the minimum port</p></td>
340 <td class="parameter_annotations"> </td>
341 </tr>
342 <tr>
343 <td class="parameter_name"><p>max_port</p></td>
344 <td class="parameter_description"><p>the maximum port</p></td>
345 <td class="parameter_annotations"> </td>
346 </tr>
347 <tr>
348 <td class="parameter_name"><p>ttl</p></td>
349 <td class="parameter_description"><p>a TTL or 0 for unicast addresses</p></td>
350 <td class="parameter_annotations"> </td>
351 </tr>
352 </tbody>
353 </table></div>
354 </div>
355 <div class="refsect3">
356 <a name="id-1.2.14.6.7.8"></a><h4>Returns</h4>
357 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the addresses could be added.</p>
358 <p></p>
359 </div>
360 </div>
361 <hr>
362 <div class="refsect2">
363 <a name="gst-rtsp-address-pool-has-unicast-addresses"></a><h3>gst_rtsp_address_pool_has_unicast_addresses ()</h3>
364 <pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
365 gst_rtsp_address_pool_has_unicast_addresses
366                                (<em class="parameter"><code><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool"><span class="type">GstRTSPAddressPool</span></a> *pool</code></em>);</pre>
367 <p>Used to know if the pool includes any unicast addresses.</p>
368 <div class="refsect3">
369 <a name="id-1.2.14.6.8.5"></a><h4>Parameters</h4>
370 <div class="informaltable"><table width="100%" border="0">
371 <colgroup>
372 <col width="150px" class="parameters_name">
373 <col class="parameters_description">
374 <col width="200px" class="parameters_annotations">
375 </colgroup>
376 <tbody><tr>
377 <td class="parameter_name"><p>pool</p></td>
378 <td class="parameter_description"><p>a <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool"><span class="type">GstRTSPAddressPool</span></a></p></td>
379 <td class="parameter_annotations"> </td>
380 </tr></tbody>
381 </table></div>
382 </div>
383 <div class="refsect3">
384 <a name="id-1.2.14.6.8.6"></a><h4>Returns</h4>
385 <p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the pool includes any unicast addresses, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
386 <p></p>
387 </div>
388 </div>
389 <hr>
390 <div class="refsect2">
391 <a name="gst-rtsp-address-pool-acquire-address"></a><h3>gst_rtsp_address_pool_acquire_address ()</h3>
392 <pre class="programlisting"><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddress" title="struct GstRTSPAddress"><span class="returnvalue">GstRTSPAddress</span></a> *
393 gst_rtsp_address_pool_acquire_address (<em class="parameter"><code><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool"><span class="type">GstRTSPAddressPool</span></a> *pool</code></em>,
394                                        <em class="parameter"><code><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressFlags" title="enum GstRTSPAddressFlags"><span class="type">GstRTSPAddressFlags</span></a> flags</code></em>,
395                                        <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_ports</code></em>);</pre>
396 <p>Take an address and ports from <em class="parameter"><code>pool</code></em>
397 . <em class="parameter"><code>flags</code></em>
398  can be used to control the
399 allocation. <em class="parameter"><code>n_ports</code></em>
400  consecutive ports will be allocated of which the first
401 one can be found in <em class="parameter"><code>port</code></em>
402 .</p>
403 <div class="refsect3">
404 <a name="id-1.2.14.6.9.5"></a><h4>Parameters</h4>
405 <div class="informaltable"><table width="100%" border="0">
406 <colgroup>
407 <col width="150px" class="parameters_name">
408 <col class="parameters_description">
409 <col width="200px" class="parameters_annotations">
410 </colgroup>
411 <tbody>
412 <tr>
413 <td class="parameter_name"><p>pool</p></td>
414 <td class="parameter_description"><p>a <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool"><span class="type">GstRTSPAddressPool</span></a></p></td>
415 <td class="parameter_annotations"> </td>
416 </tr>
417 <tr>
418 <td class="parameter_name"><p>flags</p></td>
419 <td class="parameter_description"><p>flags</p></td>
420 <td class="parameter_annotations"> </td>
421 </tr>
422 <tr>
423 <td class="parameter_name"><p>n_ports</p></td>
424 <td class="parameter_description"><p>the amount of ports</p></td>
425 <td class="parameter_annotations"> </td>
426 </tr>
427 </tbody>
428 </table></div>
429 </div>
430 <div class="refsect3">
431 <a name="id-1.2.14.6.9.6"></a><h4>Returns</h4>
432 <p> a <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddress" title="struct GstRTSPAddress"><span class="type">GstRTSPAddress</span></a> that should be freed with
433 gst_rtsp_address_free after use or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> when no address could be
434 acquired. </p>
435 <p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
436 </div>
437 </div>
438 <hr>
439 <div class="refsect2">
440 <a name="gst-rtsp-address-pool-reserve-address"></a><h3>gst_rtsp_address_pool_reserve_address ()</h3>
441 <pre class="programlisting"><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPoolResult" title="enum GstRTSPAddressPoolResult"><span class="returnvalue">GstRTSPAddressPoolResult</span></a>
442 gst_rtsp_address_pool_reserve_address (<em class="parameter"><code><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool"><span class="type">GstRTSPAddressPool</span></a> *pool</code></em>,
443                                        <em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *ip_address</code></em>,
444                                        <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> port</code></em>,
445                                        <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_ports</code></em>,
446                                        <em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> ttl</code></em>,
447                                        <em class="parameter"><code><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddress" title="struct GstRTSPAddress"><span class="type">GstRTSPAddress</span></a> **address</code></em>);</pre>
448 <p>Take a specific address and ports from <em class="parameter"><code>pool</code></em>
449 . <em class="parameter"><code>n_ports</code></em>
450  consecutive
451 ports will be allocated of which the first one can be found in
452 <em class="parameter"><code>port</code></em>
453 .</p>
454 <p>If <em class="parameter"><code>ttl</code></em>
455  is 0, <em class="parameter"><code>address</code></em>
456  should be a unicast address. If <em class="parameter"><code>ttl</code></em>
457  &gt; 0, <em class="parameter"><code>address</code></em>
458
459 should be a valid multicast address.</p>
460 <div class="refsect3">
461 <a name="id-1.2.14.6.10.6"></a><h4>Parameters</h4>
462 <div class="informaltable"><table width="100%" border="0">
463 <colgroup>
464 <col width="150px" class="parameters_name">
465 <col class="parameters_description">
466 <col width="200px" class="parameters_annotations">
467 </colgroup>
468 <tbody>
469 <tr>
470 <td class="parameter_name"><p>pool</p></td>
471 <td class="parameter_description"><p>a <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool"><span class="type">GstRTSPAddressPool</span></a></p></td>
472 <td class="parameter_annotations"> </td>
473 </tr>
474 <tr>
475 <td class="parameter_name"><p>ip_address</p></td>
476 <td class="parameter_description"><p>The IP address to reserve</p></td>
477 <td class="parameter_annotations"> </td>
478 </tr>
479 <tr>
480 <td class="parameter_name"><p>port</p></td>
481 <td class="parameter_description"><p>The first port to reserve</p></td>
482 <td class="parameter_annotations"> </td>
483 </tr>
484 <tr>
485 <td class="parameter_name"><p>n_ports</p></td>
486 <td class="parameter_description"><p>The number of ports</p></td>
487 <td class="parameter_annotations"> </td>
488 </tr>
489 <tr>
490 <td class="parameter_name"><p>ttl</p></td>
491 <td class="parameter_description"><p>The requested ttl</p></td>
492 <td class="parameter_annotations"> </td>
493 </tr>
494 <tr>
495 <td class="parameter_name"><p>address</p></td>
496 <td class="parameter_description"><p> storage for a <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddress" title="struct GstRTSPAddress"><span class="type">GstRTSPAddress</span></a>. </p></td>
497 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
498 </tr>
499 </tbody>
500 </table></div>
501 </div>
502 <div class="refsect3">
503 <a name="id-1.2.14.6.10.7"></a><h4>Returns</h4>
504 <p> <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GST-RTSP-ADDRESS-POOL-OK:CAPS"><span class="type">GST_RTSP_ADDRESS_POOL_OK</span></a> if an address was reserved. The address
505 is returned in <em class="parameter"><code>address</code></em>
506 and should be freed with gst_rtsp_address_free
507 after use.</p>
508 <p></p>
509 </div>
510 </div>
511 </div>
512 <div class="refsect1">
513 <a name="gst-rtsp-server-GstRTSPAddressPool.other_details"></a><h2>Types and Values</h2>
514 <div class="refsect2">
515 <a name="GST-RTSP-ADDRESS-POOL-ANY-IPV4:CAPS"></a><h3>GST_RTSP_ADDRESS_POOL_ANY_IPV4</h3>
516 <pre class="programlisting">#define GST_RTSP_ADDRESS_POOL_ANY_IPV4  "0.0.0.0"
517 </pre>
518 <p>Used with <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#gst-rtsp-address-pool-add-range" title="gst_rtsp_address_pool_add_range ()"><code class="function">gst_rtsp_address_pool_add_range()</code></a> to bind to all
519 IPv4 addresses</p>
520 </div>
521 <hr>
522 <div class="refsect2">
523 <a name="GST-RTSP-ADDRESS-POOL-ANY-IPV6:CAPS"></a><h3>GST_RTSP_ADDRESS_POOL_ANY_IPV6</h3>
524 <pre class="programlisting">#define GST_RTSP_ADDRESS_POOL_ANY_IPV6  "::"
525 </pre>
526 <p>Used with <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#gst-rtsp-address-pool-add-range" title="gst_rtsp_address_pool_add_range ()"><code class="function">gst_rtsp_address_pool_add_range()</code></a> to bind to all
527 IPv6 addresses</p>
528 </div>
529 <hr>
530 <div class="refsect2">
531 <a name="GstRTSPAddress"></a><h3>struct GstRTSPAddress</h3>
532 <pre class="programlisting">struct GstRTSPAddress {
533   GstRTSPAddressPool *pool;
534
535   gchar *address;
536   guint16 port;
537   gint n_ports;
538   guint8 ttl;
539 };
540 </pre>
541 <p>An address</p>
542 <div class="refsect3">
543 <a name="id-1.2.14.7.4.5"></a><h4>Members</h4>
544 <div class="informaltable"><table width="100%" border="0">
545 <colgroup>
546 <col width="300px" class="struct_members_name">
547 <col class="struct_members_description">
548 <col width="200px" class="struct_members_annotations">
549 </colgroup>
550 <tbody>
551 <tr>
552 <td class="struct_member_name"><p><a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool"><span class="type">GstRTSPAddressPool</span></a> *<em class="structfield"><code><a name="GstRTSPAddress.pool"></a>pool</code></em>;</p></td>
553 <td class="struct_member_description"><p>the <a class="link" href="gst-rtsp-server-GstRTSPAddressPool.html#GstRTSPAddressPool" title="struct GstRTSPAddressPool"><span class="type">GstRTSPAddressPool</span></a> owner of this address</p></td>
554 <td class="struct_member_annotations"> </td>
555 </tr>
556 <tr>
557 <td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GstRTSPAddress.address"></a>address</code></em>;</p></td>
558 <td class="struct_member_description"><p>the address</p></td>
559 <td class="struct_member_annotations"> </td>
560 </tr>
561 <tr>
562 <td class="struct_member_name"><p><span class="type">guint16</span> <em class="structfield"><code><a name="GstRTSPAddress.port"></a>port</code></em>;</p></td>
563 <td class="struct_member_description"><p>the port number</p></td>
564 <td class="struct_member_annotations"> </td>
565 </tr>
566 <tr>
567 <td class="struct_member_name"><p><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GstRTSPAddress.n-ports"></a>n_ports</code></em>;</p></td>
568 <td class="struct_member_description"><p>number of ports</p></td>
569 <td class="struct_member_annotations"> </td>
570 </tr>
571 <tr>
572 <td class="struct_member_name"><p><span class="type">guint8</span> <em class="structfield"><code><a name="GstRTSPAddress.ttl"></a>ttl</code></em>;</p></td>
573 <td class="struct_member_description"><p>TTL or 0 for unicast addresses</p></td>
574 <td class="struct_member_annotations"> </td>
575 </tr>
576 </tbody>
577 </table></div>
578 </div>
579 </div>
580 <hr>
581 <div class="refsect2">
582 <a name="GstRTSPAddressFlags"></a><h3>enum GstRTSPAddressFlags</h3>
583 <p>Flags used to control allocation of addresses</p>
584 <div class="refsect3">
585 <a name="id-1.2.14.7.5.4"></a><h4>Members</h4>
586 <div class="informaltable"><table width="100%" border="0">
587 <colgroup>
588 <col width="300px" class="enum_members_name">
589 <col class="enum_members_description">
590 <col width="200px" class="enum_members_annotations">
591 </colgroup>
592 <tbody>
593 <tr>
594 <td class="enum_member_name"><p><a name="GST-RTSP-ADDRESS-FLAG-NONE:CAPS"></a>GST_RTSP_ADDRESS_FLAG_NONE</p></td>
595 <td class="enum_member_description">
596 <p>no flags</p>
597 </td>
598 <td class="enum_member_annotations"> </td>
599 </tr>
600 <tr>
601 <td class="enum_member_name"><p><a name="GST-RTSP-ADDRESS-FLAG-IPV4:CAPS"></a>GST_RTSP_ADDRESS_FLAG_IPV4</p></td>
602 <td class="enum_member_description">
603 <p>an IPv4 address</p>
604 </td>
605 <td class="enum_member_annotations"> </td>
606 </tr>
607 <tr>
608 <td class="enum_member_name"><p><a name="GST-RTSP-ADDRESS-FLAG-IPV6:CAPS"></a>GST_RTSP_ADDRESS_FLAG_IPV6</p></td>
609 <td class="enum_member_description">
610 <p>and IPv6 address</p>
611 </td>
612 <td class="enum_member_annotations"> </td>
613 </tr>
614 <tr>
615 <td class="enum_member_name"><p><a name="GST-RTSP-ADDRESS-FLAG-EVEN-PORT:CAPS"></a>GST_RTSP_ADDRESS_FLAG_EVEN_PORT</p></td>
616 <td class="enum_member_description">
617 <p>address with an even port</p>
618 </td>
619 <td class="enum_member_annotations"> </td>
620 </tr>
621 <tr>
622 <td class="enum_member_name"><p><a name="GST-RTSP-ADDRESS-FLAG-MULTICAST:CAPS"></a>GST_RTSP_ADDRESS_FLAG_MULTICAST</p></td>
623 <td class="enum_member_description">
624 <p>a multicast address</p>
625 </td>
626 <td class="enum_member_annotations"> </td>
627 </tr>
628 <tr>
629 <td class="enum_member_name"><p><a name="GST-RTSP-ADDRESS-FLAG-UNICAST:CAPS"></a>GST_RTSP_ADDRESS_FLAG_UNICAST</p></td>
630 <td class="enum_member_description">
631 <p>a unicast address</p>
632 </td>
633 <td class="enum_member_annotations"> </td>
634 </tr>
635 </tbody>
636 </table></div>
637 </div>
638 </div>
639 <hr>
640 <div class="refsect2">
641 <a name="GstRTSPAddressPool"></a><h3>struct GstRTSPAddressPool</h3>
642 <pre class="programlisting">struct GstRTSPAddressPool {
643   GObject       parent;
644 };
645 </pre>
646 <p>An address pool, all member are private</p>
647 <div class="refsect3">
648 <a name="id-1.2.14.7.6.5"></a><h4>Members</h4>
649 <div class="informaltable"><table width="100%" border="0">
650 <colgroup>
651 <col width="300px" class="struct_members_name">
652 <col class="struct_members_description">
653 <col width="200px" class="struct_members_annotations">
654 </colgroup>
655 <tbody><tr>
656 <td class="struct_member_name"><p><a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> <em class="structfield"><code><a name="GstRTSPAddressPool.parent"></a>parent</code></em>;</p></td>
657 <td class="struct_member_description"><p>the parent GObject</p></td>
658 <td class="struct_member_annotations"> </td>
659 </tr></tbody>
660 </table></div>
661 </div>
662 </div>
663 <hr>
664 <div class="refsect2">
665 <a name="GstRTSPAddressPoolClass"></a><h3>struct GstRTSPAddressPoolClass</h3>
666 <pre class="programlisting">struct GstRTSPAddressPoolClass {
667   GObjectClass  parent_class;
668 };
669 </pre>
670 <p>Opaque Address pool class.</p>
671 </div>
672 <hr>
673 <div class="refsect2">
674 <a name="GstRTSPAddressPoolResult"></a><h3>enum GstRTSPAddressPoolResult</h3>
675 <p>Result codes from RTSP address pool functions.</p>
676 <div class="refsect3">
677 <a name="id-1.2.14.7.8.4"></a><h4>Members</h4>
678 <div class="informaltable"><table width="100%" border="0">
679 <colgroup>
680 <col width="300px" class="enum_members_name">
681 <col class="enum_members_description">
682 <col width="200px" class="enum_members_annotations">
683 </colgroup>
684 <tbody>
685 <tr>
686 <td class="enum_member_name"><p><a name="GST-RTSP-ADDRESS-POOL-OK:CAPS"></a>GST_RTSP_ADDRESS_POOL_OK</p></td>
687 <td class="enum_member_description">
688 <p>no error</p>
689 </td>
690 <td class="enum_member_annotations"> </td>
691 </tr>
692 <tr>
693 <td class="enum_member_name"><p><a name="GST-RTSP-ADDRESS-POOL-EINVAL:CAPS"></a>GST_RTSP_ADDRESS_POOL_EINVAL</p></td>
694 <td class="enum_member_description">
695 <p>invalid arguments were provided to a function</p>
696 </td>
697 <td class="enum_member_annotations"> </td>
698 </tr>
699 <tr>
700 <td class="enum_member_name"><p><a name="GST-RTSP-ADDRESS-POOL-ERESERVED:CAPS"></a>GST_RTSP_ADDRESS_POOL_ERESERVED</p></td>
701 <td class="enum_member_description">
702 <p>the addres has already been reserved</p>
703 </td>
704 <td class="enum_member_annotations"> </td>
705 </tr>
706 <tr>
707 <td class="enum_member_name"><p><a name="GST-RTSP-ADDRESS-POOL-ERANGE:CAPS"></a>GST_RTSP_ADDRESS_POOL_ERANGE</p></td>
708 <td class="enum_member_description">
709 <p>the address is not in the pool</p>
710 </td>
711 <td class="enum_member_annotations"> </td>
712 </tr>
713 <tr>
714 <td class="enum_member_name"><p><a name="GST-RTSP-ADDRESS-POOL-ELAST:CAPS"></a>GST_RTSP_ADDRESS_POOL_ELAST</p></td>
715 <td class="enum_member_description">
716 <p>last error</p>
717 </td>
718 <td class="enum_member_annotations"> </td>
719 </tr>
720 </tbody>
721 </table></div>
722 </div>
723 </div>
724 </div>
725 <div class="refsect1">
726 <a name="gst-rtsp-server-GstRTSPAddressPool.see-also"></a><h2>See Also</h2>
727 <p><a class="link" href="GstRTSPStream.html" title="GstRTSPStream"><span class="type">GstRTSPStream</span></a>, <a class="link" href="gst-rtsp-server-GstRTSPStreamTransport.html#GstRTSPStreamTransport" title="struct GstRTSPStreamTransport"><span class="type">GstRTSPStreamTransport</span></a></p>
728 </div>
729 </div>
730 <div class="footer">
731 <hr>
732           Generated by GTK-Doc V1.21</div>
733 </body>
734 </html>