Initial release including wifi display based on gst-rtsp-server-1.4.1
[platform/upstream/gstreamer.git] / docs / libs / html / GstRTSPSessionPool.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: GstRTSPSessionPool</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="GstRTSPStream.html" title="GstRTSPStream">
10 <link rel="next" href="GstRTSPSession.html" title="GstRTSPSession">
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="#GstRTSPSessionPool.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
19                   <a href="#GstRTSPSessionPool.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
20                   <a href="#GstRTSPSessionPool.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
21                   <a href="#GstRTSPSessionPool.signals" class="shortcut">Signals</a></span>
22 </td>
23 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
24 <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
25 <td><a accesskey="p" href="GstRTSPStream.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
26 <td><a accesskey="n" href="GstRTSPSession.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
27 </tr></table>
28 <div class="refentry">
29 <a name="GstRTSPSessionPool"></a><div class="titlepage"></div>
30 <div class="refnamediv"><table width="100%"><tr>
31 <td valign="top">
32 <h2><span class="refentrytitle"><a name="GstRTSPSessionPool.top_of_page"></a>GstRTSPSessionPool</span></h2>
33 <p>GstRTSPSessionPool — An object for managing sessions</p>
34 </td>
35 <td class="gallery_image" valign="top" align="right"></td>
36 </tr></table></div>
37 <div class="refsect1">
38 <a name="GstRTSPSessionPool.functions"></a><h2>Functions</h2>
39 <div class="informaltable"><table width="100%" border="0">
40 <colgroup>
41 <col width="150px" class="functions_return">
42 <col class="functions_name">
43 </colgroup>
44 <tbody>
45 <tr>
46 <td class="function_type">
47 <a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="returnvalue">GstRTSPSessionPool</span></a> *
48 </td>
49 <td class="function_name">
50 <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-new" title="gst_rtsp_session_pool_new ()">gst_rtsp_session_pool_new</a> <span class="c_punctuation">()</span>
51 </td>
52 </tr>
53 <tr>
54 <td class="function_type">
55 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
56 </td>
57 <td class="function_name">
58 <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-get-max-sessions" title="gst_rtsp_session_pool_get_max_sessions ()">gst_rtsp_session_pool_get_max_sessions</a> <span class="c_punctuation">()</span>
59 </td>
60 </tr>
61 <tr>
62 <td class="function_type">
63 <span class="returnvalue">void</span>
64 </td>
65 <td class="function_name">
66 <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-set-max-sessions" title="gst_rtsp_session_pool_set_max_sessions ()">gst_rtsp_session_pool_set_max_sessions</a> <span class="c_punctuation">()</span>
67 </td>
68 </tr>
69 <tr>
70 <td class="function_type">
71 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
72 </td>
73 <td class="function_name">
74 <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-get-n-sessions" title="gst_rtsp_session_pool_get_n_sessions ()">gst_rtsp_session_pool_get_n_sessions</a> <span class="c_punctuation">()</span>
75 </td>
76 </tr>
77 <tr>
78 <td class="function_type">
79 <a class="link" href="GstRTSPSession.html" title="GstRTSPSession"><span class="returnvalue">GstRTSPSession</span></a> *
80 </td>
81 <td class="function_name">
82 <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-create" title="gst_rtsp_session_pool_create ()">gst_rtsp_session_pool_create</a> <span class="c_punctuation">()</span>
83 </td>
84 </tr>
85 <tr>
86 <td class="function_type">
87 <a class="link" href="GstRTSPSession.html" title="GstRTSPSession"><span class="returnvalue">GstRTSPSession</span></a> *
88 </td>
89 <td class="function_name">
90 <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-find" title="gst_rtsp_session_pool_find ()">gst_rtsp_session_pool_find</a> <span class="c_punctuation">()</span>
91 </td>
92 </tr>
93 <tr>
94 <td class="function_type">
95 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
96 </td>
97 <td class="function_name">
98 <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-remove" title="gst_rtsp_session_pool_remove ()">gst_rtsp_session_pool_remove</a> <span class="c_punctuation">()</span>
99 </td>
100 </tr>
101 <tr>
102 <td class="function_type">
103 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
104 </td>
105 <td class="function_name">
106 <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-cleanup" title="gst_rtsp_session_pool_cleanup ()">gst_rtsp_session_pool_cleanup</a> <span class="c_punctuation">()</span>
107 </td>
108 </tr>
109 <tr>
110 <td class="function_type">
111 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
112 </td>
113 <td class="function_name">
114 <span class="c_punctuation">(</span><a class="link" href="GstRTSPSessionPool.html#GstRTSPSessionPoolFunc" title="GstRTSPSessionPoolFunc ()">*GstRTSPSessionPoolFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
115 </td>
116 </tr>
117 <tr>
118 <td class="function_type">
119 <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GSource"><span class="returnvalue">GSource</span></a> *
120 </td>
121 <td class="function_name">
122 <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-create-watch" title="gst_rtsp_session_pool_create_watch ()">gst_rtsp_session_pool_create_watch</a> <span class="c_punctuation">()</span>
123 </td>
124 </tr>
125 <tr>
126 <td class="function_type">
127 <a class="link" href="GstRTSPSession.html#GstRTSPFilterResult" title="enum GstRTSPFilterResult"><span class="returnvalue">GstRTSPFilterResult</span></a>
128 </td>
129 <td class="function_name">
130 <span class="c_punctuation">(</span><a class="link" href="GstRTSPSessionPool.html#GstRTSPSessionPoolFilterFunc" title="GstRTSPSessionPoolFilterFunc ()">*GstRTSPSessionPoolFilterFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
131 </td>
132 </tr>
133 <tr>
134 <td class="function_type">
135 <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
136 </td>
137 <td class="function_name">
138 <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-filter" title="gst_rtsp_session_pool_filter ()">gst_rtsp_session_pool_filter</a> <span class="c_punctuation">()</span>
139 </td>
140 </tr>
141 </tbody>
142 </table></div>
143 </div>
144 <div class="refsect1">
145 <a name="GstRTSPSessionPool.properties"></a><h2>Properties</h2>
146 <div class="informaltable"><table border="0">
147 <colgroup>
148 <col width="150px" class="properties_type">
149 <col width="300px" class="properties_name">
150 <col width="200px" class="properties_flags">
151 </colgroup>
152 <tbody><tr>
153 <td class="property_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
154 <td class="property_name"><a class="link" href="GstRTSPSessionPool.html#GstRTSPSessionPool--max-sessions" title="The “max-sessions” property">max-sessions</a></td>
155 <td class="property_flags">Read / Write</td>
156 </tr></tbody>
157 </table></div>
158 </div>
159 <div class="refsect1">
160 <a name="GstRTSPSessionPool.signals"></a><h2>Signals</h2>
161 <div class="informaltable"><table border="0">
162 <colgroup>
163 <col width="150px" class="signals_return">
164 <col width="300px" class="signals_name">
165 <col width="200px" class="signals_flags">
166 </colgroup>
167 <tbody><tr>
168 <td class="signal_type"><span class="returnvalue">void</span></td>
169 <td class="signal_name"><a class="link" href="GstRTSPSessionPool.html#GstRTSPSessionPool-session-removed" title="The “session-removed” signal">session-removed</a></td>
170 <td class="signal_flags">Run Last</td>
171 </tr></tbody>
172 </table></div>
173 </div>
174 <div class="refsect1">
175 <a name="GstRTSPSessionPool.other"></a><h2>Types and Values</h2>
176 <div class="informaltable"><table width="100%" border="0">
177 <colgroup>
178 <col width="150px" class="name">
179 <col class="description">
180 </colgroup>
181 <tbody>
182 <tr>
183 <td class="datatype_keyword">struct</td>
184 <td class="function_name"><a class="link" href="GstRTSPSessionPool.html#GstRTSPSessionPool-struct" title="struct GstRTSPSessionPool">GstRTSPSessionPool</a></td>
185 </tr>
186 <tr>
187 <td class="datatype_keyword">struct</td>
188 <td class="function_name"><a class="link" href="GstRTSPSessionPool.html#GstRTSPSessionPoolClass" title="struct GstRTSPSessionPoolClass">GstRTSPSessionPoolClass</a></td>
189 </tr>
190 </tbody>
191 </table></div>
192 </div>
193 <div class="refsect1">
194 <a name="GstRTSPSessionPool.object-hierarchy"></a><h2>Object Hierarchy</h2>
195 <pre class="screen">    <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
196     <span class="lineart">╰──</span> GstRTSPSessionPool
197 </pre>
198 </div>
199 <div class="refsect1">
200 <a name="GstRTSPSessionPool.description"></a><h2>Description</h2>
201 <p>The <a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a> object manages a list of <a class="link" href="GstRTSPSession.html" title="GstRTSPSession"><span class="type">GstRTSPSession</span></a> objects.</p>
202 <p>The maximum number of sessions can be configured with
203 <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-set-max-sessions" title="gst_rtsp_session_pool_set_max_sessions ()"><code class="function">gst_rtsp_session_pool_set_max_sessions()</code></a>. The current number of sessions can
204 be retrieved with <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-get-n-sessions" title="gst_rtsp_session_pool_get_n_sessions ()"><code class="function">gst_rtsp_session_pool_get_n_sessions()</code></a>.</p>
205 <p>Use <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-create" title="gst_rtsp_session_pool_create ()"><code class="function">gst_rtsp_session_pool_create()</code></a> to create a new <a class="link" href="GstRTSPSession.html" title="GstRTSPSession"><span class="type">GstRTSPSession</span></a> object.
206 The session object can be found again with its id and
207 <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-find" title="gst_rtsp_session_pool_find ()"><code class="function">gst_rtsp_session_pool_find()</code></a>.</p>
208 <p>All sessions can be iterated with <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-filter" title="gst_rtsp_session_pool_filter ()"><code class="function">gst_rtsp_session_pool_filter()</code></a>.</p>
209 <p>Run <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-cleanup" title="gst_rtsp_session_pool_cleanup ()"><code class="function">gst_rtsp_session_pool_cleanup()</code></a> periodically to remove timed out sessions
210 or use <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-create-watch" title="gst_rtsp_session_pool_create_watch ()"><code class="function">gst_rtsp_session_pool_create_watch()</code></a> to be notified when session
211 cleanup should be performed.</p>
212 <p>Last reviewed on 2013-07-11 (1.0.0)</p>
213 </div>
214 <div class="refsect1">
215 <a name="GstRTSPSessionPool.functions_details"></a><h2>Functions</h2>
216 <div class="refsect2">
217 <a name="gst-rtsp-session-pool-new"></a><h3>gst_rtsp_session_pool_new ()</h3>
218 <pre class="programlisting"><a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="returnvalue">GstRTSPSessionPool</span></a> *
219 gst_rtsp_session_pool_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
220 <p>Create a new <a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a> instance.</p>
221 <div class="refsect3">
222 <a name="id-1.2.9.9.2.5"></a><h4>Returns</h4>
223 <p> A new <a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a>. <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> after
224 usage. </p>
225 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
226 </div>
227 </div>
228 <hr>
229 <div class="refsect2">
230 <a name="gst-rtsp-session-pool-get-max-sessions"></a><h3>gst_rtsp_session_pool_get_max_sessions ()</h3>
231 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
232 gst_rtsp_session_pool_get_max_sessions
233                                (<em class="parameter"><code><a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a> *pool</code></em>);</pre>
234 <p>Get the maximum allowed number of sessions in <em class="parameter"><code>pool</code></em>
235 . 0 means an unlimited
236 amount of sessions.</p>
237 <div class="refsect3">
238 <a name="id-1.2.9.9.3.5"></a><h4>Parameters</h4>
239 <div class="informaltable"><table width="100%" border="0">
240 <colgroup>
241 <col width="150px" class="parameters_name">
242 <col class="parameters_description">
243 <col width="200px" class="parameters_annotations">
244 </colgroup>
245 <tbody><tr>
246 <td class="parameter_name"><p>pool</p></td>
247 <td class="parameter_description"><p>a <a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a></p></td>
248 <td class="parameter_annotations"> </td>
249 </tr></tbody>
250 </table></div>
251 </div>
252 <div class="refsect3">
253 <a name="id-1.2.9.9.3.6"></a><h4>Returns</h4>
254 <p> the maximum allowed number of sessions.</p>
255 <p></p>
256 </div>
257 </div>
258 <hr>
259 <div class="refsect2">
260 <a name="gst-rtsp-session-pool-set-max-sessions"></a><h3>gst_rtsp_session_pool_set_max_sessions ()</h3>
261 <pre class="programlisting"><span class="returnvalue">void</span>
262 gst_rtsp_session_pool_set_max_sessions
263                                (<em class="parameter"><code><a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a> *pool</code></em>,
264                                 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> max</code></em>);</pre>
265 <p>Configure the maximum allowed number of sessions in <em class="parameter"><code>pool</code></em>
266  to <em class="parameter"><code>max</code></em>
267 .
268 A value of 0 means an unlimited amount of sessions.</p>
269 <div class="refsect3">
270 <a name="id-1.2.9.9.4.5"></a><h4>Parameters</h4>
271 <div class="informaltable"><table width="100%" border="0">
272 <colgroup>
273 <col width="150px" class="parameters_name">
274 <col class="parameters_description">
275 <col width="200px" class="parameters_annotations">
276 </colgroup>
277 <tbody>
278 <tr>
279 <td class="parameter_name"><p>pool</p></td>
280 <td class="parameter_description"><p>a <a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a></p></td>
281 <td class="parameter_annotations"> </td>
282 </tr>
283 <tr>
284 <td class="parameter_name"><p>max</p></td>
285 <td class="parameter_description"><p>the maximum number of sessions</p></td>
286 <td class="parameter_annotations"> </td>
287 </tr>
288 </tbody>
289 </table></div>
290 </div>
291 </div>
292 <hr>
293 <div class="refsect2">
294 <a name="gst-rtsp-session-pool-get-n-sessions"></a><h3>gst_rtsp_session_pool_get_n_sessions ()</h3>
295 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
296 gst_rtsp_session_pool_get_n_sessions (<em class="parameter"><code><a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a> *pool</code></em>);</pre>
297 <p>Get the amount of active sessions in <em class="parameter"><code>pool</code></em>
298 .</p>
299 <div class="refsect3">
300 <a name="id-1.2.9.9.5.5"></a><h4>Parameters</h4>
301 <div class="informaltable"><table width="100%" border="0">
302 <colgroup>
303 <col width="150px" class="parameters_name">
304 <col class="parameters_description">
305 <col width="200px" class="parameters_annotations">
306 </colgroup>
307 <tbody><tr>
308 <td class="parameter_name"><p>pool</p></td>
309 <td class="parameter_description"><p>a <a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a></p></td>
310 <td class="parameter_annotations"> </td>
311 </tr></tbody>
312 </table></div>
313 </div>
314 <div class="refsect3">
315 <a name="id-1.2.9.9.5.6"></a><h4>Returns</h4>
316 <p> the amount of active sessions in <em class="parameter"><code>pool</code></em>
317 .</p>
318 <p></p>
319 </div>
320 </div>
321 <hr>
322 <div class="refsect2">
323 <a name="gst-rtsp-session-pool-create"></a><h3>gst_rtsp_session_pool_create ()</h3>
324 <pre class="programlisting"><a class="link" href="GstRTSPSession.html" title="GstRTSPSession"><span class="returnvalue">GstRTSPSession</span></a> *
325 gst_rtsp_session_pool_create (<em class="parameter"><code><a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a> *pool</code></em>);</pre>
326 <p>Create a new <a class="link" href="GstRTSPSession.html" title="GstRTSPSession"><span class="type">GstRTSPSession</span></a> object in <em class="parameter"><code>pool</code></em>
327 .</p>
328 <div class="refsect3">
329 <a name="id-1.2.9.9.6.5"></a><h4>Parameters</h4>
330 <div class="informaltable"><table width="100%" border="0">
331 <colgroup>
332 <col width="150px" class="parameters_name">
333 <col class="parameters_description">
334 <col width="200px" class="parameters_annotations">
335 </colgroup>
336 <tbody><tr>
337 <td class="parameter_name"><p>pool</p></td>
338 <td class="parameter_description"><p>a <a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a></p></td>
339 <td class="parameter_annotations"> </td>
340 </tr></tbody>
341 </table></div>
342 </div>
343 <div class="refsect3">
344 <a name="id-1.2.9.9.6.6"></a><h4>Returns</h4>
345 <p> a new <a class="link" href="GstRTSPSession.html" title="GstRTSPSession"><span class="type">GstRTSPSession</span></a>. </p>
346 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
347 </div>
348 </div>
349 <hr>
350 <div class="refsect2">
351 <a name="gst-rtsp-session-pool-find"></a><h3>gst_rtsp_session_pool_find ()</h3>
352 <pre class="programlisting"><a class="link" href="GstRTSPSession.html" title="GstRTSPSession"><span class="returnvalue">GstRTSPSession</span></a> *
353 gst_rtsp_session_pool_find (<em class="parameter"><code><a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a> *pool</code></em>,
354                             <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sessionid</code></em>);</pre>
355 <p>Find the session with <em class="parameter"><code>sessionid</code></em>
356  in <em class="parameter"><code>pool</code></em>
357 . The access time of the session
358 will be updated with <a class="link" href="GstRTSPSession.html#gst-rtsp-session-touch" title="gst_rtsp_session_touch ()"><code class="function">gst_rtsp_session_touch()</code></a>.</p>
359 <div class="refsect3">
360 <a name="id-1.2.9.9.7.5"></a><h4>Parameters</h4>
361 <div class="informaltable"><table width="100%" border="0">
362 <colgroup>
363 <col width="150px" class="parameters_name">
364 <col class="parameters_description">
365 <col width="200px" class="parameters_annotations">
366 </colgroup>
367 <tbody>
368 <tr>
369 <td class="parameter_name"><p>pool</p></td>
370 <td class="parameter_description"><p>the pool to search</p></td>
371 <td class="parameter_annotations"> </td>
372 </tr>
373 <tr>
374 <td class="parameter_name"><p>sessionid</p></td>
375 <td class="parameter_description"><p>the session id</p></td>
376 <td class="parameter_annotations"> </td>
377 </tr>
378 </tbody>
379 </table></div>
380 </div>
381 <div class="refsect3">
382 <a name="id-1.2.9.9.7.6"></a><h4>Returns</h4>
383 <p> the <a class="link" href="GstRTSPSession.html" title="GstRTSPSession"><span class="type">GstRTSPSession</span></a> with <em class="parameter"><code>sessionid</code></em>
384 or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> when the session did not exist. <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> after usage. </p>
385 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<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>
386 </div>
387 </div>
388 <hr>
389 <div class="refsect2">
390 <a name="gst-rtsp-session-pool-remove"></a><h3>gst_rtsp_session_pool_remove ()</h3>
391 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
392 gst_rtsp_session_pool_remove (<em class="parameter"><code><a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a> *pool</code></em>,
393                               <em class="parameter"><code><a class="link" href="GstRTSPSession.html" title="GstRTSPSession"><span class="type">GstRTSPSession</span></a> *sess</code></em>);</pre>
394 <p>Remove <em class="parameter"><code>sess</code></em>
395  from <em class="parameter"><code>pool</code></em>
396 , releasing the ref that the pool has on <em class="parameter"><code>sess</code></em>
397 .</p>
398 <div class="refsect3">
399 <a name="id-1.2.9.9.8.5"></a><h4>Parameters</h4>
400 <div class="informaltable"><table width="100%" border="0">
401 <colgroup>
402 <col width="150px" class="parameters_name">
403 <col class="parameters_description">
404 <col width="200px" class="parameters_annotations">
405 </colgroup>
406 <tbody>
407 <tr>
408 <td class="parameter_name"><p>pool</p></td>
409 <td class="parameter_description"><p>a <a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a></p></td>
410 <td class="parameter_annotations"> </td>
411 </tr>
412 <tr>
413 <td class="parameter_name"><p>sess</p></td>
414 <td class="parameter_description"><p> a <a class="link" href="GstRTSPSession.html" title="GstRTSPSession"><span class="type">GstRTSPSession</span></a>. </p></td>
415 <td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td>
416 </tr>
417 </tbody>
418 </table></div>
419 </div>
420 <div class="refsect3">
421 <a name="id-1.2.9.9.8.6"></a><h4>Returns</h4>
422 <p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the session was found and removed.</p>
423 <p></p>
424 </div>
425 </div>
426 <hr>
427 <div class="refsect2">
428 <a name="gst-rtsp-session-pool-cleanup"></a><h3>gst_rtsp_session_pool_cleanup ()</h3>
429 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
430 gst_rtsp_session_pool_cleanup (<em class="parameter"><code><a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a> *pool</code></em>);</pre>
431 <p>Inspect all the sessions in <em class="parameter"><code>pool</code></em>
432  and remove the sessions that are inactive
433 for more than their timeout.</p>
434 <div class="refsect3">
435 <a name="id-1.2.9.9.9.5"></a><h4>Parameters</h4>
436 <div class="informaltable"><table width="100%" border="0">
437 <colgroup>
438 <col width="150px" class="parameters_name">
439 <col class="parameters_description">
440 <col width="200px" class="parameters_annotations">
441 </colgroup>
442 <tbody><tr>
443 <td class="parameter_name"><p>pool</p></td>
444 <td class="parameter_description"><p>a <a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a></p></td>
445 <td class="parameter_annotations"> </td>
446 </tr></tbody>
447 </table></div>
448 </div>
449 <div class="refsect3">
450 <a name="id-1.2.9.9.9.6"></a><h4>Returns</h4>
451 <p> the amount of sessions that got removed.</p>
452 <p></p>
453 </div>
454 </div>
455 <hr>
456 <div class="refsect2">
457 <a name="GstRTSPSessionPoolFunc"></a><h3>GstRTSPSessionPoolFunc ()</h3>
458 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
459 <span class="c_punctuation">(</span>*GstRTSPSessionPoolFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a> *pool</code></em>,
460                            <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
461 <p>The function that will be called from the GSource watch on the session pool.</p>
462 <p>The function will be called when the pool must be cleaned up because one or
463 more sessions timed out.</p>
464 <div class="refsect3">
465 <a name="id-1.2.9.9.10.6"></a><h4>Parameters</h4>
466 <div class="informaltable"><table width="100%" border="0">
467 <colgroup>
468 <col width="150px" class="parameters_name">
469 <col class="parameters_description">
470 <col width="200px" class="parameters_annotations">
471 </colgroup>
472 <tbody>
473 <tr>
474 <td class="parameter_name"><p>pool</p></td>
475 <td class="parameter_description"><p>a <a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a> object</p></td>
476 <td class="parameter_annotations"> </td>
477 </tr>
478 <tr>
479 <td class="parameter_name"><p>user_data</p></td>
480 <td class="parameter_description"><p>user data that has been given when registering the handler</p></td>
481 <td class="parameter_annotations"> </td>
482 </tr>
483 </tbody>
484 </table></div>
485 </div>
486 <div class="refsect3">
487 <a name="id-1.2.9.9.10.7"></a><h4>Returns</h4>
488 <p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the source should be removed.</p>
489 <p></p>
490 </div>
491 </div>
492 <hr>
493 <div class="refsect2">
494 <a name="gst-rtsp-session-pool-create-watch"></a><h3>gst_rtsp_session_pool_create_watch ()</h3>
495 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GSource"><span class="returnvalue">GSource</span></a> *
496 gst_rtsp_session_pool_create_watch (<em class="parameter"><code><a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a> *pool</code></em>);</pre>
497 <p>Create a <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GSource"><span class="type">GSource</span></a> that will be dispatched when the session should be cleaned
498 up.</p>
499 <div class="refsect3">
500 <a name="id-1.2.9.9.11.5"></a><h4>Parameters</h4>
501 <div class="informaltable"><table width="100%" border="0">
502 <colgroup>
503 <col width="150px" class="parameters_name">
504 <col class="parameters_description">
505 <col width="200px" class="parameters_annotations">
506 </colgroup>
507 <tbody><tr>
508 <td class="parameter_name"><p>pool</p></td>
509 <td class="parameter_description"><p>a <a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a></p></td>
510 <td class="parameter_annotations"> </td>
511 </tr></tbody>
512 </table></div>
513 </div>
514 <div class="refsect3">
515 <a name="id-1.2.9.9.11.6"></a><h4>Returns</h4>
516 <p> a <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GSource"><span class="type">GSource</span></a>. </p>
517 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
518 </div>
519 </div>
520 <hr>
521 <div class="refsect2">
522 <a name="GstRTSPSessionPoolFilterFunc"></a><h3>GstRTSPSessionPoolFilterFunc ()</h3>
523 <pre class="programlisting"><a class="link" href="GstRTSPSession.html#GstRTSPFilterResult" title="enum GstRTSPFilterResult"><span class="returnvalue">GstRTSPFilterResult</span></a>
524 <span class="c_punctuation">(</span>*GstRTSPSessionPoolFilterFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a> *pool</code></em>,
525                                  <em class="parameter"><code><a class="link" href="GstRTSPSession.html" title="GstRTSPSession"><span class="type">GstRTSPSession</span></a> *session</code></em>,
526                                  <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
527 <p>This function will be called by the <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-filter" title="gst_rtsp_session_pool_filter ()"><code class="function">gst_rtsp_session_pool_filter()</code></a>. An
528 implementation should return a value of <a class="link" href="GstRTSPSession.html#GstRTSPFilterResult" title="enum GstRTSPFilterResult"><span class="type">GstRTSPFilterResult</span></a>.</p>
529 <p>When this function returns <a class="link" href="GstRTSPSession.html#GST-RTSP-FILTER-REMOVE:CAPS"><span class="type">GST_RTSP_FILTER_REMOVE</span></a>, <em class="parameter"><code>session</code></em>
530  will be removed
531 from <em class="parameter"><code>pool</code></em>
532 .</p>
533 <p>A return value of <a class="link" href="GstRTSPSession.html#GST-RTSP-FILTER-KEEP:CAPS"><span class="type">GST_RTSP_FILTER_KEEP</span></a> will leave <em class="parameter"><code>session</code></em>
534  untouched in
535 <em class="parameter"><code>pool</code></em>
536 .</p>
537 <p>A value of GST_RTSP_FILTER_REF will add <em class="parameter"><code>session</code></em>
538  to the result <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of
539 <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-filter" title="gst_rtsp_session_pool_filter ()"><code class="function">gst_rtsp_session_pool_filter()</code></a>.</p>
540 <div class="refsect3">
541 <a name="id-1.2.9.9.12.8"></a><h4>Parameters</h4>
542 <div class="informaltable"><table width="100%" border="0">
543 <colgroup>
544 <col width="150px" class="parameters_name">
545 <col class="parameters_description">
546 <col width="200px" class="parameters_annotations">
547 </colgroup>
548 <tbody>
549 <tr>
550 <td class="parameter_name"><p>pool</p></td>
551 <td class="parameter_description"><p>a <a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a> object</p></td>
552 <td class="parameter_annotations"> </td>
553 </tr>
554 <tr>
555 <td class="parameter_name"><p>session</p></td>
556 <td class="parameter_description"><p>a <a class="link" href="GstRTSPSession.html" title="GstRTSPSession"><span class="type">GstRTSPSession</span></a> in <em class="parameter"><code>pool</code></em>
557 </p></td>
558 <td class="parameter_annotations"> </td>
559 </tr>
560 <tr>
561 <td class="parameter_name"><p>user_data</p></td>
562 <td class="parameter_description"><p>user data that has been given to <a class="link" href="GstRTSPSessionPool.html#gst-rtsp-session-pool-filter" title="gst_rtsp_session_pool_filter ()"><code class="function">gst_rtsp_session_pool_filter()</code></a></p></td>
563 <td class="parameter_annotations"> </td>
564 </tr>
565 </tbody>
566 </table></div>
567 </div>
568 <div class="refsect3">
569 <a name="id-1.2.9.9.12.9"></a><h4>Returns</h4>
570 <p> a <a class="link" href="GstRTSPSession.html#GstRTSPFilterResult" title="enum GstRTSPFilterResult"><span class="type">GstRTSPFilterResult</span></a>.</p>
571 <p></p>
572 </div>
573 </div>
574 <hr>
575 <div class="refsect2">
576 <a name="gst-rtsp-session-pool-filter"></a><h3>gst_rtsp_session_pool_filter ()</h3>
577 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
578 gst_rtsp_session_pool_filter (<em class="parameter"><code><a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a> *pool</code></em>,
579                               <em class="parameter"><code><a class="link" href="GstRTSPSessionPool.html#GstRTSPSessionPoolFilterFunc" title="GstRTSPSessionPoolFilterFunc ()"><span class="type">GstRTSPSessionPoolFilterFunc</span></a> func</code></em>,
580                               <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
581 <p>Call <em class="parameter"><code>func</code></em>
582  for each session in <em class="parameter"><code>pool</code></em>
583 . The result value of <em class="parameter"><code>func</code></em>
584  determines
585 what happens to the session. <em class="parameter"><code>func</code></em>
586  will be called with the session pool
587 locked so no further actions on <em class="parameter"><code>pool</code></em>
588  can be performed from <em class="parameter"><code>func</code></em>
589 .</p>
590 <p>If <em class="parameter"><code>func</code></em>
591  returns <a class="link" href="GstRTSPSession.html#GST-RTSP-FILTER-REMOVE:CAPS"><span class="type">GST_RTSP_FILTER_REMOVE</span></a>, the session will be set to the
592 expired state with <code class="function">gst_rtsp_session_set_expired()</code> and removed from
593 <em class="parameter"><code>pool</code></em>
594 .</p>
595 <p>If <em class="parameter"><code>func</code></em>
596  returns <a class="link" href="GstRTSPSession.html#GST-RTSP-FILTER-KEEP:CAPS"><span class="type">GST_RTSP_FILTER_KEEP</span></a>, the session will remain in <em class="parameter"><code>pool</code></em>
597 .</p>
598 <p>If <em class="parameter"><code>func</code></em>
599  returns <a class="link" href="GstRTSPSession.html#GST-RTSP-FILTER-REF:CAPS"><span class="type">GST_RTSP_FILTER_REF</span></a>, the session will remain in <em class="parameter"><code>pool</code></em>
600  but
601 will also be added with an additional ref to the result GList of this
602 function..</p>
603 <p>When <em class="parameter"><code>func</code></em>
604  is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, <a class="link" href="GstRTSPSession.html#GST-RTSP-FILTER-REF:CAPS"><span class="type">GST_RTSP_FILTER_REF</span></a> will be assumed for all sessions.</p>
605 <div class="refsect3">
606 <a name="id-1.2.9.9.13.9"></a><h4>Parameters</h4>
607 <div class="informaltable"><table width="100%" border="0">
608 <colgroup>
609 <col width="150px" class="parameters_name">
610 <col class="parameters_description">
611 <col width="200px" class="parameters_annotations">
612 </colgroup>
613 <tbody>
614 <tr>
615 <td class="parameter_name"><p>pool</p></td>
616 <td class="parameter_description"><p>a <a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a></p></td>
617 <td class="parameter_annotations"> </td>
618 </tr>
619 <tr>
620 <td class="parameter_name"><p>func</p></td>
621 <td class="parameter_description"><p> a callback. </p></td>
622 <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
623 </tr>
624 <tr>
625 <td class="parameter_name"><p>user_data</p></td>
626 <td class="parameter_description"><p> user data passed to <em class="parameter"><code>func</code></em>
627 . </p></td>
628 <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
629 </tr>
630 </tbody>
631 </table></div>
632 </div>
633 <div class="refsect3">
634 <a name="id-1.2.9.9.13.10"></a><h4>Returns</h4>
635 <p> a GList with all
636 sessions for which <em class="parameter"><code>func</code></em>
637 returned <a class="link" href="GstRTSPSession.html#GST-RTSP-FILTER-REF:CAPS"><span class="type">GST_RTSP_FILTER_REF</span></a>. After usage, each
638 element in the GList should be unreffed before the list is freed. </p>
639 <p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GstRTSPSession][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
640 </div>
641 </div>
642 </div>
643 <div class="refsect1">
644 <a name="GstRTSPSessionPool.other_details"></a><h2>Types and Values</h2>
645 <div class="refsect2">
646 <a name="GstRTSPSessionPool-struct"></a><h3>struct GstRTSPSessionPool</h3>
647 <pre class="programlisting">struct GstRTSPSessionPool;</pre>
648 <p>An object that keeps track of the active sessions. This object is usually
649 attached to a <a class="link" href="GstRTSPServer.html" title="GstRTSPServer"><span class="type">GstRTSPServer</span></a> object to manage the sessions in that server.</p>
650 </div>
651 <hr>
652 <div class="refsect2">
653 <a name="GstRTSPSessionPoolClass"></a><h3>struct GstRTSPSessionPoolClass</h3>
654 <pre class="programlisting">struct GstRTSPSessionPoolClass {
655   GObjectClass  parent_class;
656
657   gchar *          (*create_session_id)   (GstRTSPSessionPool *pool);
658   GstRTSPSession * (*create_session)      (GstRTSPSessionPool *pool, const gchar *id);
659
660   /* signals */
661   void             (*session_removed)     (GstRTSPSessionPool *pool,
662                                            GstRTSPSession *session);
663 };
664 </pre>
665 <div class="refsect3">
666 <a name="id-1.2.9.10.3.4"></a><h4>Members</h4>
667 <div class="informaltable"><table width="100%" border="0">
668 <colgroup>
669 <col width="300px" class="struct_members_name">
670 <col class="struct_members_description">
671 <col width="200px" class="struct_members_annotations">
672 </colgroup>
673 <tbody>
674 <tr>
675 <td class="struct_member_name"><p><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObjectClass"><span class="type">GObjectClass</span></a> <em class="structfield"><code><a name="GstRTSPSessionPoolClass.parent-class"></a>parent_class</code></em>;</p></td>
676 <td> </td>
677 <td> </td>
678 </tr>
679 <tr>
680 <td class="struct_member_name"><p><em class="structfield"><code><a name="GstRTSPSessionPoolClass.create-session-id"></a>create_session_id</code></em> ()</p></td>
681 <td class="struct_member_description"><p>create a new random session id. Subclasses can create
682 custom session ids and should not check if the session exists.</p></td>
683 <td class="struct_member_annotations"> </td>
684 </tr>
685 <tr>
686 <td class="struct_member_name"><p><em class="structfield"><code><a name="GstRTSPSessionPoolClass.create-session"></a>create_session</code></em> ()</p></td>
687 <td class="struct_member_description"><p>make a new session object.</p></td>
688 <td class="struct_member_annotations"> </td>
689 </tr>
690 <tr>
691 <td class="struct_member_name"><p><em class="structfield"><code><a name="GstRTSPSessionPoolClass.session-removed"></a>session_removed</code></em> ()</p></td>
692 <td class="struct_member_description"><p>a session was removed from the pool</p></td>
693 <td class="struct_member_annotations"> </td>
694 </tr>
695 </tbody>
696 </table></div>
697 </div>
698 </div>
699 </div>
700 <div class="refsect1">
701 <a name="GstRTSPSessionPool.property-details"></a><h2>Property Details</h2>
702 <div class="refsect2">
703 <a name="GstRTSPSessionPool--max-sessions"></a><h3>The <code class="literal">“max-sessions”</code> property</h3>
704 <pre class="programlisting">  “max-sessions”             <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
705 <p>the maximum amount of sessions (0 = unlimited).</p>
706 <p>Flags: Read / Write</p>
707 <p>Default value: 0</p>
708 </div>
709 </div>
710 <div class="refsect1">
711 <a name="GstRTSPSessionPool.signal-details"></a><h2>Signal Details</h2>
712 <div class="refsect2">
713 <a name="GstRTSPSessionPool-session-removed"></a><h3>The <code class="literal">“session-removed”</code> signal</h3>
714 <pre class="programlisting"><span class="returnvalue">void</span>
715 user_function (<a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="type">GstRTSPSessionPool</span></a> *gstrtspsessionpool,
716                <a class="link" href="GstRTSPSession.html" title="GstRTSPSession"><span class="type">GstRTSPSession</span></a>     *arg1,
717                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>            user_data)</pre>
718 <p>Flags: Run Last</p>
719 </div>
720 </div>
721 <div class="refsect1">
722 <a name="GstRTSPSessionPool.see-also"></a><h2>See Also</h2>
723 <p><a class="link" href="GstRTSPSession.html" title="GstRTSPSession"><span class="type">GstRTSPSession</span></a></p>
724 </div>
725 </div>
726 <div class="footer">
727 <hr>
728           Generated by GTK-Doc V1.21</div>
729 </body>
730 </html>