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>multifdsink: GStreamer Base Plugins 1.0 Plugins Reference Manual</title> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Plugins Reference Manual"> 8<link rel="up" href="ch01.html" title="gst-plugins-base Elements"> 9<link rel="prev" href="gst-plugins-base-plugins-glviewconvert.html" title="glviewconvert"> 10<link rel="next" href="gst-plugins-base-plugins-multisocketsink.html" title="multisocketsink"> 11<meta name="generator" content="GTK-Doc V1.28 (XML mode)"> 12<link rel="stylesheet" href="style.css" type="text/css"> 13</head> 14<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 15<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> 16<td width="100%" align="left" class="shortcuts"> 17<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 18 <a href="#gst-plugins-base-plugins-multifdsink.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 19 <a href="#gst-plugins-base-plugins-multifdsink.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span> 20 <a href="#gst-plugins-base-plugins-multifdsink.properties" class="shortcut">Properties</a></span><span id="nav_signals"> <span class="dim">|</span> 21 <a href="#gst-plugins-base-plugins-multifdsink.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="gst-plugins-base-plugins-glviewconvert.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> 26<td><a accesskey="n" href="gst-plugins-base-plugins-multisocketsink.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="gst-plugins-base-plugins-multifdsink"></a><div class="titlepage"></div> 30<div class="refnamediv"><table width="100%"><tr> 31<td valign="top"> 32<h2><span class="refentrytitle"><a name="gst-plugins-base-plugins-multifdsink.top_of_page"></a>multifdsink</span></h2> 33<p>multifdsink</p> 34</td> 35<td class="gallery_image" valign="top" align="right"></td> 36</tr></table></div> 37<div class="refsect1"> 38<a name="gst-plugins-base-plugins-multifdsink.properties"></a><h2>Properties</h2> 39<div class="informaltable"><table class="informaltable" border="0"> 40<colgroup> 41<col width="150px" class="properties_type"> 42<col width="300px" class="properties_name"> 43<col width="200px" class="properties_flags"> 44</colgroup> 45<tbody><tr> 46<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td> 47<td class="property_name"><a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink--handle-read" title="The “handle-read” property">handle-read</a></td> 48<td class="property_flags">Read / Write</td> 49</tr></tbody> 50</table></div> 51</div> 52<div class="refsect1"> 53<a name="gst-plugins-base-plugins-multifdsink.signals"></a><h2>Signals</h2> 54<div class="informaltable"><table class="informaltable" border="0"> 55<colgroup> 56<col width="150px" class="signals_return"> 57<col width="300px" class="signals_name"> 58<col width="200px" class="signals_flags"> 59</colgroup> 60<tbody> 61<tr> 62<td class="signal_type"><span class="returnvalue">void</span></td> 63<td class="signal_name"><a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-add" title="The “add” signal">add</a></td> 64<td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></td> 65</tr> 66<tr> 67<td class="signal_type"><span class="returnvalue">void</span></td> 68<td class="signal_name"><a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-add-full" title="The “add-full” signal">add-full</a></td> 69<td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></td> 70</tr> 71<tr> 72<td class="signal_type"><span class="returnvalue">void</span></td> 73<td class="signal_name"><a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-client-added" title="The “client-added” signal">client-added</a></td> 74<td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td> 75</tr> 76<tr> 77<td class="signal_type"><span class="returnvalue">void</span></td> 78<td class="signal_name"><a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-client-fd-removed" title="The “client-fd-removed” signal">client-fd-removed</a></td> 79<td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td> 80</tr> 81<tr> 82<td class="signal_type"><span class="returnvalue">void</span></td> 83<td class="signal_name"><a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-client-removed" title="The “client-removed” signal">client-removed</a></td> 84<td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td> 85</tr> 86<tr> 87<td class="signal_type"> 88<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstStructure.html#GstStructure-struct"><span class="returnvalue">GstStructure</span></a>*</td> 89<td class="signal_name"><a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-get-stats" title="The “get-stats” signal">get-stats</a></td> 90<td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></td> 91</tr> 92<tr> 93<td class="signal_type"><span class="returnvalue">void</span></td> 94<td class="signal_name"><a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-remove" title="The “remove” signal">remove</a></td> 95<td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></td> 96</tr> 97<tr> 98<td class="signal_type"><span class="returnvalue">void</span></td> 99<td class="signal_name"><a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-remove-flush" title="The “remove-flush” signal">remove-flush</a></td> 100<td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></td> 101</tr> 102</tbody> 103</table></div> 104</div> 105<a name="GstMultiFdSink"></a><div class="refsect1"> 106<a name="gst-plugins-base-plugins-multifdsink.other"></a><h2>Types and Values</h2> 107<div class="informaltable"><table class="informaltable" width="100%" border="0"> 108<colgroup> 109<col width="150px" class="name"> 110<col class="description"> 111</colgroup> 112<tbody><tr> 113<td class="datatype_keyword">struct</td> 114<td class="function_name"><a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-struct" title="struct GstMultiFdSink">GstMultiFdSink</a></td> 115</tr></tbody> 116</table></div> 117</div> 118<div class="refsect1"> 119<a name="gst-plugins-base-plugins-multifdsink.object-hierarchy"></a><h2>Object Hierarchy</h2> 120<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a> 121 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> 122 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a> 123 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElement-struct">GstElement</a> 124 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-libs-1.0/GstBaseSink.html#GstBaseSink-struct">GstBaseSink</a> 125 <span class="lineart">╰──</span> GstMultiHandleSink 126 <span class="lineart">╰──</span> GstMultiFdSink 127</pre> 128</div> 129<div class="refsect1"> 130<a name="gst-plugins-base-plugins-multifdsink.description"></a><h2>Description</h2> 131<p>This plugin writes incoming data to a set of file descriptors. The 132file descriptors can be added to multifdsink by emitting the <a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-add" title="The “add” signal"><span class="type">“add”</span></a> signal. 133For each descriptor added, the <a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-client-added" title="The “client-added” signal"><span class="type">“client-added”</span></a> signal will be called.</p> 134<p>The multifdsink element needs to be set into READY, PAUSED or PLAYING state 135before operations such as adding clients are possible.</p> 136<p>A client can also be added with the <a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-add-full" title="The “add-full” signal"><span class="type">“add-full”</span></a> signal 137that allows for more control over what and how much data a client 138initially receives.</p> 139<p>Clients can be removed from multifdsink by emitting the <a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-remove" title="The “remove” signal"><span class="type">“remove”</span></a> signal. For 140each descriptor removed, the <a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-client-removed" title="The “client-removed” signal"><span class="type">“client-removed”</span></a> signal will be called. The 141<a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-client-removed" title="The “client-removed” signal"><span class="type">“client-removed”</span></a> signal can also be fired when multifdsink decides that a 142client is not active anymore or, depending on the value of the 143<span class="type">“recover-policy”</span> property, if the client is reading too slowly. 144In all cases, multifdsink will never close a file descriptor itself. 145The user of multifdsink is responsible for closing all file descriptors. 146This can for example be done in response to the <a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-client-fd-removed" title="The “client-fd-removed” signal"><span class="type">“client-fd-removed”</span></a> signal. 147Note that multifdsink still has a reference to the file descriptor when the 148<a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-client-removed" title="The “client-removed” signal"><span class="type">“client-removed”</span></a> signal is emitted, so that "get-stats" can be performed on 149the descriptor; it is therefore not safe to close the file descriptor in 150the <a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-client-removed" title="The “client-removed” signal"><span class="type">“client-removed”</span></a> signal handler, and you should use the 151<a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-client-fd-removed" title="The “client-fd-removed” signal"><span class="type">“client-fd-removed”</span></a> signal to safely close the fd.</p> 152<p>Multifdsink internally keeps a queue of the incoming buffers and uses a 153separate thread to send the buffers to the clients. This ensures that no 154client write can block the pipeline and that clients can read with different 155speeds.</p> 156<p>When adding a client to multifdsink, the <span class="type">“sync-method”</span> property will define 157which buffer in the queued buffers will be sent first to the client. Clients 158can be sent the most recent buffer (which might not be decodable by the 159client if it is not a keyframe), the next keyframe received in 160multifdsink (which can take some time depending on the keyframe rate), or the 161last received keyframe (which will cause a simple burst-on-connect). 162Multifdsink will always keep at least one keyframe in its internal buffers 163when the sync-mode is set to latest-keyframe.</p> 164<p>There are additional values for the <span class="type">“sync-method”</span> 165property to allow finer control over burst-on-connect behaviour. By selecting 166the 'burst' method a minimum burst size can be chosen, 'burst-keyframe' 167additionally requires that the burst begin with a keyframe, and 168'burst-with-keyframe' attempts to burst beginning with a keyframe, but will 169prefer a minimum burst size even if it requires not starting with a keyframe.</p> 170<p>Multifdsink can be instructed to keep at least a minimum amount of data 171expressed in time or byte units in its internal queues with the 172<span class="type">“time-min”</span> and <span class="type">“bytes-min”</span> properties respectively. 173These properties are useful if the application adds clients with the 174<a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink-add-full" title="The “add-full” signal"><span class="type">“add-full”</span></a> signal to make sure that a burst connect can 175actually be honored.</p> 176<p>When streaming data, clients are allowed to read at a different rate than 177the rate at which multifdsink receives data. If the client is reading too 178fast, no data will be send to the client until multifdsink receives more 179data. If the client, however, reads too slowly, data for that client will be 180queued up in multifdsink. Two properties control the amount of data 181(buffers) that is queued in multifdsink: <span class="type">“buffers-max”</span> and 182<span class="type">“buffers-soft-max”</span>. A client that falls behind by 183<span class="type">“buffers-max”</span> is removed from multifdsink forcibly.</p> 184<p>A client with a lag of at least <span class="type">“buffers-soft-max”</span> enters the recovery 185procedure which is controlled with the <span class="type">“recover-policy”</span> property. 186A recover policy of NONE will do nothing, RESYNC_LATEST will send the most recently 187received buffer as the next buffer for the client, RESYNC_SOFT_LIMIT 188positions the client to the soft limit in the buffer queue and 189RESYNC_KEYFRAME positions the client at the most recent keyframe in the 190buffer queue.</p> 191<p>multifdsink will by default synchronize on the clock before serving the 192buffers to the clients. This behaviour can be disabled by setting the sync 193property to FALSE. Multifdsink will by default not do QoS and will never 194drop late buffers.</p> 195<div class="refsynopsisdiv"> 196<h2>Synopsis</h2> 197<div class="refsect2"> 198<a name="id-1.2.70.8.13.1"></a><h3>Element Information</h3> 199<div class="variablelist"><table border="0" class="variablelist"> 200<colgroup> 201<col align="left" valign="top"> 202<col> 203</colgroup> 204<tbody> 205<tr> 206<td><p><span class="term">plugin</span></p></td> 207<td> 208 <a class="link" href="gst-plugins-base-plugins-plugin-tcp.html#plugin-tcp">tcp</a> 209 </td> 210</tr> 211<tr> 212<td><p><span class="term">author</span></p></td> 213<td>Thomas Vander Stichele <thomas at apestaart dot org>, Wim Taymans <wim@fluendo.com></td> 214</tr> 215<tr> 216<td><p><span class="term">class</span></p></td> 217<td>Sink/Network</td> 218</tr> 219</tbody> 220</table></div> 221</div> 222<hr> 223<div class="refsect2"> 224<a name="id-1.2.70.8.13.2"></a><h3>Element Pads</h3> 225<div class="variablelist"><table border="0" class="variablelist"> 226<colgroup> 227<col align="left" valign="top"> 228<col> 229</colgroup> 230<tbody> 231<tr> 232<td><p><span class="term">name</span></p></td> 233<td>sink</td> 234</tr> 235<tr> 236<td><p><span class="term">direction</span></p></td> 237<td>sink</td> 238</tr> 239<tr> 240<td><p><span class="term">presence</span></p></td> 241<td>always</td> 242</tr> 243<tr> 244<td><p><span class="term">details</span></p></td> 245<td>ANY</td> 246</tr> 247</tbody> 248</table></div> 249</div> 250</div> 251</div> 252<div class="refsect1"> 253<a name="gst-plugins-base-plugins-multifdsink.functions_details"></a><h2>Functions</h2> 254<p></p> 255</div> 256<div class="refsect1"> 257<a name="gst-plugins-base-plugins-multifdsink.other_details"></a><h2>Types and Values</h2> 258<div class="refsect2"> 259<a name="GstMultiFdSink-struct"></a><h3>struct GstMultiFdSink</h3> 260<pre class="programlisting">struct GstMultiFdSink;</pre> 261<p>The multifdsink object structure.</p> 262</div> 263</div> 264<div class="refsect1"> 265<a name="gst-plugins-base-plugins-multifdsink.property-details"></a><h2>Property Details</h2> 266<div class="refsect2"> 267<a name="GstMultiFdSink--handle-read"></a><h3>The <code class="literal">“handle-read”</code> property</h3> 268<pre class="programlisting"> “handle-read” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre> 269<p>Handle client reads and discard the data.</p> 270<p>Flags: Read / Write</p> 271<p>Default value: TRUE</p> 272</div> 273</div> 274<div class="refsect1"> 275<a name="gst-plugins-base-plugins-multifdsink.signal-details"></a><h2>Signal Details</h2> 276<div class="refsect2"> 277<a name="GstMultiFdSink-add"></a><h3>The <code class="literal">“add”</code> signal</h3> 278<pre class="programlisting"><span class="returnvalue">void</span> 279user_function (<a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink"><span class="type">GstMultiFdSink</span></a> *gstmultifdsink, 280 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> fd, 281 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> 282<p>Hand the given open file descriptor to multifdsink to write to.</p> 283<div class="refsect3"> 284<a name="GstMultiFdSink-add.parameters"></a><h4>Parameters</h4> 285<div class="informaltable"><table class="informaltable" width="100%" border="0"> 286<colgroup> 287<col width="150px" class="parameters_name"> 288<col class="parameters_description"> 289<col width="200px" class="parameters_annotations"> 290</colgroup> 291<tbody> 292<tr> 293<td class="parameter_name"><p>gstmultifdsink</p></td> 294<td class="parameter_description"><p>the multifdsink element to emit this signal on</p></td> 295<td class="parameter_annotations"> </td> 296</tr> 297<tr> 298<td class="parameter_name"><p>fd</p></td> 299<td class="parameter_description"><p>the file descriptor to add to multifdsink</p></td> 300<td class="parameter_annotations"> </td> 301</tr> 302<tr> 303<td class="parameter_name"><p>user_data</p></td> 304<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> 305<td class="parameter_annotations"> </td> 306</tr> 307</tbody> 308</table></div> 309</div> 310<p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></p> 311</div> 312<hr> 313<div class="refsect2"> 314<a name="GstMultiFdSink-add-full"></a><h3>The <code class="literal">“add-full”</code> signal</h3> 315<pre class="programlisting"><span class="returnvalue">void</span> 316user_function (<a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink"><span class="type">GstMultiFdSink</span></a> *gstmultifdsink, 317 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> fd, 318 <span class="type">GstMultiHandleSinkSyncMethod</span> sync, 319 <a href="/usr/share/gtk-doc/html/gstreamer-1.0/gstreamer-GstFormat.html#GstFormat"><span class="type">GstFormat</span></a> format_min, 320 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> value_min, 321 <a href="/usr/share/gtk-doc/html/gstreamer-1.0/gstreamer-GstFormat.html#GstFormat"><span class="type">GstFormat</span></a> format_max, 322 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> value_max, 323 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> 324<p>Hand the given open file descriptor to multifdsink to write to and 325specify the burst parameters for the new connection.</p> 326<div class="refsect3"> 327<a name="GstMultiFdSink-add-full.parameters"></a><h4>Parameters</h4> 328<div class="informaltable"><table class="informaltable" width="100%" border="0"> 329<colgroup> 330<col width="150px" class="parameters_name"> 331<col class="parameters_description"> 332<col width="200px" class="parameters_annotations"> 333</colgroup> 334<tbody> 335<tr> 336<td class="parameter_name"><p>gstmultifdsink</p></td> 337<td class="parameter_description"><p>the multifdsink element to emit this signal on</p></td> 338<td class="parameter_annotations"> </td> 339</tr> 340<tr> 341<td class="parameter_name"><p>fd</p></td> 342<td class="parameter_description"><p>the file descriptor to add to multifdsink</p></td> 343<td class="parameter_annotations"> </td> 344</tr> 345<tr> 346<td class="parameter_name"><p>sync</p></td> 347<td class="parameter_description"><p>the sync method to use</p></td> 348<td class="parameter_annotations"> </td> 349</tr> 350<tr> 351<td class="parameter_name"><p>format_min</p></td> 352<td class="parameter_description"><p>the format of <em class="parameter"><code>value_min</code></em> 353</p></td> 354<td class="parameter_annotations"> </td> 355</tr> 356<tr> 357<td class="parameter_name"><p>value_min</p></td> 358<td class="parameter_description"><p>the minimum amount of data to burst expressed in 359<em class="parameter"><code>format_min</code></em> 360units.</p></td> 361<td class="parameter_annotations"> </td> 362</tr> 363<tr> 364<td class="parameter_name"><p>format_max</p></td> 365<td class="parameter_description"><p>the format of <em class="parameter"><code>value_max</code></em> 366</p></td> 367<td class="parameter_annotations"> </td> 368</tr> 369<tr> 370<td class="parameter_name"><p>value_max</p></td> 371<td class="parameter_description"><p>the maximum amount of data to burst expressed in 372<em class="parameter"><code>format_max</code></em> 373units.</p></td> 374<td class="parameter_annotations"> </td> 375</tr> 376<tr> 377<td class="parameter_name"><p>user_data</p></td> 378<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> 379<td class="parameter_annotations"> </td> 380</tr> 381</tbody> 382</table></div> 383</div> 384<p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></p> 385</div> 386<hr> 387<div class="refsect2"> 388<a name="GstMultiFdSink-client-added"></a><h3>The <code class="literal">“client-added”</code> signal</h3> 389<pre class="programlisting"><span class="returnvalue">void</span> 390user_function (<a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink"><span class="type">GstMultiFdSink</span></a> *gstmultifdsink, 391 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> fd, 392 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> 393<p>The given file descriptor was added to multifdsink. This signal will 394be emitted from the streaming thread so application should be prepared 395for that.</p> 396<div class="refsect3"> 397<a name="GstMultiFdSink-client-added.parameters"></a><h4>Parameters</h4> 398<div class="informaltable"><table class="informaltable" width="100%" border="0"> 399<colgroup> 400<col width="150px" class="parameters_name"> 401<col class="parameters_description"> 402<col width="200px" class="parameters_annotations"> 403</colgroup> 404<tbody> 405<tr> 406<td class="parameter_name"><p>gstmultifdsink</p></td> 407<td class="parameter_description"><p>the multifdsink element that emitted this signal</p></td> 408<td class="parameter_annotations"> </td> 409</tr> 410<tr> 411<td class="parameter_name"><p>fd</p></td> 412<td class="parameter_description"><p>the file descriptor that was added to multifdsink</p></td> 413<td class="parameter_annotations"> </td> 414</tr> 415<tr> 416<td class="parameter_name"><p>user_data</p></td> 417<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> 418<td class="parameter_annotations"> </td> 419</tr> 420</tbody> 421</table></div> 422</div> 423<p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p> 424</div> 425<hr> 426<div class="refsect2"> 427<a name="GstMultiFdSink-client-fd-removed"></a><h3>The <code class="literal">“client-fd-removed”</code> signal</h3> 428<pre class="programlisting"><span class="returnvalue">void</span> 429user_function (<a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink"><span class="type">GstMultiFdSink</span></a> *gstmultifdsink, 430 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> fd, 431 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> 432<p>The given file descriptor was removed from multifdsink. This signal will 433be emitted from the streaming thread so applications should be prepared 434for that.</p> 435<p>In this callback, <em class="parameter"><code>gstmultifdsink</code></em> 436 has removed all the information 437associated with <em class="parameter"><code>fd</code></em> 438 and it is therefore not possible to call get-stats 439with <em class="parameter"><code>fd</code></em> 440. It is however safe to <code class="function">close()</code> and reuse <em class="parameter"><code>fd</code></em> 441 in the callback.</p> 442<div class="refsect3"> 443<a name="GstMultiFdSink-client-fd-removed.parameters"></a><h4>Parameters</h4> 444<div class="informaltable"><table class="informaltable" width="100%" border="0"> 445<colgroup> 446<col width="150px" class="parameters_name"> 447<col class="parameters_description"> 448<col width="200px" class="parameters_annotations"> 449</colgroup> 450<tbody> 451<tr> 452<td class="parameter_name"><p>gstmultifdsink</p></td> 453<td class="parameter_description"><p>the multifdsink element that emitted this signal</p></td> 454<td class="parameter_annotations"> </td> 455</tr> 456<tr> 457<td class="parameter_name"><p>fd</p></td> 458<td class="parameter_description"><p>the file descriptor that was removed from multifdsink</p></td> 459<td class="parameter_annotations"> </td> 460</tr> 461<tr> 462<td class="parameter_name"><p>user_data</p></td> 463<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> 464<td class="parameter_annotations"> </td> 465</tr> 466</tbody> 467</table></div> 468</div> 469<p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p> 470</div> 471<hr> 472<div class="refsect2"> 473<a name="GstMultiFdSink-client-removed"></a><h3>The <code class="literal">“client-removed”</code> signal</h3> 474<pre class="programlisting"><span class="returnvalue">void</span> 475user_function (<a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink"><span class="type">GstMultiFdSink</span></a> *gstmultifdsink, 476 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> fd, 477 <span class="type">GstMultiHandleSinkClientStatus</span> status, 478 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> 479<p>The given file descriptor is about to be removed from multifdsink. This 480signal will be emitted from the streaming thread so applications should 481be prepared for that.</p> 482<p><em class="parameter"><code>gstmultifdsink</code></em> 483 still holds a handle to <em class="parameter"><code>fd</code></em> 484 so it is possible to call 485the get-stats signal from this callback. For the same reason it is 486not safe to <code class="function">close()</code> and reuse <em class="parameter"><code>fd</code></em> 487 in this callback.</p> 488<div class="refsect3"> 489<a name="GstMultiFdSink-client-removed.parameters"></a><h4>Parameters</h4> 490<div class="informaltable"><table class="informaltable" width="100%" border="0"> 491<colgroup> 492<col width="150px" class="parameters_name"> 493<col class="parameters_description"> 494<col width="200px" class="parameters_annotations"> 495</colgroup> 496<tbody> 497<tr> 498<td class="parameter_name"><p>gstmultifdsink</p></td> 499<td class="parameter_description"><p>the multifdsink element that emitted this signal</p></td> 500<td class="parameter_annotations"> </td> 501</tr> 502<tr> 503<td class="parameter_name"><p>fd</p></td> 504<td class="parameter_description"><p>the file descriptor that is to be removed from multifdsink</p></td> 505<td class="parameter_annotations"> </td> 506</tr> 507<tr> 508<td class="parameter_name"><p>status</p></td> 509<td class="parameter_description"><p>the reason why the client was removed</p></td> 510<td class="parameter_annotations"> </td> 511</tr> 512<tr> 513<td class="parameter_name"><p>user_data</p></td> 514<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> 515<td class="parameter_annotations"> </td> 516</tr> 517</tbody> 518</table></div> 519</div> 520<p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p> 521</div> 522<hr> 523<div class="refsect2"> 524<a name="GstMultiFdSink-get-stats"></a><h3>The <code class="literal">“get-stats”</code> signal</h3> 525<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstStructure.html#GstStructure-struct"><span class="returnvalue">GstStructure</span></a>* 526user_function (<a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink"><span class="type">GstMultiFdSink</span></a> *gstmultifdsink, 527 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> fd, 528 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> 529<p>Get statistics about <em class="parameter"><code>fd</code></em> 530. This function returns a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstStructure.html#GstStructure-struct"><span class="type">GstStructure</span></a> to ease 531automatic wrapping for bindings.</p> 532<div class="refsect3"> 533<a name="GstMultiFdSink-get-stats.parameters"></a><h4>Parameters</h4> 534<div class="informaltable"><table class="informaltable" width="100%" border="0"> 535<colgroup> 536<col width="150px" class="parameters_name"> 537<col class="parameters_description"> 538<col width="200px" class="parameters_annotations"> 539</colgroup> 540<tbody> 541<tr> 542<td class="parameter_name"><p>gstmultifdsink</p></td> 543<td class="parameter_description"><p>the multifdsink element to emit this signal on</p></td> 544<td class="parameter_annotations"> </td> 545</tr> 546<tr> 547<td class="parameter_name"><p>fd</p></td> 548<td class="parameter_description"><p>the file descriptor to get stats of from multifdsink</p></td> 549<td class="parameter_annotations"> </td> 550</tr> 551<tr> 552<td class="parameter_name"><p>user_data</p></td> 553<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> 554<td class="parameter_annotations"> </td> 555</tr> 556</tbody> 557</table></div> 558</div> 559<div class="refsect3"> 560<a name="GstMultiFdSink-get-stats.returns"></a><h4>Returns</h4> 561<p> a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstStructure.html#GstStructure-struct"><span class="type">GstStructure</span></a> with the statistics. The structures 562contains guint64 values that represent respectively: total 563number of bytes sent (bytes-sent), time when the client was 564added (connect-time), time when the client was 565disconnected/removed (disconnect-time), time the client 566is/was active (connect-duration), last activity time (in 567epoch seconds) (last-activity-time), number of buffers 568dropped (buffers-dropped), the timestamp of the first buffer 569(first-buffer-ts) and of the last buffer (last-buffer-ts). 570All times are expressed in nanoseconds (GstClockTime). The 571structure can be empty if the client was not found.</p> 572</div> 573<p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></p> 574</div> 575<hr> 576<div class="refsect2"> 577<a name="GstMultiFdSink-remove"></a><h3>The <code class="literal">“remove”</code> signal</h3> 578<pre class="programlisting"><span class="returnvalue">void</span> 579user_function (<a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink"><span class="type">GstMultiFdSink</span></a> *gstmultifdsink, 580 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> fd, 581 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> 582<p>Remove the given open file descriptor from multifdsink.</p> 583<div class="refsect3"> 584<a name="GstMultiFdSink-remove.parameters"></a><h4>Parameters</h4> 585<div class="informaltable"><table class="informaltable" width="100%" border="0"> 586<colgroup> 587<col width="150px" class="parameters_name"> 588<col class="parameters_description"> 589<col width="200px" class="parameters_annotations"> 590</colgroup> 591<tbody> 592<tr> 593<td class="parameter_name"><p>gstmultifdsink</p></td> 594<td class="parameter_description"><p>the multifdsink element to emit this signal on</p></td> 595<td class="parameter_annotations"> </td> 596</tr> 597<tr> 598<td class="parameter_name"><p>fd</p></td> 599<td class="parameter_description"><p>the file descriptor to remove from multifdsink</p></td> 600<td class="parameter_annotations"> </td> 601</tr> 602<tr> 603<td class="parameter_name"><p>user_data</p></td> 604<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> 605<td class="parameter_annotations"> </td> 606</tr> 607</tbody> 608</table></div> 609</div> 610<p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></p> 611</div> 612<hr> 613<div class="refsect2"> 614<a name="GstMultiFdSink-remove-flush"></a><h3>The <code class="literal">“remove-flush”</code> signal</h3> 615<pre class="programlisting"><span class="returnvalue">void</span> 616user_function (<a class="link" href="gst-plugins-base-plugins-multifdsink.html#GstMultiFdSink"><span class="type">GstMultiFdSink</span></a> *gstmultifdsink, 617 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> fd, 618 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> 619<p>Remove the given open file descriptor from multifdsink after flushing all 620the pending data to the fd.</p> 621<div class="refsect3"> 622<a name="GstMultiFdSink-remove-flush.parameters"></a><h4>Parameters</h4> 623<div class="informaltable"><table class="informaltable" width="100%" border="0"> 624<colgroup> 625<col width="150px" class="parameters_name"> 626<col class="parameters_description"> 627<col width="200px" class="parameters_annotations"> 628</colgroup> 629<tbody> 630<tr> 631<td class="parameter_name"><p>gstmultifdsink</p></td> 632<td class="parameter_description"><p>the multifdsink element to emit this signal on</p></td> 633<td class="parameter_annotations"> </td> 634</tr> 635<tr> 636<td class="parameter_name"><p>fd</p></td> 637<td class="parameter_description"><p>the file descriptor to remove from multifdsink</p></td> 638<td class="parameter_annotations"> </td> 639</tr> 640<tr> 641<td class="parameter_name"><p>user_data</p></td> 642<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> 643<td class="parameter_annotations"> </td> 644</tr> 645</tbody> 646</table></div> 647</div> 648<p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></p> 649</div> 650</div> 651<div class="refsect1"> 652<a name="gst-plugins-base-plugins-multifdsink.see-also"></a><h2>See Also</h2> 653<p>tcpserversink</p> 654</div> 655</div> 656<div class="footer"> 657<hr>Generated by GTK-Doc V1.28</div> 658</body> 659</html>