blob: 606bffbce093f3a7bbe451ce82f4b980bb973234 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GstPipeline: GStreamer 1.0 Core Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GStreamer 1.0 Core Reference Manual">
<link rel="up" href="libgstreamer.html" title="GStreamer Core Library">
<link rel="prev" href="gstreamer-GstParse.html" title="GstParse">
<link rel="next" href="GstPlugin.html" title="GstPlugin">
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
<a href="#GstPipeline.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#GstPipeline.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces">  <span class="dim">|</span> 
<a href="#GstPipeline.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties">  <span class="dim">|</span> 
<a href="#GstPipeline.properties" class="shortcut">Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="libgstreamer.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gstreamer-GstParse.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GstPlugin.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GstPipeline"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GstPipeline.top_of_page"></a>GstPipeline</span></h2>
<p>GstPipeline — Top-level bin with clocking and bus management
functionality.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GstPipeline.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="GstElement.html" title="GstElement"><span class="returnvalue">GstElement</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstPipeline.html#gst-pipeline-new" title="gst_pipeline_new ()">gst_pipeline_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstBus.html" title="GstBus"><span class="returnvalue">GstBus</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstPipeline.html#gst-pipeline-get-bus" title="gst_pipeline_get_bus ()">gst_pipeline_get_bus</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstPipeline.html#gst-pipeline-set-clock" title="gst_pipeline_set_clock ()">gst_pipeline_set_clock</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstClock.html" title="GstClock"><span class="returnvalue">GstClock</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstPipeline.html#gst-pipeline-get-pipeline-clock" title="gst_pipeline_get_pipeline_clock ()">gst_pipeline_get_pipeline_clock</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstClock.html" title="GstClock"><span class="returnvalue">GstClock</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstPipeline.html#gst-pipeline-get-clock" title="gst_pipeline_get_clock ()">gst_pipeline_get_clock</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstPipeline.html#gst-pipeline-use-clock" title="gst_pipeline_use_clock ()">gst_pipeline_use_clock</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstPipeline.html#gst-pipeline-auto-clock" title="gst_pipeline_auto_clock ()">gst_pipeline_auto_clock</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstPipeline.html#gst-pipeline-set-auto-flush-bus" title="gst_pipeline_set_auto_flush_bus ()">gst_pipeline_set_auto_flush_bus</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstPipeline.html#gst-pipeline-get-auto-flush-bus" title="gst_pipeline_get_auto_flush_bus ()">gst_pipeline_get_auto_flush_bus</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstPipeline.html#gst-pipeline-set-delay" title="gst_pipeline_set_delay ()">gst_pipeline_set_delay</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>
</td>
<td class="function_name">
<a class="link" href="GstPipeline.html#gst-pipeline-get-delay" title="gst_pipeline_get_delay ()">gst_pipeline_get_delay</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstPipeline.html#gst-pipeline-set-latency" title="gst_pipeline_set_latency ()">gst_pipeline_set_latency</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>
</td>
<td class="function_name">
<a class="link" href="GstPipeline.html#gst-pipeline-get-latency" title="gst_pipeline_get_latency ()">gst_pipeline_get_latency</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstPipeline.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="GstPipeline.html#GstPipeline--auto-flush-bus" title="The “auto-flush-bus” property">auto-flush-bus</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint64"><span class="type">guint64</span></a></td>
<td class="property_name"><a class="link" href="GstPipeline.html#GstPipeline--delay" title="The “delay” property">delay</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint64"><span class="type">guint64</span></a></td>
<td class="property_name"><a class="link" href="GstPipeline.html#GstPipeline--latency" title="The “latency” property">latency</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstPipeline.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GstPipeline.html#GstPipeline-struct" title="struct GstPipeline">GstPipeline</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GstPipeline.html#GstPipelineFlags" title="enum GstPipelineFlags">GstPipelineFlags</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstPipeline.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobjectgobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
<span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobjectgobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
<span class="lineart">╰──</span> <a class="link" href="GstObject.html" title="GstObject">GstObject</a>
<span class="lineart">╰──</span> <a class="link" href="GstElement.html" title="GstElement">GstElement</a>
<span class="lineart">╰──</span> <a class="link" href="GstBin.html" title="GstBin">GstBin</a>
<span class="lineart">╰──</span> GstPipeline
</pre>
</div>
<div class="refsect1">
<a name="GstPipeline.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GstPipeline implements
<a class="link" href="GstChildProxy.html" title="GstChildProxy">GstChildProxy</a>.</p>
</div>
<div class="refsect1">
<a name="GstPipeline.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gst/gst.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GstPipeline.description"></a><h2>Description</h2>
<p>A <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> is a special <a class="link" href="GstBin.html" title="GstBin"><span class="type">GstBin</span></a> used as the toplevel container for
the filter graph. The <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> will manage the selection and
distribution of a global <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> as well as provide a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> to the
application.</p>
<p>gst_pipeline_new() is used to create a pipeline. when you are done with
the pipeline, use <a class="link" href="GstObject.html#gst-object-unref" title="gst_object_unref ()"><code class="function">gst_object_unref()</code></a> to free its resources including all
added <a class="link" href="GstElement.html" title="GstElement"><span class="type">GstElement</span></a> objects (if not otherwise referenced).</p>
<p>Elements are added and removed from the pipeline using the <a class="link" href="GstBin.html" title="GstBin"><span class="type">GstBin</span></a>
methods like <a class="link" href="GstBin.html#gst-bin-add" title="gst_bin_add ()"><code class="function">gst_bin_add()</code></a> and <a class="link" href="GstBin.html#gst-bin-remove" title="gst_bin_remove ()"><code class="function">gst_bin_remove()</code></a> (see <a class="link" href="GstBin.html" title="GstBin"><span class="type">GstBin</span></a>).</p>
<p>Before changing the state of the <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> (see <a class="link" href="GstElement.html" title="GstElement"><span class="type">GstElement</span></a>) a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a>
can be retrieved with <a class="link" href="GstPipeline.html#gst-pipeline-get-bus" title="gst_pipeline_get_bus ()"><code class="function">gst_pipeline_get_bus()</code></a>. This bus can then be
used to receive <a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a> from the elements in the pipeline.</p>
<p>By default, a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> will automatically flush the pending <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a>
messages when going to the NULL state to ensure that no circular
references exist when no messages are read from the <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a>. This
behaviour can be changed with <a class="link" href="GstPipeline.html#gst-pipeline-set-auto-flush-bus" title="gst_pipeline_set_auto_flush_bus ()"><code class="function">gst_pipeline_set_auto_flush_bus()</code></a>.</p>
<p>When the <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> performs the PAUSED to PLAYING state change it will
select a clock for the elements. The clock selection algorithm will by
default select a clock provided by an element that is most upstream
(closest to the source). For live pipelines (ones that return
<a class="link" href="GstElement.html#GST-STATE-CHANGE-NO-PREROLL:CAPS"><span class="type">GST_STATE_CHANGE_NO_PREROLL</span></a> from the <a class="link" href="GstElement.html#gst-element-set-state" title="gst_element_set_state ()"><code class="function">gst_element_set_state()</code></a> call) this
will select the clock provided by the live source. For normal pipelines
this will select a clock provided by the sinks (most likely the audio
sink). If no element provides a clock, a default <a class="link" href="GstSystemClock.html" title="GstSystemClock"><span class="type">GstSystemClock</span></a> is used.</p>
<p>The clock selection can be controlled with the <a class="link" href="GstPipeline.html#gst-pipeline-use-clock" title="gst_pipeline_use_clock ()"><code class="function">gst_pipeline_use_clock()</code></a>
method, which will enforce a given clock on the pipeline. With
<a class="link" href="GstPipeline.html#gst-pipeline-auto-clock" title="gst_pipeline_auto_clock ()"><code class="function">gst_pipeline_auto_clock()</code></a> the default clock selection algorithm can be
restored.</p>
<p>A <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> maintains a running time for the elements. The running
time is defined as the difference between the current clock time and
the base time. When the pipeline goes to READY or a flushing seek is
performed on it, the running time is reset to 0. When the pipeline is
set from PLAYING to PAUSED, the current clock time is sampled and used to
configure the base time for the elements when the pipeline is set
to PLAYING again. The effect is that the running time (as the difference
between the clock time and the base time) will count how much time was spent
in the PLAYING state. This default behaviour can be changed with the
<a class="link" href="GstElement.html#gst-element-set-start-time" title="gst_element_set_start_time ()"><code class="function">gst_element_set_start_time()</code></a> method.</p>
</div>
<div class="refsect1">
<a name="GstPipeline.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gst-pipeline-new"></a><h3>gst_pipeline_new ()</h3>
<pre class="programlisting"><a class="link" href="GstElement.html" title="GstElement"><span class="returnvalue">GstElement</span></a> *
gst_pipeline_new (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>Create a new pipeline with the given name.</p>
<div class="refsect3">
<a name="gst-pipeline-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p> name of new pipeline. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-pipeline-new.returns"></a><h4>Returns</h4>
<p> newly created GstPipeline</p>
<p>MT safe. </p>
<p><span class="annotation">[<acronym title="Alias for transfer none, used for objects with floating refs."><span class="acronym">transfer floating</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-pipeline-get-bus"></a><h3>gst_pipeline_get_bus ()</h3>
<pre class="programlisting"><a class="link" href="GstBus.html" title="GstBus"><span class="returnvalue">GstBus</span></a> *
gst_pipeline_get_bus (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>);</pre>
<p>Gets the <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> of <em class="parameter"><code>pipeline</code></em>
. The bus allows applications to receive
<a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a> packets.</p>
<div class="refsect3">
<a name="gst-pipeline-get-bus.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>pipeline</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-pipeline-get-bus.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a>, unref after usage.</p>
<p>MT safe. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-pipeline-set-clock"></a><h3>gst_pipeline_set_clock ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_pipeline_set_clock (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>,
<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>);</pre>
<p>Set the clock for <em class="parameter"><code>pipeline</code></em>
. The clock will be distributed
to all the elements managed by the pipeline.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="gst-pipeline-set-clock.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>pipeline</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>clock</p></td>
<td class="parameter_description"><p> the clock to set. </p></td>
<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>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-pipeline-set-clock.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the clock could be set on the pipeline. <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if
some element did not accept the clock.</p>
<p>MT safe.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-pipeline-get-pipeline-clock"></a><h3>gst_pipeline_get_pipeline_clock ()</h3>
<pre class="programlisting"><a class="link" href="GstClock.html" title="GstClock"><span class="returnvalue">GstClock</span></a> *
gst_pipeline_get_pipeline_clock (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>);</pre>
<p>Gets the current clock used by <em class="parameter"><code>pipeline</code></em>
.</p>
<p>Unlike <a class="link" href="GstElement.html#gst-element-get-clock" title="gst_element_get_clock ()"><code class="function">gst_element_get_clock()</code></a>, this function will always return a
clock, even if the pipeline is not in the PLAYING state.</p>
<div class="refsect3">
<a name="gst-pipeline-get-pipeline-clock.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>pipeline</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-pipeline-get-pipeline-clock.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a>, unref after usage. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-pipeline-get-clock"></a><h3>gst_pipeline_get_clock ()</h3>
<pre class="programlisting"><a class="link" href="GstClock.html" title="GstClock"><span class="returnvalue">GstClock</span></a> *
gst_pipeline_get_clock (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>);</pre>
<p>Gets the current clock used by <em class="parameter"><code>pipeline</code></em>
. Users of object
oriented languages should use <a class="link" href="GstPipeline.html#gst-pipeline-get-pipeline-clock" title="gst_pipeline_get_pipeline_clock ()"><code class="function">gst_pipeline_get_pipeline_clock()</code></a>
to avoid confusion with <a class="link" href="GstElement.html#gst-element-get-clock" title="gst_element_get_clock ()"><code class="function">gst_element_get_clock()</code></a> which has a different behavior.</p>
<p>Unlike <a class="link" href="GstElement.html#gst-element-get-clock" title="gst_element_get_clock ()"><code class="function">gst_element_get_clock()</code></a>, this function will always return a
clock, even if the pipeline is not in the PLAYING state.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="gst-pipeline-get-clock.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>pipeline</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-pipeline-get-clock.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a>, unref after usage. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-pipeline-use-clock"></a><h3>gst_pipeline_use_clock ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_pipeline_use_clock (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>,
<em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>);</pre>
<p>Force <em class="parameter"><code>pipeline</code></em>
to use the given <em class="parameter"><code>clock</code></em>
. The pipeline will
always use the given clock even if new clock providers are added
to this pipeline.</p>
<p>If <em class="parameter"><code>clock</code></em>
is <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> all clocking will be disabled which will make
the pipeline run as fast as possible.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="gst-pipeline-use-clock.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>pipeline</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>clock</p></td>
<td class="parameter_description"><p> the clock to use. </p></td>
<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>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-pipeline-auto-clock"></a><h3>gst_pipeline_auto_clock ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_pipeline_auto_clock (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>);</pre>
<p>Let <em class="parameter"><code>pipeline</code></em>
select a clock automatically. This is the default
behaviour.</p>
<p>Use this function if you previous forced a fixed clock with
<a class="link" href="GstPipeline.html#gst-pipeline-use-clock" title="gst_pipeline_use_clock ()"><code class="function">gst_pipeline_use_clock()</code></a> and want to restore the default
pipeline clock selection algorithm.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="gst-pipeline-auto-clock.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>pipeline</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-pipeline-set-auto-flush-bus"></a><h3>gst_pipeline_set_auto_flush_bus ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_pipeline_set_auto_flush_bus (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> auto_flush</code></em>);</pre>
<p>Usually, when a pipeline goes from READY to NULL state, it automatically
flushes all pending messages on the bus, which is done for refcounting
purposes, to break circular references.</p>
<p>This means that applications that update state using (async) bus messages
(e.g. do certain things when a pipeline goes from PAUSED to READY) might
not get to see messages when the pipeline is shut down, because they might
be flushed before they can be dispatched in the main thread. This behaviour
can be disabled using this function.</p>
<p>It is important that all messages on the bus are handled when the
automatic flushing is disabled else memory leaks will be introduced.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="gst-pipeline-set-auto-flush-bus.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>pipeline</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>auto_flush</p></td>
<td class="parameter_description"><p>whether or not to automatically flush the bus when
the pipeline goes from READY to NULL state</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-pipeline-get-auto-flush-bus"></a><h3>gst_pipeline_get_auto_flush_bus ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_pipeline_get_auto_flush_bus (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>);</pre>
<p>Check if <em class="parameter"><code>pipeline</code></em>
will automatically flush messages when going to
the NULL state.</p>
<div class="refsect3">
<a name="gst-pipeline-get-auto-flush-bus.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>pipeline</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-pipeline-get-auto-flush-bus.returns"></a><h4>Returns</h4>
<p> whether the pipeline will automatically flush its bus when
going from READY to NULL state or not.</p>
<p>MT safe.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-pipeline-set-delay"></a><h3>gst_pipeline_set_delay ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_pipeline_set_delay (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>,
<em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> delay</code></em>);</pre>
<p>Set the expected delay needed for all elements to perform the
PAUSED to PLAYING state change. <em class="parameter"><code>delay</code></em>
will be added to the
base time of the elements so that they wait an additional <em class="parameter"><code>delay</code></em>
amount of time before starting to process buffers and cannot be
<a class="link" href="GstClock.html#GST-CLOCK-TIME-NONE:CAPS" title="GST_CLOCK_TIME_NONE"><span class="type">GST_CLOCK_TIME_NONE</span></a>.</p>
<p>This option is used for tuning purposes and should normally not be
used.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="gst-pipeline-set-delay.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>pipeline</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>delay</p></td>
<td class="parameter_description"><p>the delay</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-pipeline-get-delay"></a><h3>gst_pipeline_get_delay ()</h3>
<pre class="programlisting"><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>
gst_pipeline_get_delay (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>);</pre>
<p>Get the configured delay (see <a class="link" href="GstPipeline.html#gst-pipeline-set-delay" title="gst_pipeline_set_delay ()"><code class="function">gst_pipeline_set_delay()</code></a>).</p>
<div class="refsect3">
<a name="gst-pipeline-get-delay.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>pipeline</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-pipeline-get-delay.returns"></a><h4>Returns</h4>
<p> The configured delay.</p>
<p>MT safe.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-pipeline-set-latency"></a><h3>gst_pipeline_set_latency ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_pipeline_set_latency (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>,
<em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> latency</code></em>);</pre>
<p>Sets the latency that should be configured on the pipeline. Setting
GST_CLOCK_TIME_NONE will restore the default behaviour of using the minimum
latency from the LATENCY query. Setting this is usually not required and
the pipeline will figure out an appropriate latency automatically.</p>
<p>Setting a too low latency, especially lower than the minimum latency from
the LATENCY query, will most likely cause the pipeline to fail.</p>
<div class="refsect3">
<a name="gst-pipeline-set-latency.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>pipeline</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>latency</p></td>
<td class="parameter_description"><p>latency to configure</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-pipeline-get-latency"></a><h3>gst_pipeline_get_latency ()</h3>
<pre class="programlisting"><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>
gst_pipeline_get_latency (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>);</pre>
<p>Gets the latency that should be configured on the pipeline. See
<a class="link" href="GstPipeline.html#gst-pipeline-set-latency" title="gst_pipeline_set_latency ()"><code class="function">gst_pipeline_set_latency()</code></a>.</p>
<div class="refsect3">
<a name="gst-pipeline-get-latency.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>pipeline</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-pipeline-get-latency.returns"></a><h4>Returns</h4>
<p> Latency to configure on the pipeline or GST_CLOCK_TIME_NONE</p>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-1.6">1.6</a></p>
</div>
</div>
<div class="refsect1">
<a name="GstPipeline.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GstPipeline-struct"></a><h3>struct GstPipeline</h3>
<pre class="programlisting">struct GstPipeline {
GstClock *fixed_clock;
GstClockTime stream_time;
GstClockTime delay;
};
</pre>
<p>The <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> structure.</p>
<div class="refsect3">
<a name="GstPipeline.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *<em class="structfield"><code><a name="GstPipeline-struct.fixed-clock"></a>fixed_clock</code></em>;</p></td>
<td class="struct_member_description"><p>The fixed clock of the pipeline, used when
GST_PIPELINE_FLAG_FIXED_CLOCK is set.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> <em class="structfield"><code><a name="GstPipeline-struct.stream-time"></a>stream_time</code></em>;</p></td>
<td class="struct_member_description"><p>The stream time of the pipeline. A better name for this
property would be the running_time, the total time spent in the
PLAYING state without being flushed. (deprecated, use the start_time
on GstElement).</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> <em class="structfield"><code><a name="GstPipeline-struct.delay"></a>delay</code></em>;</p></td>
<td class="struct_member_description"><p>Extra delay added to base_time to compensate for computing delays
when setting elements to PLAYING.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GstPipelineFlags"></a><h3>enum GstPipelineFlags</h3>
<p>Pipeline flags</p>
<div class="refsect3">
<a name="GstPipelineFlags.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GST-PIPELINE-FLAG-FIXED-CLOCK:CAPS"></a>GST_PIPELINE_FLAG_FIXED_CLOCK</p></td>
<td class="enum_member_description">
<p>this pipeline works with a fixed clock</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-PIPELINE-FLAG-LAST:CAPS"></a>GST_PIPELINE_FLAG_LAST</p></td>
<td class="enum_member_description">
<p>offset to define more flags</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="GstPipeline.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GstPipeline--auto-flush-bus"></a><h3>The <code class="literal">“auto-flush-bus”</code> property</h3>
<pre class="programlisting"> “auto-flush-bus” <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>Whether or not to automatically flush all messages on the
pipeline's bus when going from READY to NULL state. Please see
<a class="link" href="GstPipeline.html#gst-pipeline-set-auto-flush-bus" title="gst_pipeline_set_auto_flush_bus ()"><code class="function">gst_pipeline_set_auto_flush_bus()</code></a> for more information on this option.</p>
<p>Flags: Read / Write</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2">
<a name="GstPipeline--delay"></a><h3>The <code class="literal">“delay”</code> property</h3>
<pre class="programlisting"> “delay” <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint64"><span class="type">guint64</span></a></pre>
<p>The expected delay needed for elements to spin up to the
PLAYING state expressed in nanoseconds.
see <a class="link" href="GstPipeline.html#gst-pipeline-set-delay" title="gst_pipeline_set_delay ()"><code class="function">gst_pipeline_set_delay()</code></a> for more information on this option.</p>
<p>Flags: Read / Write</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2">
<a name="GstPipeline--latency"></a><h3>The <code class="literal">“latency”</code> property</h3>
<pre class="programlisting"> “latency” <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint64"><span class="type">guint64</span></a></pre>
<p>Latency to configure on the pipeline. See <a class="link" href="GstPipeline.html#gst-pipeline-set-latency" title="gst_pipeline_set_latency ()"><code class="function">gst_pipeline_set_latency()</code></a>.</p>
<p>Flags: Read / Write</p>
<p>Default value: 18446744073709551615</p>
<p class="since">Since: <a class="link" href="ix05.html#api-index-1.6">1.6</a></p>
</div>
</div>
<div class="refsect1">
<a name="GstPipeline.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GstElement.html" title="GstElement"><span class="type">GstElement</span></a>, <a class="link" href="GstBin.html" title="GstBin"><span class="type">GstBin</span></a>, <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a>, <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>