49
49
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GstBaseSink.html#gst-base-sink-query-latency" title="gst_base_sink_query_latency ()">gst_base_sink_query_latency</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
50
50
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *live</code></em>,
51
51
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *upstream_live</code></em>,
52
<em class="parameter"><code><a href="../gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> *min_latency</code></em>,
53
<em class="parameter"><code><a href="../gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> *max_latency</code></em>);
54
<a href="../gstreamer-1.0/GstClock.html#GstClockTime"><span class="returnvalue">GstClockTime</span></a> <a class="link" href="GstBaseSink.html#gst-base-sink-get-latency" title="gst_base_sink_get_latency ()">gst_base_sink_get_latency</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>);
55
<a href="../gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> <a class="link" href="GstBaseSink.html#gst-base-sink-do-preroll" title="gst_base_sink_do_preroll ()">gst_base_sink_do_preroll</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
56
<em class="parameter"><code><a href="../gstreamer-1.0/gstreamer-GstMiniObject.html#GstMiniObject"><span class="type">GstMiniObject</span></a> *obj</code></em>);
57
<a href="../gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> <a class="link" href="GstBaseSink.html#gst-base-sink-wait-preroll" title="gst_base_sink_wait_preroll ()">gst_base_sink_wait_preroll</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>);
58
<a href="../gstreamer-1.0/GstClock.html#GstClockReturn"><span class="returnvalue">GstClockReturn</span></a> <a class="link" href="GstBaseSink.html#gst-base-sink-wait-clock" title="gst_base_sink_wait_clock ()">gst_base_sink_wait_clock</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
59
<em class="parameter"><code><a href="../gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> time</code></em>,
60
<em class="parameter"><code><a href="../gstreamer-1.0/GstClock.html#GstClockTimeDiff"><span class="type">GstClockTimeDiff</span></a> *jitter</code></em>);
61
<a href="../gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> <a class="link" href="GstBaseSink.html#gst-base-sink-wait-eos" title="gst_base_sink_wait_eos ()">gst_base_sink_wait_eos</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
62
<em class="parameter"><code><a href="../gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> time</code></em>,
63
<em class="parameter"><code><a href="../gstreamer-1.0/GstClock.html#GstClockTimeDiff"><span class="type">GstClockTimeDiff</span></a> *jitter</code></em>);
52
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> *min_latency</code></em>,
53
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> *max_latency</code></em>);
54
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="returnvalue">GstClockTime</span></a> <a class="link" href="GstBaseSink.html#gst-base-sink-get-latency" title="gst_base_sink_get_latency ()">gst_base_sink_get_latency</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>);
55
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> <a class="link" href="GstBaseSink.html#gst-base-sink-do-preroll" title="gst_base_sink_do_preroll ()">gst_base_sink_do_preroll</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
56
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMiniObject.html#GstMiniObject"><span class="type">GstMiniObject</span></a> *obj</code></em>);
57
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> <a class="link" href="GstBaseSink.html#gst-base-sink-wait-preroll" title="gst_base_sink_wait_preroll ()">gst_base_sink_wait_preroll</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>);
58
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockReturn"><span class="returnvalue">GstClockReturn</span></a> <a class="link" href="GstBaseSink.html#gst-base-sink-wait-clock" title="gst_base_sink_wait_clock ()">gst_base_sink_wait_clock</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
59
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> time</code></em>,
60
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTimeDiff"><span class="type">GstClockTimeDiff</span></a> *jitter</code></em>);
61
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> <a class="link" href="GstBaseSink.html#gst-base-sink-wait-eos" title="gst_base_sink_wait_eos ()">gst_base_sink_wait_eos</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
62
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> time</code></em>,
63
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTimeDiff"><span class="type">GstClockTimeDiff</span></a> *jitter</code></em>);
64
64
<span class="returnvalue">void</span> <a class="link" href="GstBaseSink.html#gst-base-sink-set-sync" title="gst_base_sink_set_sync ()">gst_base_sink_set_sync</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
65
65
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> sync</code></em>);
66
66
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GstBaseSink.html#gst-base-sink-get-sync" title="gst_base_sink_get_sync ()">gst_base_sink_get_sync</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>);
74
74
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> enabled</code></em>);
75
75
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GstBaseSink.html#gst-base-sink-is-async-enabled" title="gst_base_sink_is_async_enabled ()">gst_base_sink_is_async_enabled</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>);
76
76
<span class="returnvalue">void</span> <a class="link" href="GstBaseSink.html#gst-base-sink-set-ts-offset" title="gst_base_sink_set_ts_offset ()">gst_base_sink_set_ts_offset</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
77
<em class="parameter"><code><a href="../gstreamer-1.0/GstClock.html#GstClockTimeDiff"><span class="type">GstClockTimeDiff</span></a> offset</code></em>);
78
<a href="../gstreamer-1.0/GstClock.html#GstClockTimeDiff"><span class="returnvalue">GstClockTimeDiff</span></a> <a class="link" href="GstBaseSink.html#gst-base-sink-get-ts-offset" title="gst_base_sink_get_ts_offset ()">gst_base_sink_get_ts_offset</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>);
77
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTimeDiff"><span class="type">GstClockTimeDiff</span></a> offset</code></em>);
78
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTimeDiff"><span class="returnvalue">GstClockTimeDiff</span></a> <a class="link" href="GstBaseSink.html#gst-base-sink-get-ts-offset" title="gst_base_sink_get_ts_offset ()">gst_base_sink_get_ts_offset</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>);
79
79
<span class="returnvalue">void</span> <a class="link" href="GstBaseSink.html#gst-base-sink-set-render-delay" title="gst_base_sink_set_render_delay ()">gst_base_sink_set_render_delay</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
80
<em class="parameter"><code><a href="../gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> delay</code></em>);
81
<a href="../gstreamer-1.0/GstClock.html#GstClockTime"><span class="returnvalue">GstClockTime</span></a> <a class="link" href="GstBaseSink.html#gst-base-sink-get-render-delay" title="gst_base_sink_get_render_delay ()">gst_base_sink_get_render_delay</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>);
82
<a href="../gstreamer-1.0/gstreamer-GstSample.html#GstSample"><span class="returnvalue">GstSample</span></a> * <a class="link" href="GstBaseSink.html#gst-base-sink-get-last-sample" title="gst_base_sink_get_last_sample ()">gst_base_sink_get_last_sample</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>);
80
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> delay</code></em>);
81
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="returnvalue">GstClockTime</span></a> <a class="link" href="GstBaseSink.html#gst-base-sink-get-render-delay" title="gst_base_sink_get_render_delay ()">gst_base_sink_get_render_delay</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>);
82
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstSample.html#GstSample"><span class="returnvalue">GstSample</span></a> * <a class="link" href="GstBaseSink.html#gst-base-sink-get-last-sample" title="gst_base_sink_get_last_sample ()">gst_base_sink_get_last_sample</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>);
83
83
<span class="returnvalue">void</span> <a class="link" href="GstBaseSink.html#gst-base-sink-set-blocksize" title="gst_base_sink_set_blocksize ()">gst_base_sink_set_blocksize</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
84
84
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> blocksize</code></em>);
85
85
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="GstBaseSink.html#gst-base-sink-get-blocksize" title="gst_base_sink_get_blocksize ()">gst_base_sink_get_blocksize</a> (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>);
113
113
"<a class="link" href="GstBaseSink.html#GstBaseSink--async" title='The "async" property'>async</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write
114
114
"<a class="link" href="GstBaseSink.html#GstBaseSink--blocksize" title='The "blocksize" property'>blocksize</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write
115
115
"<a class="link" href="GstBaseSink.html#GstBaseSink--enable-last-sample" title='The "enable-last-sample" property'>enable-last-sample</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write
116
"<a class="link" href="GstBaseSink.html#GstBaseSink--last-sample" title='The "last-sample" property'>last-sample</a>" <a href="../gstreamer-1.0/gstreamer-GstSample.html#GstSample"><span class="type">GstSample</span></a>* : Read
116
"<a class="link" href="GstBaseSink.html#GstBaseSink--last-sample" title='The "last-sample" property'>last-sample</a>" <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstSample.html#GstSample"><span class="type">GstSample</span></a>* : Read
117
117
"<a class="link" href="GstBaseSink.html#GstBaseSink--max-lateness" title='The "max-lateness" property'>max-lateness</a>" <span class="type">gint64</span> : Read / Write
118
118
"<a class="link" href="GstBaseSink.html#GstBaseSink--qos" title='The "qos" property'>qos</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write
119
119
"<a class="link" href="GstBaseSink.html#GstBaseSink--render-delay" title='The "render-delay" property'>render-delay</a>" <span class="type">guint64</span> : Read / Write
126
126
<a name="GstBaseSink.description"></a><h2>Description</h2>
128
128
<a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> is the base class for sink elements in GStreamer, such as
129
xvimagesink or filesink. It is a layer on top of <a href="../gstreamer-1.0/GstElement.html"><span class="type">GstElement</span></a> that provides a
129
xvimagesink or filesink. It is a layer on top of <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> that provides a
130
130
simplified interface to plugin writers. <a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> handles many details
131
131
for you, for example: preroll, clock synchronization, state changes,
132
132
activation in push or pull mode, and queries.
135
135
In most cases, when writing sink elements, there is no need to implement
136
class methods from <a href="../gstreamer-1.0/GstElement.html"><span class="type">GstElement</span></a> or to set functions on pads, because the
136
class methods from <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> or to set functions on pads, because the
137
137
<a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> infrastructure should be sufficient.
162
162
<span class="gtkdoc opt">{</span>
163
163
GstElementClass <span class="gtkdoc opt">*</span>gstelement_class <span class="gtkdoc opt">=</span> <span class="function">GST_ELEMENT_CLASS</span> <span class="gtkdoc opt">(</span>klass<span class="gtkdoc opt">);</span>
165
<span class="gtkdoc slc">// sinktemplate should be a <a href="../gstreamer-1.0/GstPadTemplate.html#GstStaticPadTemplate">GstStaticPadTemplate</a> with direction</span>
166
<span class="gtkdoc slc">// <a href="../gstreamer-1.0/GstPad.html#GST-PAD-SINK:CAPS">GST_PAD_SINK</a> and name "sink"</span>
167
<span class="function"><a href="../gstreamer-1.0/GstElement.html#gst-element-class-add-pad-template">gst_element_class_add_pad_template</a></span> <span class="gtkdoc opt">(</span>gstelement_class<span class="gtkdoc opt">,</span>
168
<span class="function"><a href="../gstreamer-1.0/GstPadTemplate.html#gst-static-pad-template-get">gst_static_pad_template_get</a></span> <span class="gtkdoc opt">(&</span>sinktemplate<span class="gtkdoc opt">));</span>
165
<span class="gtkdoc slc">// sinktemplate should be a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPadTemplate.html#GstStaticPadTemplate">GstStaticPadTemplate</a> with direction</span>
166
<span class="gtkdoc slc">// <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GST-PAD-SINK:CAPS">GST_PAD_SINK</a> and name "sink"</span>
167
<span class="function"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html#gst-element-class-add-pad-template">gst_element_class_add_pad_template</a></span> <span class="gtkdoc opt">(</span>gstelement_class<span class="gtkdoc opt">,</span>
168
<span class="function"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPadTemplate.html#gst-static-pad-template-get">gst_static_pad_template_get</a></span> <span class="gtkdoc opt">(&</span>sinktemplate<span class="gtkdoc opt">));</span>
169
169
<span class="gtkdoc slc">// see <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElementFactory.html#GstElementDetails">GstElementDetails</a></span>
170
170
<span class="function"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html#gst-element-class-set-details">gst_element_class_set_details</a></span> <span class="gtkdoc opt">(</span>gstelement_class<span class="gtkdoc opt">, &</span>details<span class="gtkdoc opt">);</span>
171
171
<span class="gtkdoc opt">}</span></pre></td>
187
187
When the element is set to PLAYING, <a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> will synchronise on the
188
188
clock using the times returned from <a class="link" href="GstBaseSink.html#GstBaseSinkClass.get-times"><code class="function">GstBaseSinkClass.get_times()</code></a>. If this
189
function returns <a href="../gstreamer-1.0/GstClock.html#GST-CLOCK-TIME-NONE:CAPS"><span class="type">GST_CLOCK_TIME_NONE</span></a> for the start time, no synchronisation
189
function returns <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GST-CLOCK-TIME-NONE:CAPS"><span class="type">GST_CLOCK_TIME_NONE</span></a> for the start time, no synchronisation
190
190
will be done. Synchronisation can be disabled entirely by setting the object
191
191
<a class="link" href="GstBaseSink.html#GstBaseSink--sync" title='The "sync" property'><span class="type">"sync"</span></a> property to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.
432
432
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_base_sink_query_latency (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
433
433
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *live</code></em>,
434
434
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *upstream_live</code></em>,
435
<em class="parameter"><code><a href="../gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> *min_latency</code></em>,
436
<em class="parameter"><code><a href="../gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> *max_latency</code></em>);</pre>
435
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> *min_latency</code></em>,
436
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> *max_latency</code></em>);</pre>
438
438
Query the sink for the latency parameters. The latency will be queried from
439
439
the upstream elements. <em class="parameter"><code>live</code></em> will be TRUE if <em class="parameter"><code>sink</code></em> is configured to
509
509
<div class="refsect2">
510
510
<a name="gst-base-sink-do-preroll"></a><h3>gst_base_sink_do_preroll ()</h3>
511
<pre class="programlisting"><a href="../gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> gst_base_sink_do_preroll (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
512
<em class="parameter"><code><a href="../gstreamer-1.0/gstreamer-GstMiniObject.html#GstMiniObject"><span class="type">GstMiniObject</span></a> *obj</code></em>);</pre>
511
<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> gst_base_sink_do_preroll (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
512
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMiniObject.html#GstMiniObject"><span class="type">GstMiniObject</span></a> *obj</code></em>);</pre>
514
514
If the <em class="parameter"><code>sink</code></em> spawns its own thread for pulling buffers from upstream it
515
515
should call this method after it has pulled a buffer. If the element needed
554
554
This function will block until a state change to PLAYING happens (in which
555
case this function returns <a href="../gstreamer-1.0/GstPad.html#GST-FLOW-OK:CAPS"><span class="type">GST_FLOW_OK</span></a>) or the processing must be stopped due
555
case this function returns <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GST-FLOW-OK:CAPS"><span class="type">GST_FLOW_OK</span></a>) or the processing must be stopped due
556
556
to a state change to READY or a FLUSH event (in which case this function
557
returns <a href="../gstreamer-1.0/GstPad.html#GST-FLOW-FLUSHING:CAPS"><span class="type">GST_FLOW_FLUSHING</span></a>).
557
returns <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GST-FLOW-FLUSHING:CAPS"><span class="type">GST_FLOW_FLUSHING</span></a>).
560
560
This function should only be called with the PREROLL_LOCK held, like in the
581
581
<div class="refsect2">
582
582
<a name="gst-base-sink-wait-clock"></a><h3>gst_base_sink_wait_clock ()</h3>
583
<pre class="programlisting"><a href="../gstreamer-1.0/GstClock.html#GstClockReturn"><span class="returnvalue">GstClockReturn</span></a> gst_base_sink_wait_clock (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
584
<em class="parameter"><code><a href="../gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> time</code></em>,
585
<em class="parameter"><code><a href="../gstreamer-1.0/GstClock.html#GstClockTimeDiff"><span class="type">GstClockTimeDiff</span></a> *jitter</code></em>);</pre>
583
<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockReturn"><span class="returnvalue">GstClockReturn</span></a> gst_base_sink_wait_clock (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
584
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> time</code></em>,
585
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTimeDiff"><span class="type">GstClockTimeDiff</span></a> *jitter</code></em>);</pre>
587
587
This function will block until <em class="parameter"><code>time</code></em> is reached. It is usually called by
588
588
subclasses that use their own internal synchronisation.
591
If <em class="parameter"><code>time</code></em> is not valid, no sycnhronisation is done and <a href="../gstreamer-1.0/GstClock.html#GST-CLOCK-BADTIME:CAPS"><span class="type">GST_CLOCK_BADTIME</span></a> is
591
If <em class="parameter"><code>time</code></em> is not valid, no sycnhronisation is done and <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GST-CLOCK-BADTIME:CAPS"><span class="type">GST_CLOCK_BADTIME</span></a> is
592
592
returned. Likewise, if synchronisation is disabled in the element or there
593
is no clock, no synchronisation is done and <a href="../gstreamer-1.0/GstClock.html#GST-CLOCK-BADTIME:CAPS"><span class="type">GST_CLOCK_BADTIME</span></a> is returned.
593
is no clock, no synchronisation is done and <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GST-CLOCK-BADTIME:CAPS"><span class="type">GST_CLOCK_BADTIME</span></a> is returned.
596
596
This function should only be called with the PREROLL_LOCK held, like when
631
631
<div class="refsect2">
632
632
<a name="gst-base-sink-wait-eos"></a><h3>gst_base_sink_wait_eos ()</h3>
633
<pre class="programlisting"><a href="../gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> gst_base_sink_wait_eos (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
634
<em class="parameter"><code><a href="../gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> time</code></em>,
635
<em class="parameter"><code><a href="../gstreamer-1.0/GstClock.html#GstClockTimeDiff"><span class="type">GstClockTimeDiff</span></a> *jitter</code></em>);</pre>
633
<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> gst_base_sink_wait_eos (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
634
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> time</code></em>,
635
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTimeDiff"><span class="type">GstClockTimeDiff</span></a> *jitter</code></em>);</pre>
637
637
This function will block until <em class="parameter"><code>time</code></em> is reached. It is usually called by
638
638
subclasses that use their own internal synchronisation but want to let the
871
871
<div class="refsect2">
872
872
<a name="gst-base-sink-set-ts-offset"></a><h3>gst_base_sink_set_ts_offset ()</h3>
873
873
<pre class="programlisting"><span class="returnvalue">void</span> gst_base_sink_set_ts_offset (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
874
<em class="parameter"><code><a href="../gstreamer-1.0/GstClock.html#GstClockTimeDiff"><span class="type">GstClockTimeDiff</span></a> offset</code></em>);</pre>
874
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTimeDiff"><span class="type">GstClockTimeDiff</span></a> offset</code></em>);</pre>
876
876
Adjust the synchronisation of <em class="parameter"><code>sink</code></em> with <em class="parameter"><code>offset</code></em>. A negative value will
877
877
render buffers earlier than their timestamp. A positive value will delay
919
919
<div class="refsect2">
920
920
<a name="gst-base-sink-set-render-delay"></a><h3>gst_base_sink_set_render_delay ()</h3>
921
921
<pre class="programlisting"><span class="returnvalue">void</span> gst_base_sink_set_render_delay (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>,
922
<em class="parameter"><code><a href="../gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> delay</code></em>);</pre>
922
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> delay</code></em>);</pre>
924
924
Set the render delay in <em class="parameter"><code>sink</code></em> to <em class="parameter"><code>delay</code></em>. The render delay is the time
925
925
between actual rendering of a buffer and its synchronisation time. Some
977
977
<div class="refsect2">
978
978
<a name="gst-base-sink-get-last-sample"></a><h3>gst_base_sink_get_last_sample ()</h3>
979
<pre class="programlisting"><a href="../gstreamer-1.0/gstreamer-GstSample.html#GstSample"><span class="returnvalue">GstSample</span></a> * gst_base_sink_get_last_sample (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>);</pre>
979
<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstSample.html#GstSample"><span class="returnvalue">GstSample</span></a> * gst_base_sink_get_last_sample (<em class="parameter"><code><a class="link" href="GstBaseSink.html" title="GstBaseSink"><span class="type">GstBaseSink</span></a> *sink</code></em>);</pre>
981
981
Get the last sample that arrived in the sink and was used for preroll or for
982
982
rendering. This property can be used to generate thumbnails.
985
The <a href="../gstreamer-1.0/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> on the sample can be used to determine the type of the buffer.
985
The <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> on the sample can be used to determine the type of the buffer.
988
988
Free-function: gst_sample_unref