1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
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">
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>
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>
25 <div class="refentry">
26 <a name="gst-rtsp-server-GstRTSPAddressPool"></a><div class="titlepage"></div>
27 <div class="refnamediv"><table width="100%"><tr>
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>
32 <td class="gallery_image" valign="top" align="right"></td>
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">
38 <col width="150px" class="functions_return">
39 <col class="functions_name">
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> *
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>
51 <td class="function_type">
52 <span class="returnvalue">void</span>
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>
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> *
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>
67 <td class="function_type">
68 <span class="returnvalue">void</span>
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>
75 <td class="function_type">
76 <span class="returnvalue">void</span>
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>
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>
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>
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>
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>
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> *
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>
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>
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>
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">
121 <col width="150px" class="name">
122 <col class="description">
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>
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>
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>
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>
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>
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>
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>
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>
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>
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">
182 <col width="150px" class="parameters_name">
183 <col class="parameters_description">
184 <col width="200px" class="parameters_annotations">
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>
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>
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
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">
212 <col width="150px" class="parameters_name">
213 <col class="parameters_description">
214 <col width="200px" class="parameters_annotations">
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>
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>
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
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">
248 <col width="150px" class="parameters_name">
249 <col class="parameters_description">
250 <col width="200px" class="parameters_annotations">
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>
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">
270 <col width="150px" class="parameters_name">
271 <col class="parameters_description">
272 <col width="200px" class="parameters_annotations">
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>
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>
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>
298 <em class="parameter"><code>max_port</code></em>
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>
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 > 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">
317 <col width="150px" class="parameters_name">
318 <col class="parameters_description">
319 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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>
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">
372 <col width="150px" class="parameters_name">
373 <col class="parameters_description">
374 <col width="200px" class="parameters_annotations">
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>
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>
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>
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">
407 <col width="150px" class="parameters_name">
408 <col class="parameters_description">
409 <col width="200px" class="parameters_annotations">
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>
418 <td class="parameter_name"><p>flags</p></td>
419 <td class="parameter_description"><p>flags</p></td>
420 <td class="parameter_annotations"> </td>
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>
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
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>
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>
451 ports will be allocated of which the first one can be found in
452 <em class="parameter"><code>port</code></em>
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 > 0, <em class="parameter"><code>address</code></em>
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">
464 <col width="150px" class="parameters_name">
465 <col class="parameters_description">
466 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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>
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>
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
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"
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
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 "::"
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
530 <div class="refsect2">
531 <a name="GstRTSPAddress"></a><h3>struct GstRTSPAddress</h3>
532 <pre class="programlisting">struct GstRTSPAddress {
533 GstRTSPAddressPool *pool;
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">
546 <col width="300px" class="struct_members_name">
547 <col class="struct_members_description">
548 <col width="200px" class="struct_members_annotations">
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>
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>
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>
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>
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>
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">
588 <col width="300px" class="enum_members_name">
589 <col class="enum_members_description">
590 <col width="200px" class="enum_members_annotations">
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">
598 <td class="enum_member_annotations"> </td>
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>
605 <td class="enum_member_annotations"> </td>
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>
612 <td class="enum_member_annotations"> </td>
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>
619 <td class="enum_member_annotations"> </td>
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>
626 <td class="enum_member_annotations"> </td>
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>
633 <td class="enum_member_annotations"> </td>
640 <div class="refsect2">
641 <a name="GstRTSPAddressPool"></a><h3>struct GstRTSPAddressPool</h3>
642 <pre class="programlisting">struct GstRTSPAddressPool {
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">
651 <col width="300px" class="struct_members_name">
652 <col class="struct_members_description">
653 <col width="200px" class="struct_members_annotations">
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>
664 <div class="refsect2">
665 <a name="GstRTSPAddressPoolClass"></a><h3>struct GstRTSPAddressPoolClass</h3>
666 <pre class="programlisting">struct GstRTSPAddressPoolClass {
667 GObjectClass parent_class;
670 <p>Opaque Address pool class.</p>
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">
680 <col width="300px" class="enum_members_name">
681 <col class="enum_members_description">
682 <col width="200px" class="enum_members_annotations">
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">
690 <td class="enum_member_annotations"> </td>
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>
697 <td class="enum_member_annotations"> </td>
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>
704 <td class="enum_member_annotations"> </td>
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>
711 <td class="enum_member_annotations"> </td>
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">
718 <td class="enum_member_annotations"> </td>
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>
732 Generated by GTK-Doc V1.21</div>