Initialize Tizen 2.3
[framework/multimedia/gstreamer0.10.git] / wearable / docs / gst / html / GstPipeline.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GstPipeline</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GStreamer 0.10 Core Reference Manual">
8 <link rel="up" href="libgstreamer.html" title="GStreamer Core Library">
9 <link rel="prev" href="gstreamer-GstParse.html" title="GstParse">
10 <link rel="next" href="GstPlugin.html" title="GstPlugin">
11 <meta name="generator" content="GTK-Doc V1.18 (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="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="gstreamer-GstParse.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="libgstreamer.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GStreamer 0.10 Core Reference Manual</th>
21 <td><a accesskey="n" href="GstPlugin.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#GstPipeline.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#GstPipeline.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#GstPipeline.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#GstPipeline.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
31                    | 
32                   <a href="#GstPipeline.properties" class="shortcut">Properties</a>
33 </td></tr>
34 </table>
35 <div class="refentry">
36 <a name="GstPipeline"></a><div class="titlepage"></div>
37 <div class="refnamediv"><table width="100%"><tr>
38 <td valign="top">
39 <h2><span class="refentrytitle"><a name="GstPipeline.top_of_page"></a>GstPipeline</span></h2>
40 <p>GstPipeline — Top-level bin with clocking and bus management
41                        functionality.</p>
42 </td>
43 <td valign="top" align="right"></td>
44 </tr></table></div>
45 <div class="refsynopsisdiv">
46 <a name="GstPipeline.synopsis"></a><h2>Synopsis</h2>
47 <pre class="synopsis">
48 #include &lt;gst/gst.h&gt;
49
50 struct              <a class="link" href="GstPipeline.html#GstPipeline-struct" title="struct GstPipeline">GstPipeline</a>;
51 enum                <a class="link" href="GstPipeline.html#GstPipelineFlags" title="enum GstPipelineFlags">GstPipelineFlags</a>;
52 <a class="link" href="GstElement.html" title="GstElement"><span class="returnvalue">GstElement</span></a> *        <a class="link" href="GstPipeline.html#gst-pipeline-new" title="gst_pipeline_new ()">gst_pipeline_new</a>                    (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
53 <a class="link" href="GstBus.html" title="GstBus"><span class="returnvalue">GstBus</span></a> *            <a class="link" href="GstPipeline.html#gst-pipeline-get-bus" title="gst_pipeline_get_bus ()">gst_pipeline_get_bus</a>                (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>);
54 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GstPipeline.html#gst-pipeline-set-clock" title="gst_pipeline_set_clock ()">gst_pipeline_set_clock</a>              (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>,
55                                                          <em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>);
56 <a class="link" href="GstClock.html" title="GstClock"><span class="returnvalue">GstClock</span></a> *          <a class="link" href="GstPipeline.html#gst-pipeline-get-clock" title="gst_pipeline_get_clock ()">gst_pipeline_get_clock</a>              (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>);
57 <span class="returnvalue">void</span>                <a class="link" href="GstPipeline.html#gst-pipeline-use-clock" title="gst_pipeline_use_clock ()">gst_pipeline_use_clock</a>              (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>,
58                                                          <em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>);
59 <span class="returnvalue">void</span>                <a class="link" href="GstPipeline.html#gst-pipeline-auto-clock" title="gst_pipeline_auto_clock ()">gst_pipeline_auto_clock</a>             (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>);
60 <span class="returnvalue">void</span>                <a class="link" href="GstPipeline.html#gst-pipeline-set-new-stream-time" title="gst_pipeline_set_new_stream_time ()">gst_pipeline_set_new_stream_time</a>    (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>,
61                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> time</code></em>);
62 <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>        <a class="link" href="GstPipeline.html#gst-pipeline-get-last-stream-time" title="gst_pipeline_get_last_stream_time ()">gst_pipeline_get_last_stream_time</a>   (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>);
63 <span class="returnvalue">void</span>                <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>     (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>,
64                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> auto_flush</code></em>);
65 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <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>     (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>);
66 <span class="returnvalue">void</span>                <a class="link" href="GstPipeline.html#gst-pipeline-set-delay" title="gst_pipeline_set_delay ()">gst_pipeline_set_delay</a>              (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>,
67                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> delay</code></em>);
68 <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>        <a class="link" href="GstPipeline.html#gst-pipeline-get-delay" title="gst_pipeline_get_delay ()">gst_pipeline_get_delay</a>              (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>);
69 </pre>
70 </div>
71 <div class="refsect1">
72 <a name="GstPipeline.object-hierarchy"></a><h2>Object Hierarchy</h2>
73 <pre class="synopsis">
74   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
75    +----<a class="link" href="GstObject.html" title="GstObject">GstObject</a>
76          +----<a class="link" href="GstElement.html" title="GstElement">GstElement</a>
77                +----<a class="link" href="GstBin.html" title="GstBin">GstBin</a>
78                      +----GstPipeline
79 </pre>
80 </div>
81 <div class="refsect1">
82 <a name="GstPipeline.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
83 <p>
84 GstPipeline implements
85  <a class="link" href="GstChildProxy.html" title="GstChildProxy">GstChildProxy</a>.</p>
86 </div>
87 <div class="refsect1">
88 <a name="GstPipeline.properties"></a><h2>Properties</h2>
89 <pre class="synopsis">
90   "<a class="link" href="GstPipeline.html#GstPipeline--auto-flush-bus" title='The "auto-flush-bus" property'>auto-flush-bus</a>"           <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write
91   "<a class="link" href="GstPipeline.html#GstPipeline--delay" title='The "delay" property'>delay</a>"                    <span class="type">guint64</span>               : Read / Write
92 </pre>
93 </div>
94 <div class="refsect1">
95 <a name="GstPipeline.description"></a><h2>Description</h2>
96 <p>
97 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
98 the filter graph. The <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> will manage the selection and
99 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
100 application. It will also implement a default behaviour for managing
101 seek events (see <a class="link" href="GstElement.html#gst-element-seek" title="gst_element_seek ()"><code class="function">gst_element_seek()</code></a>).
102 </p>
103 <p>
104 <a class="link" href="GstPipeline.html#gst-pipeline-new" title="gst_pipeline_new ()"><code class="function">gst_pipeline_new()</code></a> is used to create a pipeline. when you are done with
105 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
106 added <a class="link" href="GstElement.html" title="GstElement"><span class="type">GstElement</span></a> objects (if not otherwise referenced).
107 </p>
108 <p>
109 Elements are added and removed from the pipeline using the <a class="link" href="GstBin.html" title="GstBin"><span class="type">GstBin</span></a>
110 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>).
111 </p>
112 <p>
113 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>
114 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
115 used to receive <a class="link" href="gstreamer-GstMessage.html#GstMessage" title="struct GstMessage"><span class="type">GstMessage</span></a> from the elements in the pipeline.
116 </p>
117 <p>
118 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>
119 messages when going to the NULL state to ensure that no circular
120 references exist when no messages are read from the <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a>. This
121 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>.
122 </p>
123 <p>
124 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
125 select a clock for the elements. The clock selection algorithm will by
126 default select a clock provided by an element that is most upstream
127 (closest to the source). For live pipelines (ones that return
128 <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
129 will select the clock provided by the live source. For normal pipelines
130 this will select a clock provided by the sinks (most likely the audio
131 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.
132 </p>
133 <p>
134 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>
135 method, which will enforce a given clock on the pipeline. With
136 <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
137 restored.
138 </p>
139 <p>
140 A <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> maintains a running time for the elements. The running
141 time is defined as the difference between the current clock time and
142 the base time. When the pipeline goes to READY or a flushing seek is
143 performed on it, the running time is reset to 0. When the pipeline is
144 set from PLAYING to PAUSED, the current clock time is sampled and used to
145 configure the base time for the elements when the pipeline is set
146 to PLAYING again. The effect is that the running time (as the difference
147 between the clock time and the base time) will count how much time was spent
148 in the PLAYING state. This default behaviour can be changed with the
149 <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.
150 </p>
151 <p>
152 When sending a flushing seek event to a GstPipeline (see
153 <a class="link" href="GstElement.html#gst-element-seek" title="gst_element_seek ()"><code class="function">gst_element_seek()</code></a>), it will make sure that the pipeline is properly
154 PAUSED and resumed as well as set the new running time to 0 when the
155 seek succeeded.
156 </p>
157 <p>
158 Last reviewed on 2009-05-29 (0.10.24)
159 </p>
160 </div>
161 <div class="refsect1">
162 <a name="GstPipeline.details"></a><h2>Details</h2>
163 <div class="refsect2">
164 <a name="GstPipeline-struct"></a><h3>struct GstPipeline</h3>
165 <pre class="programlisting">struct GstPipeline {
166   GstClock      *fixed_clock;
167
168   GstClockTime   stream_time;   
169   GstClockTime   delay;
170 };
171 </pre>
172 <p>
173 The <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> structure.
174 </p>
175 <div class="variablelist"><table border="0">
176 <col align="left" valign="top">
177 <tbody>
178 <tr>
179 <td><p><span class="term"><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>;</span></p></td>
180 <td>The fixed clock of the pipeline, used when
181 GST_PIPELINE_FLAG_FIXED_CLOCK is set.</td>
182 </tr>
183 <tr>
184 <td><p><span class="term"><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>;</span></p></td>
185 <td>The stream time of the pipeline. A better name for this
186 property would be the running_time, the total time spent in the
187 PLAYING state without being flushed. (deprecated, use the start_time
188 on GstElement).</td>
189 </tr>
190 <tr>
191 <td><p><span class="term"><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>;</span></p></td>
192 <td>Extra delay added to base_time to compensate for computing delays
193 when setting elements to PLAYING.</td>
194 </tr>
195 </tbody>
196 </table></div>
197 </div>
198 <hr>
199 <div class="refsect2">
200 <a name="GstPipelineFlags"></a><h3>enum GstPipelineFlags</h3>
201 <pre class="programlisting">typedef enum {
202   GST_PIPELINE_FLAG_FIXED_CLOCK        = (GST_BIN_FLAG_LAST &lt;&lt; 0),
203   /* padding */
204   GST_PIPELINE_FLAG_LAST               = (GST_BIN_FLAG_LAST &lt;&lt; 4)
205 } GstPipelineFlags;
206 </pre>
207 <p>
208 Pipeline flags
209 </p>
210 <div class="variablelist"><table border="0">
211 <col align="left" valign="top">
212 <tbody>
213 <tr>
214 <td><p><a name="GST-PIPELINE-FLAG-FIXED-CLOCK:CAPS"></a><span class="term"><code class="literal">GST_PIPELINE_FLAG_FIXED_CLOCK</code></span></p></td>
215 <td>this pipeline works with a fixed clock
216 </td>
217 </tr>
218 <tr>
219 <td><p><a name="GST-PIPELINE-FLAG-LAST:CAPS"></a><span class="term"><code class="literal">GST_PIPELINE_FLAG_LAST</code></span></p></td>
220 <td>offset to define more flags
221 </td>
222 </tr>
223 </tbody>
224 </table></div>
225 </div>
226 <hr>
227 <div class="refsect2">
228 <a name="gst-pipeline-new"></a><h3>gst_pipeline_new ()</h3>
229 <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="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
230 <p>
231 Create a new pipeline with the given name.
232 </p>
233 <div class="variablelist"><table border="0">
234 <col align="left" valign="top">
235 <tbody>
236 <tr>
237 <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
238 <td>name of new pipeline</td>
239 </tr>
240 <tr>
241 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
242 <td>newly created GstPipeline
243 MT safe. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
244 </td>
245 </tr>
246 </tbody>
247 </table></div>
248 </div>
249 <hr>
250 <div class="refsect2">
251 <a name="gst-pipeline-get-bus"></a><h3>gst_pipeline_get_bus ()</h3>
252 <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>
253 <p>
254 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
255 <a class="link" href="gstreamer-GstMessage.html#GstMessage" title="struct GstMessage"><span class="type">GstMessage</span></a> packets.
256 </p>
257 <div class="variablelist"><table border="0">
258 <col align="left" valign="top">
259 <tbody>
260 <tr>
261 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
262 <td>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a>
263 </td>
264 </tr>
265 <tr>
266 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
267 <td>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a>, unref after usage.
268 MT safe. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
269 </td>
270 </tr>
271 </tbody>
272 </table></div>
273 </div>
274 <hr>
275 <div class="refsect2">
276 <a name="gst-pipeline-set-clock"></a><h3>gst_pipeline_set_clock ()</h3>
277 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-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>,
278                                                          <em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>);</pre>
279 <p>
280 Set the clock for <em class="parameter"><code>pipeline</code></em>. The clock will be distributed
281 to all the elements managed by the pipeline.
282 </p>
283 <div class="variablelist"><table border="0">
284 <col align="left" valign="top">
285 <tbody>
286 <tr>
287 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
288 <td>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a>
289 </td>
290 </tr>
291 <tr>
292 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
293 <td>the clock to set. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
294 </td>
295 </tr>
296 <tr>
297 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
298 <td>TRUE if the clock could be set on the pipeline. FALSE if
299 some element did not accept the clock.
300 MT safe.</td>
301 </tr>
302 </tbody>
303 </table></div>
304 </div>
305 <hr>
306 <div class="refsect2">
307 <a name="gst-pipeline-get-clock"></a><h3>gst_pipeline_get_clock ()</h3>
308 <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>
309 <p>
310 Gets the current clock used by <em class="parameter"><code>pipeline</code></em>.
311 </p>
312 <div class="variablelist"><table border="0">
313 <col align="left" valign="top">
314 <tbody>
315 <tr>
316 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
317 <td>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a>
318 </td>
319 </tr>
320 <tr>
321 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
322 <td>a <a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a>, unref after usage. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
323 </td>
324 </tr>
325 </tbody>
326 </table></div>
327 </div>
328 <hr>
329 <div class="refsect2">
330 <a name="gst-pipeline-use-clock"></a><h3>gst_pipeline_use_clock ()</h3>
331 <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>,
332                                                          <em class="parameter"><code><a class="link" href="GstClock.html" title="GstClock"><span class="type">GstClock</span></a> *clock</code></em>);</pre>
333 <p>
334 Force <em class="parameter"><code>pipeline</code></em> to use the given <em class="parameter"><code>clock</code></em>. The pipeline will
335 always use the given clock even if new clock providers are added
336 to this pipeline.
337 </p>
338 <p>
339 If <em class="parameter"><code>clock</code></em> is NULL all clocking will be disabled which will make
340 the pipeline run as fast as possible.
341 </p>
342 <p>
343 MT safe.
344 </p>
345 <div class="variablelist"><table border="0">
346 <col align="left" valign="top">
347 <tbody>
348 <tr>
349 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
350 <td>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a>
351 </td>
352 </tr>
353 <tr>
354 <td><p><span class="term"><em class="parameter"><code>clock</code></em> :</span></p></td>
355 <td>the clock to use. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
356 </td>
357 </tr>
358 </tbody>
359 </table></div>
360 </div>
361 <hr>
362 <div class="refsect2">
363 <a name="gst-pipeline-auto-clock"></a><h3>gst_pipeline_auto_clock ()</h3>
364 <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>
365 <p>
366 Let <em class="parameter"><code>pipeline</code></em> select a clock automatically. This is the default
367 behaviour.
368 </p>
369 <p>
370 Use this function if you previous forced a fixed clock with
371 <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
372 pipeline clock selection algorithm.
373 </p>
374 <p>
375 MT safe.
376 </p>
377 <div class="variablelist"><table border="0">
378 <col align="left" valign="top">
379 <tbody><tr>
380 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
381 <td>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a>
382 </td>
383 </tr></tbody>
384 </table></div>
385 </div>
386 <hr>
387 <div class="refsect2">
388 <a name="gst-pipeline-set-new-stream-time"></a><h3>gst_pipeline_set_new_stream_time ()</h3>
389 <pre class="programlisting"><span class="returnvalue">void</span>                gst_pipeline_set_new_stream_time    (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>,
390                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> time</code></em>);</pre>
391 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
392 <h3 class="title">Warning</h3>
393 <p><code class="literal">gst_pipeline_set_new_stream_time</code> is deprecated and should not be used in newly-written code. This function has the wrong name and is equivalent to
394 <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>.</p>
395 </div>
396 <p>
397 Set the new start time of <em class="parameter"><code>pipeline</code></em> to <em class="parameter"><code>time</code></em>. The start time is used to
398 set the base time on the elements (see <a class="link" href="GstElement.html#gst-element-set-base-time" title="gst_element_set_base_time ()"><code class="function">gst_element_set_base_time()</code></a>)
399 in the PAUSED-&gt;PLAYING state transition.
400 </p>
401 <p>
402 Setting <em class="parameter"><code>time</code></em> to <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> will disable the pipeline's management
403 of element base time. The application will then be responsible for
404 performing base time distribution. This is sometimes useful if you want to
405 synchronize capture from multiple pipelines, and you can also ensure that the
406 pipelines have the same clock.
407 </p>
408 <p>
409 MT safe.
410 </p>
411 <div class="variablelist"><table border="0">
412 <col align="left" valign="top">
413 <tbody>
414 <tr>
415 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
416 <td>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a>
417 </td>
418 </tr>
419 <tr>
420 <td><p><span class="term"><em class="parameter"><code>time</code></em> :</span></p></td>
421 <td>the new running time to set</td>
422 </tr>
423 </tbody>
424 </table></div>
425 </div>
426 <hr>
427 <div class="refsect2">
428 <a name="gst-pipeline-get-last-stream-time"></a><h3>gst_pipeline_get_last_stream_time ()</h3>
429 <pre class="programlisting"><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="returnvalue">GstClockTime</span></a>        gst_pipeline_get_last_stream_time   (<em class="parameter"><code><a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> *pipeline</code></em>);</pre>
430 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
431 <h3 class="title">Warning</h3>
432 <p><code class="literal">gst_pipeline_get_last_stream_time</code> is deprecated and should not be used in newly-written code. This function has the wrong name and is equivalent to
433 <a class="link" href="GstElement.html#gst-element-get-start-time" title="gst_element_get_start_time ()"><code class="function">gst_element_get_start_time()</code></a>.</p>
434 </div>
435 <p>
436 Gets the last running time of <em class="parameter"><code>pipeline</code></em>. If the pipeline is PLAYING,
437 the returned time is the running time used to configure the element's
438 base time in the PAUSED-&gt;PLAYING state. If the pipeline is PAUSED, the
439 returned time is the running time when the pipeline was paused.
440 </p>
441 <p>
442 This function returns <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> if the pipeline was
443 configured to not handle the management of the element's base time
444 (see <a class="link" href="GstPipeline.html#gst-pipeline-set-new-stream-time" title="gst_pipeline_set_new_stream_time ()"><code class="function">gst_pipeline_set_new_stream_time()</code></a>).
445 </p>
446 <p>
447 MT safe.
448 </p>
449 <div class="variablelist"><table border="0">
450 <col align="left" valign="top">
451 <tbody>
452 <tr>
453 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
454 <td>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a>
455 </td>
456 </tr>
457 <tr>
458 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
459 <td>a <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a>.</td>
460 </tr>
461 </tbody>
462 </table></div>
463 </div>
464 <hr>
465 <div class="refsect2">
466 <a name="gst-pipeline-set-auto-flush-bus"></a><h3>gst_pipeline_set_auto_flush_bus ()</h3>
467 <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>,
468                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> auto_flush</code></em>);</pre>
469 <p>
470 Usually, when a pipeline goes from READY to NULL state, it automatically
471 flushes all pending messages on the bus, which is done for refcounting
472 purposes, to break circular references.
473 </p>
474 <p>
475 This means that applications that update state using (async) bus messages
476 (e.g. do certain things when a pipeline goes from PAUSED to READY) might
477 not get to see messages when the pipeline is shut down, because they might
478 be flushed before they can be dispatched in the main thread. This behaviour
479 can be disabled using this function.
480 </p>
481 <p>
482 It is important that all messages on the bus are handled when the
483 automatic flushing is disabled else memory leaks will be introduced.
484 </p>
485 <p>
486 MT safe.
487 </p>
488 <div class="variablelist"><table border="0">
489 <col align="left" valign="top">
490 <tbody>
491 <tr>
492 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
493 <td>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a>
494 </td>
495 </tr>
496 <tr>
497 <td><p><span class="term"><em class="parameter"><code>auto_flush</code></em> :</span></p></td>
498 <td>whether or not to automatically flush the bus when
499 the pipeline goes from READY to NULL state</td>
500 </tr>
501 </tbody>
502 </table></div>
503 <p class="since">Since 0.10.4</p>
504 </div>
505 <hr>
506 <div class="refsect2">
507 <a name="gst-pipeline-get-auto-flush-bus"></a><h3>gst_pipeline_get_auto_flush_bus ()</h3>
508 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-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>
509 <p>
510 Check if <em class="parameter"><code>pipeline</code></em> will automatically flush messages when going to
511 the NULL state.
512 </p>
513 <div class="variablelist"><table border="0">
514 <col align="left" valign="top">
515 <tbody>
516 <tr>
517 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
518 <td>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a>
519 </td>
520 </tr>
521 <tr>
522 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
523 <td>whether the pipeline will automatically flush its bus when
524 going from READY to NULL state or not.
525 MT safe.</td>
526 </tr>
527 </tbody>
528 </table></div>
529 <p class="since">Since 0.10.4</p>
530 </div>
531 <hr>
532 <div class="refsect2">
533 <a name="gst-pipeline-set-delay"></a><h3>gst_pipeline_set_delay ()</h3>
534 <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>,
535                                                          <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> delay</code></em>);</pre>
536 <p>
537 Set the expected delay needed for all elements to perform the
538 PAUSED to PLAYING state change. <em class="parameter"><code>delay</code></em> will be added to the
539 base time of the elements so that they wait an additional <em class="parameter"><code>delay</code></em>
540 amount of time before starting to process buffers and cannot be
541 <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>.
542 </p>
543 <p>
544 This option is used for tuning purposes and should normally not be
545 used.
546 </p>
547 <p>
548 MT safe.
549 </p>
550 <div class="variablelist"><table border="0">
551 <col align="left" valign="top">
552 <tbody>
553 <tr>
554 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
555 <td>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a>
556 </td>
557 </tr>
558 <tr>
559 <td><p><span class="term"><em class="parameter"><code>delay</code></em> :</span></p></td>
560 <td>the delay</td>
561 </tr>
562 </tbody>
563 </table></div>
564 <p class="since">Since 0.10.5</p>
565 </div>
566 <hr>
567 <div class="refsect2">
568 <a name="gst-pipeline-get-delay"></a><h3>gst_pipeline_get_delay ()</h3>
569 <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>
570 <p>
571 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>).
572 </p>
573 <div class="variablelist"><table border="0">
574 <col align="left" valign="top">
575 <tbody>
576 <tr>
577 <td><p><span class="term"><em class="parameter"><code>pipeline</code></em> :</span></p></td>
578 <td>a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a>
579 </td>
580 </tr>
581 <tr>
582 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
583 <td>The configured delay.
584 MT safe.</td>
585 </tr>
586 </tbody>
587 </table></div>
588 <p class="since">Since 0.10.5</p>
589 </div>
590 </div>
591 <div class="refsect1">
592 <a name="GstPipeline.property-details"></a><h2>Property Details</h2>
593 <div class="refsect2">
594 <a name="GstPipeline--auto-flush-bus"></a><h3>The <code class="literal">"auto-flush-bus"</code> property</h3>
595 <pre class="programlisting">  "auto-flush-bus"           <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
596 <p>
597 Whether or not to automatically flush all messages on the
598 pipeline's bus when going from READY to NULL state. Please see
599 <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.
600 </p>
601 <p>Default value: TRUE</p>
602 <p class="since">Since 0.10.4</p>
603 </div>
604 <hr>
605 <div class="refsect2">
606 <a name="GstPipeline--delay"></a><h3>The <code class="literal">"delay"</code> property</h3>
607 <pre class="programlisting">  "delay"                    <span class="type">guint64</span>               : Read / Write</pre>
608 <p>
609 The expected delay needed for elements to spin up to the
610 PLAYING state expressed in nanoseconds.
611 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.
612 </p>
613 <p>Default value: 0</p>
614 <p class="since">Since 0.10.5</p>
615 </div>
616 </div>
617 <div class="refsect1">
618 <a name="GstPipeline.see-also"></a><h2>See Also</h2>
619 <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>
620 </div>
621 </div>
622 <div class="footer">
623 <hr>
624           Generated by GTK-Doc V1.18</div>
625 </body>
626 </html>