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: 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">
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>
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>
28 <div class="refentry">
29 <a name="GstRTSPSessionPool"></a><div class="titlepage"></div>
30 <div class="refnamediv"><table width="100%"><tr>
32 <h2><span class="refentrytitle"><a name="GstRTSPSessionPool.top_of_page"></a>GstRTSPSessionPool</span></h2>
33 <p>GstRTSPSessionPool — An object for managing sessions</p>
35 <td class="gallery_image" valign="top" align="right"></td>
37 <div class="refsect1">
38 <a name="GstRTSPSessionPool.functions"></a><h2>Functions</h2>
39 <div class="informaltable"><table width="100%" border="0">
41 <col width="150px" class="functions_return">
42 <col class="functions_name">
46 <td class="function_type">
47 <a class="link" href="GstRTSPSessionPool.html" title="GstRTSPSessionPool"><span class="returnvalue">GstRTSPSessionPool</span></a> *
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>
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>
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>
62 <td class="function_type">
63 <span class="returnvalue">void</span>
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>
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>
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>
78 <td class="function_type">
79 <a class="link" href="GstRTSPSession.html" title="GstRTSPSession"><span class="returnvalue">GstRTSPSession</span></a> *
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>
86 <td class="function_type">
87 <a class="link" href="GstRTSPSession.html" title="GstRTSPSession"><span class="returnvalue">GstRTSPSession</span></a> *
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>
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>
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>
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>
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>
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>
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>
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> *
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>
126 <td class="function_type">
127 <a class="link" href="GstRTSPSession.html#GstRTSPFilterResult" title="enum GstRTSPFilterResult"><span class="returnvalue">GstRTSPFilterResult</span></a>
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>
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> *
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>
144 <div class="refsect1">
145 <a name="GstRTSPSessionPool.properties"></a><h2>Properties</h2>
146 <div class="informaltable"><table border="0">
148 <col width="150px" class="properties_type">
149 <col width="300px" class="properties_name">
150 <col width="200px" class="properties_flags">
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>
159 <div class="refsect1">
160 <a name="GstRTSPSessionPool.signals"></a><h2>Signals</h2>
161 <div class="informaltable"><table border="0">
163 <col width="150px" class="signals_return">
164 <col width="300px" class="signals_name">
165 <col width="200px" class="signals_flags">
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>
174 <div class="refsect1">
175 <a name="GstRTSPSessionPool.other"></a><h2>Types and Values</h2>
176 <div class="informaltable"><table width="100%" border="0">
178 <col width="150px" class="name">
179 <col class="description">
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>
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>
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
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>
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
225 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
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">
241 <col width="150px" class="parameters_name">
242 <col class="parameters_description">
243 <col width="200px" class="parameters_annotations">
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>
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>
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>
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">
273 <col width="150px" class="parameters_name">
274 <col class="parameters_description">
275 <col width="200px" class="parameters_annotations">
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>
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>
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>
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">
303 <col width="150px" class="parameters_name">
304 <col class="parameters_description">
305 <col width="200px" class="parameters_annotations">
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>
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>
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>
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">
332 <col width="150px" class="parameters_name">
333 <col class="parameters_description">
334 <col width="200px" class="parameters_annotations">
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>
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>
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">
363 <col width="150px" class="parameters_name">
364 <col class="parameters_description">
365 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
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">
402 <col width="150px" class="parameters_name">
403 <col class="parameters_description">
404 <col width="200px" class="parameters_annotations">
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>
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>
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>
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">
438 <col width="150px" class="parameters_name">
439 <col class="parameters_description">
440 <col width="200px" class="parameters_annotations">
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>
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>
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">
468 <col width="150px" class="parameters_name">
469 <col class="parameters_description">
470 <col width="200px" class="parameters_annotations">
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>
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>
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>
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
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">
503 <col width="150px" class="parameters_name">
504 <col class="parameters_description">
505 <col width="200px" class="parameters_annotations">
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>
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>
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>
531 from <em class="parameter"><code>pool</code></em>
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>
535 <em class="parameter"><code>pool</code></em>
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">
544 <col width="150px" class="parameters_name">
545 <col class="parameters_description">
546 <col width="200px" class="parameters_annotations">
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>
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>
558 <td class="parameter_annotations"> </td>
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>
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>
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>
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>
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>
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>
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>
601 will also be added with an additional ref to the result GList of this
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">
609 <col width="150px" class="parameters_name">
610 <col class="parameters_description">
611 <col width="200px" class="parameters_annotations">
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>
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>
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>
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>
633 <div class="refsect3">
634 <a name="id-1.2.9.9.13.10"></a><h4>Returns</h4>
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>
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>
652 <div class="refsect2">
653 <a name="GstRTSPSessionPoolClass"></a><h3>struct GstRTSPSessionPoolClass</h3>
654 <pre class="programlisting">struct GstRTSPSessionPoolClass {
655 GObjectClass parent_class;
657 gchar * (*create_session_id) (GstRTSPSessionPool *pool);
658 GstRTSPSession * (*create_session) (GstRTSPSessionPool *pool, const gchar *id);
661 void (*session_removed) (GstRTSPSessionPool *pool,
662 GstRTSPSession *session);
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">
669 <col width="300px" class="struct_members_name">
670 <col class="struct_members_description">
671 <col width="200px" class="struct_members_annotations">
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>
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>
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>
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>
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>
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>
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>
728 Generated by GTK-Doc V1.21</div>