| GStreamer 0.9 Core Reference Manual |
|---|
GstPipelineGstPipeline — Top-level bin with scheduling and pipeline management functionality. |
#include <gst/gst.h>
GstPipeline;
enum GstPipelineFlags;
GstElement* gst_pipeline_new (const gchar *name);
void gst_pipeline_auto_clock (GstPipeline *pipeline);
GstBus* gst_pipeline_get_bus (GstPipeline *pipeline);
GstClock* gst_pipeline_get_clock (GstPipeline *pipeline);
GstClockTime gst_pipeline_get_last_stream_time
(GstPipeline *pipeline);
void gst_pipeline_set_clock (GstPipeline *pipeline,
GstClock *clock);
void gst_pipeline_set_new_stream_time
(GstPipeline *pipeline,
GstClockTime time);
void gst_pipeline_use_clock (GstPipeline *pipeline,
GstClock *clock);
In almost all cases, you'll want to use a GstPipeline when creating a filter graph. The GstPipeline will manage all the scheduling issues, including threading, as well as provide simple interfaces to common functions, like 'Play'.
gst_pipeline_new() is used to create a pipeline. when you are done with
the pipeline, use gst_object_unref() to free its resources.
typedef struct {
GstClock *fixed_clock; /* fixed clock if any */
GstClockTime stream_time;
GstClockTime delay;
GstClockTime play_timeout;
} GstPipeline;
typedef enum {
/* this pipeline works with a fixed clock */
GST_PIPELINE_FLAG_FIXED_CLOCK = GST_BIN_FLAG_LAST,
/* padding */
GST_PIPELINE_FLAG_LAST = GST_BIN_FLAG_LAST + 4
} GstPipelineFlags;
GstElement* gst_pipeline_new (const gchar *name);
Create a new pipeline with the given name.
name : |
name of new pipeline |
| Returns : | newly created GstPipeline MT safe. |
void gst_pipeline_auto_clock (GstPipeline *pipeline);
Let the pipeline select a clock automatically.
MT safe.
pipeline : |
the pipeline |
GstBus* gst_pipeline_get_bus (GstPipeline *pipeline);
Gets the GstBus of this pipeline.
pipeline : |
the pipeline |
| Returns : | a GstBus MT safe. |
GstClock* gst_pipeline_get_clock (GstPipeline *pipeline);
Gets the current clock used by the pipeline.
pipeline : |
the pipeline |
| Returns : | a GstClock |
GstClockTime gst_pipeline_get_last_stream_time (GstPipeline *pipeline);
Gets the last stream time of the pipeline. If the pipeline is PLAYING, the returned time is the stream time used to configure the elements in the PAUSED->PLAYING state. If the pipeline is PAUSED, the returned time is the stream time when the pipeline was paused.
pipeline : |
the pipeline |
| Returns : | a GstClockTime MT safe. |
void gst_pipeline_set_clock (GstPipeline *pipeline, GstClock *clock);
Set the clock for the pipeline. The clock will be distributed to all the elements managed by the pipeline.
MT safe.
pipeline : |
the pipeline |
clock : |
the clock to set |
void gst_pipeline_set_new_stream_time
(GstPipeline *pipeline,
GstClockTime time);
Set the new stream time of the pipeline. The stream time is used to
set the base time on the elements (see @gst_element_set_base_time())
in the PAUSED->PLAYING state transition.
MT safe.
pipeline : |
the pipeline |
time : |
void gst_pipeline_use_clock (GstPipeline *pipeline, GstClock *clock);
Force the pipeline to use the given clock. The pipeline will always use the given clock even if new clock providers are added to this pipeline.
MT safe.
pipeline : |
the pipeline |
clock : |
the clock to use |
| << GstParse | GstPlugin >> |