gst.pipeline
Module for [Pipeline] class
Types 3
A #GstPipeline is a special #GstBin used as the toplevel container for the filter graph. The #GstPipeline will manage the selection and distribution of a global #GstClock as well as provide a #GstBus to the application.
[gst.pipeline.Pipeline.new_] is used to create a pipeline. when you are done with the pipeline, use [gst.object.ObjectWrap.unref] to free its resources including all added #GstElement objects (if not otherwise referenced).
Elements are added and removed from the pipeline using the #GstBin methods like [gst.bin.Bin.add] and [gst.bin.Bin.remove] (see #GstBin).
Before changing the state of the #GstPipeline (see #GstElement) a #GstBus should be retrieved with [gst.pipeline.Pipeline.getBus]. This #GstBus should then be used to receive #GstMessage from the elements in the pipeline. Listening to the #GstBus is necessary for retrieving error messages from the #GstPipeline and otherwise the #GstPipeline might stop without any indication, why. Furthermore, the #GstPipeline posts messages even if nobody listens on the #GstBus, which will pile up and use up memory.
By default, a #GstPipeline will automatically flush the pending #GstBus messages when going to the NULL state to ensure that no circular references exist when no messages are read from the #GstBus. This behaviour can be changed with [gst.pipeline.Pipeline.setAutoFlushBus].
When the #GstPipeline 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 #GST_STATE_CHANGE_NO_PREROLL from the [gst.element.Element.setState] 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 #GstSystemClock is used.
The clock selection can be controlled with the [gst.pipeline.Pipeline.useClock] method, which will enforce a given clock on the pipeline. With [gst.pipeline.Pipeline.autoClock] the default clock selection algorithm can be restored.
A #GstPipeline 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 [gst.element.Element.setStartTime] method.
PipelineGidBuilder builder()Get builder for [gst.pipeline.Pipeline] Returns: New builder objectbool autoFlushBus() @propertyGet `autoFlushBus` property. Returns: Whether or not to automatically flush all messages on the pipeline's bus when going from READY to NULL state. Please see [gst.pipeline.Pipeline.setAutoFlushBus...void autoFlushBus(bool propval) @propertySet `autoFlushBus` property. Params: propval = Whether or not to automatically flush all messages on the pipeline's bus when going from READY to NULL state. Please see [gst.pipeline.Pipeline.setAut...ulong delay() @propertyGet `delay` property. Returns: The expected delay needed for elements to spin up to the PLAYING state expressed in nanoseconds. see [gst.pipeline.Pipeline.setDelay] for more information on this opt...void delay(ulong propval) @propertySet `delay` property. Params: propval = The expected delay needed for elements to spin up to the PLAYING state expressed in nanoseconds. see [gst.pipeline.Pipeline.setDelay] for more information on...ulong latency() @propertyGet `latency` property. Returns: Latency to configure on the pipeline. See [gst.pipeline.Pipeline.setLatency].void latency(ulong propval) @propertySet `latency` property. Params: propval = Latency to configure on the pipeline. See [gst.pipeline.Pipeline.setLatency].void autoClock()Let pipeline select a clock automatically. This is the default behaviour.bool getAutoFlushBus()Check if pipeline will automatically flush messages when going to the NULL state. Returns: whether the pipeline will automatically flush its bus when going from READY to NULL state or not.gst.bus.Bus getBus()Gets the #GstBus of pipeline. The bus allows applications to receive #GstMessage packets. Returns: a #GstBus, unref after usage.gst.types.ClockTime getConfiguredLatency()Return the configured latency on pipeline. Returns: pipeline configured latency, or [gst.types.CLOCKTIMENONE] if none has been configured because pipeline did not reach the PLAYING state yet.gst.types.ClockTime getDelay()Get the configured delay (see [gst.pipeline.Pipeline.setDelay]). Returns: The configured delay.gst.types.ClockTime getLatency()Gets the latency that should be configured on the pipeline. See [gst.pipeline.Pipeline.setLatency]. Returns: Latency to configure on the pipeline or GSTCLOCKTIME_NONEgst.clock.Clock getPipelineClock()Gets the current clock used by pipeline.bool isLive()Check if pipeline is live. Returns: true if pipeline is live, false if not or if it did not reach the PAUSED state yet.void setAutoFlushBus(bool autoFlush)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.void setDelay(gst.types.ClockTime delay)Set the expected delay needed for all elements to perform the PAUSED to PLAYING state change. delay will be added to the base time of the elements so that they wait an additional delay amount of ti...void setLatency(gst.types.ClockTime latency)Sets the latency that should be configured on the pipeline. Setting GSTCLOCKTIME_NONE will restore the default behaviour of using the minimum latency from the LATENCY query. Setting this is usually...void useClock(gst.clock.Clock clock = null)Force pipeline to use the given clock. The pipeline will always use the given clock even if new clock providers are added to this pipeline.T autoFlushBus(bool propval)Set `autoFlushBus` property. Params: propval = Whether or not to automatically flush all messages on the pipeline's bus when going from READY to NULL state. Please see [gst.pipeline.Pipeline.setAut...T delay(ulong propval)Set `delay` property. Params: propval = The expected delay needed for elements to spin up to the PLAYING state expressed in nanoseconds. see [gst.pipeline.Pipeline.setDelay] for more information on...T latency(ulong propval)Set `latency` property. Params: propval = Latency to configure on the pipeline. See [gst.pipeline.Pipeline.setLatency]. Returns: Builder instance for fluent chaining