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>input-selector: GStreamer Core 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 Core Plugins 1.0 Plugins Reference Manual"> 8<link rel="up" href="ch01.html" title="gstreamer Elements"> 9<link rel="prev" href="gstreamer-plugins-identity.html" title="identity"> 10<link rel="next" href="gstreamer-plugins-multiqueue.html" title="multiqueue"> 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="#gstreamer-plugins-input-selector.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 19 <a href="#gstreamer-plugins-input-selector.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span> 20 <a href="#gstreamer-plugins-input-selector.properties" class="shortcut">Properties</a></span> 21</td> 22<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> 23<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> 24<td><a accesskey="p" href="gstreamer-plugins-identity.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> 25<td><a accesskey="n" href="gstreamer-plugins-multiqueue.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> 26</tr></table> 27<div class="refentry"> 28<a name="gstreamer-plugins-input-selector"></a><div class="titlepage"></div> 29<div class="refnamediv"><table width="100%"><tr> 30<td valign="top"> 31<h2><span class="refentrytitle"><a name="gstreamer-plugins-input-selector.top_of_page"></a>input-selector</span></h2> 32<p>input-selector</p> 33</td> 34<td class="gallery_image" valign="top" align="right"></td> 35</tr></table></div> 36<div class="refsect1"> 37<a name="gstreamer-plugins-input-selector.properties"></a><h2>Properties</h2> 38<div class="informaltable"><table class="informaltable" border="0"> 39<colgroup> 40<col width="150px" class="properties_type"> 41<col width="300px" class="properties_name"> 42<col width="200px" class="properties_flags"> 43</colgroup> 44<tbody> 45<tr> 46<td class="property_type"> 47<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstPad-struct"><span class="type">GstPad</span></a> *</td> 48<td class="property_name"><a class="link" href="gstreamer-plugins-input-selector.html#GstInputSelector--active-pad" title="The “active-pad” property">active-pad</a></td> 49<td class="property_flags">Read / Write</td> 50</tr> 51<tr> 52<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td> 53<td class="property_name"><a class="link" href="gstreamer-plugins-input-selector.html#GstInputSelector--cache-buffers" title="The “cache-buffers” property">cache-buffers</a></td> 54<td class="property_flags">Read / Write</td> 55</tr> 56<tr> 57<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td> 58<td class="property_name"><a class="link" href="gstreamer-plugins-input-selector.html#GstInputSelector--n-pads" title="The “n-pads” property">n-pads</a></td> 59<td class="property_flags">Read</td> 60</tr> 61<tr> 62<td class="property_type"><a class="link" href="gstreamer-plugins-input-selector.html#GstInputSelectorSyncMode" title="enum GstInputSelectorSyncMode"><span class="type">GstInputSelectorSyncMode</span></a></td> 63<td class="property_name"><a class="link" href="gstreamer-plugins-input-selector.html#GstInputSelector--sync-mode" title="The “sync-mode” property">sync-mode</a></td> 64<td class="property_flags">Read / Write</td> 65</tr> 66<tr> 67<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td> 68<td class="property_name"><a class="link" href="gstreamer-plugins-input-selector.html#GstInputSelector--sync-streams" title="The “sync-streams” property">sync-streams</a></td> 69<td class="property_flags">Read / Write</td> 70</tr> 71</tbody> 72</table></div> 73</div> 74<a name="GstInputSelector"></a><div class="refsect1"> 75<a name="gstreamer-plugins-input-selector.other"></a><h2>Types and Values</h2> 76<div class="informaltable"><table class="informaltable" width="100%" border="0"> 77<colgroup> 78<col width="150px" class="name"> 79<col class="description"> 80</colgroup> 81<tbody> 82<tr> 83<td class="datatype_keyword">struct</td> 84<td class="function_name"><a class="link" href="gstreamer-plugins-input-selector.html#GstInputSelector-struct" title="struct GstInputSelector">GstInputSelector</a></td> 85</tr> 86<tr> 87<td class="datatype_keyword">enum</td> 88<td class="function_name"><a class="link" href="gstreamer-plugins-input-selector.html#GstInputSelectorSyncMode" title="enum GstInputSelectorSyncMode">GstInputSelectorSyncMode</a></td> 89</tr> 90</tbody> 91</table></div> 92</div> 93<div class="refsect1"> 94<a name="gstreamer-plugins-input-selector.object-hierarchy"></a><h2>Object Hierarchy</h2> 95<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a> 96 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> 97 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a> 98 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElement-struct">GstElement</a> 99 <span class="lineart">╰──</span> GstInputSelector 100</pre> 101</div> 102<div class="refsect1"> 103<a name="gstreamer-plugins-input-selector.description"></a><h2>Description</h2> 104<p>Direct one out of N input streams to the output pad.</p> 105<p>The input pads are from a GstPad subclass and have additional 106properties, which users may find useful, namely:</p> 107<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 108<li class="listitem"><p>"running-time": Running time of stream on pad (<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a>)</p></li> 109<li class="listitem"><p>"tags": The currently active tags on the pad (<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagList.html#GstTagList-struct"><span class="type">GstTagList</span></a>, boxed type)</p></li> 110<li class="listitem"><p>"active": If the pad is currently active (<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>)</p></li> 111<li class="listitem"><p>"always-ok" : Make an inactive pads return <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GST-FLOW-OK:CAPS"><span class="type">GST_FLOW_OK</span></a> instead of 112<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GST-FLOW-NOT-LINKED:CAPS"><span class="type">GST_FLOW_NOT_LINKED</span></a></p></li> 113</ul></div> 114<div class="refsynopsisdiv"> 115<h2>Synopsis</h2> 116<div class="refsect2"> 117<a name="id-1.2.14.7.5.1"></a><h3>Element Information</h3> 118<div class="variablelist"><table border="0" class="variablelist"> 119<colgroup> 120<col align="left" valign="top"> 121<col> 122</colgroup> 123<tbody> 124<tr> 125<td><p><span class="term">plugin</span></p></td> 126<td> 127 <a class="link" href="gstreamer-plugins-plugin-coreelements.html#plugin-coreelements">coreelements</a> 128 </td> 129</tr> 130<tr> 131<td><p><span class="term">author</span></p></td> 132<td>Julien Moutte <julien@moutte.net>, Jan Schmidt <thaytan@mad.scientist.com>, Wim Taymans <wim.taymans@gmail.com></td> 133</tr> 134<tr> 135<td><p><span class="term">class</span></p></td> 136<td>Generic</td> 137</tr> 138</tbody> 139</table></div> 140</div> 141<hr> 142<div class="refsect2"> 143<a name="id-1.2.14.7.5.2"></a><h3>Element Pads</h3> 144<div class="variablelist"><table border="0" class="variablelist"> 145<colgroup> 146<col align="left" valign="top"> 147<col> 148</colgroup> 149<tbody> 150<tr> 151<td><p><span class="term">name</span></p></td> 152<td>sink_%u</td> 153</tr> 154<tr> 155<td><p><span class="term">direction</span></p></td> 156<td>sink</td> 157</tr> 158<tr> 159<td><p><span class="term">presence</span></p></td> 160<td>request</td> 161</tr> 162<tr> 163<td><p><span class="term">details</span></p></td> 164<td>ANY</td> 165</tr> 166</tbody> 167</table></div> 168<div class="variablelist"><table border="0" class="variablelist"> 169<colgroup> 170<col align="left" valign="top"> 171<col> 172</colgroup> 173<tbody> 174<tr> 175<td><p><span class="term">name</span></p></td> 176<td>src</td> 177</tr> 178<tr> 179<td><p><span class="term">direction</span></p></td> 180<td>source</td> 181</tr> 182<tr> 183<td><p><span class="term">presence</span></p></td> 184<td>always</td> 185</tr> 186<tr> 187<td><p><span class="term">details</span></p></td> 188<td>ANY</td> 189</tr> 190</tbody> 191</table></div> 192</div> 193</div> 194</div> 195<div class="refsect1"> 196<a name="gstreamer-plugins-input-selector.functions_details"></a><h2>Functions</h2> 197<p></p> 198</div> 199<div class="refsect1"> 200<a name="gstreamer-plugins-input-selector.other_details"></a><h2>Types and Values</h2> 201<div class="refsect2"> 202<a name="GstInputSelector-struct"></a><h3>struct GstInputSelector</h3> 203<pre class="programlisting">struct GstInputSelector;</pre> 204</div> 205<hr> 206<div class="refsect2"> 207<a name="GstInputSelectorSyncMode"></a><h3>enum GstInputSelectorSyncMode</h3> 208<p>The different ways that input-selector can behave when in sync-streams mode.</p> 209<div class="refsect3"> 210<a name="GstInputSelectorSyncMode.members"></a><h4>Members</h4> 211<div class="informaltable"><table class="informaltable" width="100%" border="0"> 212<colgroup> 213<col width="300px" class="enum_members_name"> 214<col class="enum_members_description"> 215<col width="200px" class="enum_members_annotations"> 216</colgroup> 217<tbody> 218<tr> 219<td class="enum_member_name"><p><a name="GST-INPUT-SELECTOR-SYNC-MODE-ACTIVE-SEGMENT:CAPS"></a>GST_INPUT_SELECTOR_SYNC_MODE_ACTIVE_SEGMENT</p></td> 220<td class="enum_member_description"> 221<p>Sync using the current active segment.</p> 222</td> 223<td class="enum_member_annotations"> </td> 224</tr> 225<tr> 226<td class="enum_member_name"><p><a name="GST-INPUT-SELECTOR-SYNC-MODE-CLOCK:CAPS"></a>GST_INPUT_SELECTOR_SYNC_MODE_CLOCK</p></td> 227<td class="enum_member_description"> 228<p>Sync using the clock.</p> 229</td> 230<td class="enum_member_annotations"> </td> 231</tr> 232</tbody> 233</table></div> 234</div> 235</div> 236</div> 237<div class="refsect1"> 238<a name="gstreamer-plugins-input-selector.property-details"></a><h2>Property Details</h2> 239<div class="refsect2"> 240<a name="GstInputSelector--active-pad"></a><h3>The <code class="literal">“active-pad”</code> property</h3> 241<pre class="programlisting"> “active-pad” <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstPad-struct"><span class="type">GstPad</span></a> *</pre> 242<p>The currently active sink pad.</p> 243<p>Flags: Read / Write</p> 244</div> 245<hr> 246<div class="refsect2"> 247<a name="GstInputSelector--cache-buffers"></a><h3>The <code class="literal">“cache-buffers”</code> property</h3> 248<pre class="programlisting"> “cache-buffers” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre> 249<p>If set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> and GstInputSelector:sync-streams is also set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, 250the active pad will cache the buffers still considered valid (after current 251running time, see sync-mode) to avoid missing frames if/when the pad is 252reactivated.</p> 253<p>The active pad may push more buffers than what is currently displayed/consumed 254and when changing pads those buffers will be discarded and the only way to 255reactivate that pad without losing the already consumed buffers is to enable cache.</p> 256<p>Flags: Read / Write</p> 257<p>Default value: FALSE</p> 258</div> 259<hr> 260<div class="refsect2"> 261<a name="GstInputSelector--n-pads"></a><h3>The <code class="literal">“n-pads”</code> property</h3> 262<pre class="programlisting"> “n-pads” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre> 263<p>The number of sink pads.</p> 264<p>Flags: Read</p> 265<p>Default value: 0</p> 266</div> 267<hr> 268<div class="refsect2"> 269<a name="GstInputSelector--sync-mode"></a><h3>The <code class="literal">“sync-mode”</code> property</h3> 270<pre class="programlisting"> “sync-mode” <a class="link" href="gstreamer-plugins-input-selector.html#GstInputSelectorSyncMode" title="enum GstInputSelectorSyncMode"><span class="type">GstInputSelectorSyncMode</span></a></pre> 271<p>Select how input-selector will sync buffers when in sync-streams mode.</p> 272<p>Note that when using the "active-segment" mode, the "active-segment" may 273be ahead of current clock time when switching the active pad, as the current 274active pad may have pushed more buffers than what was displayed/consumed, 275which may cause delays and some missing buffers.</p> 276<p>Flags: Read / Write</p> 277<p>Default value: Sync using the current active segment</p> 278</div> 279<hr> 280<div class="refsect2"> 281<a name="GstInputSelector--sync-streams"></a><h3>The <code class="literal">“sync-streams”</code> property</h3> 282<pre class="programlisting"> “sync-streams” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre> 283<p>If set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> all inactive streams will be synced to the 284running time of the active stream or to the current clock.</p> 285<p>To make sure no buffers are dropped by input-selector 286that might be needed when switching the active pad, 287sync-mode should be set to "clock" and cache-buffers to TRUE.</p> 288<p>Flags: Read / Write</p> 289<p>Default value: TRUE</p> 290</div> 291</div> 292<div class="refsect1"> 293<a name="gstreamer-plugins-input-selector.see-also"></a><h2>See Also</h2> 294<p><a class="link" href="gstreamer-plugins-output-selector.html#GstOutputSelector"><span class="type">GstOutputSelector</span></a></p> 295</div> 296</div> 297<div class="footer"> 298<hr>Generated by GTK-Doc V1.28</div> 299</body> 300</html>