Elements are added and removed from the pipeline using the {@code Bin}methods like {@link Bin#add add} and {@link Bin#remove remove}.
Before changing the state of the Pipeline (see {@link Element}) a {@link Bus} can be retrieved with {@link #getBus getBus}. This bus can then be used to receive {@link Message}s from the elements in the pipeline.
By default, a Pipeline will automatically flush the pending Bus messages when going to the NULL state to ensure that no circular references exist when no messages are read from the Bus. This behaviour can be changed with {@link #setAutoFlushBus setAutoFlushBus}
When the Pipeline 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 {@link StateChangeReturn#NO_PREROLL} from the {@link Element#setState 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 SystemClock is used.
The clock selection can be controlled with the gst_pipeline_use_clock() method, which will enforce a given clock on the pipeline. With gst_pipeline_auto_clock() the default clock selection algorithm can be restored.
A Pipeline maintains a stream time for the elements. The stream 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 stream 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. This default behaviour can be changed with the gst_pipeline_set_new_stream_time() method. When sending a flushing seek event to a GstPipeline (see {@link #seek seek}), it will make sure that the pipeline is properly PAUSED and resumed as well as set the new stream time to 0 when the seek succeeded.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|