pipeline: Add binding friendly gst_pipeline_get_pipeline_clock()

Also skip gst_pipeline_get_clock() and gst_pipeline_set_clock() from the
bindings as they are confused with gst_element_*_clock().

API: gst_pipeline_get_pipeline_clock()

https://bugzilla.gnome.org/show_bug.cgi?id=744442
This commit is contained in:
Olivier Crête 2015-02-12 19:40:06 -05:00
parent 43f2f925a9
commit 59d9992ed0
3 changed files with 29 additions and 3 deletions

View file

@ -2128,6 +2128,7 @@ gst_pipeline_new
gst_pipeline_get_bus
gst_pipeline_set_clock
gst_pipeline_get_pipeline_clock
gst_pipeline_get_clock
gst_pipeline_use_clock

View file

@ -628,15 +628,39 @@ gst_pipeline_provide_clock_func (GstElement * element)
}
/**
* gst_pipeline_get_clock:
* gst_pipeline_get_clock: (skip)
* @pipeline: a #GstPipeline
*
* Gets the current clock used by @pipeline.
* Gets the current clock used by @pipeline. Users of object
* oriented languages should use gst_pipeline_get_pipeline_clock()
* to avoid confusion with gst_element_get_clock() which has a different behavior.
*
* Unlike gst_element_get_clock(), this function will always return a
* clock, even if the pipeline is not in the PLAYING state.
*
* Returns: (transfer full): a #GstClock, unref after usage.
*/
GstClock *
gst_pipeline_get_clock (GstPipeline * pipeline)
{
return gst_pipeline_get_pipeline_clock (pipeline);
}
/**
* gst_pipeline_get_pipeline_clock:
* @pipeline: a #GstPipeline
*
* Gets the current clock used by @pipeline.
*
* Unlike gst_element_get_clock(), this function will always return a
* clock, even if the pipeline is not in the PLAYING state.
*
* Returns: (transfer full): a #GstClock, unref after usage.
*
* Since: 1.6
*/
GstClock *
gst_pipeline_get_pipeline_clock (GstPipeline * pipeline)
{
g_return_val_if_fail (GST_IS_PIPELINE (pipeline), NULL);
@ -677,7 +701,7 @@ gst_pipeline_use_clock (GstPipeline * pipeline, GstClock * clock)
}
/**
* gst_pipeline_set_clock:
* gst_pipeline_set_clock: (skip)
* @pipeline: a #GstPipeline
* @clock: (transfer none): the clock to set
*

View file

@ -96,6 +96,7 @@ GstBus* gst_pipeline_get_bus (GstPipeline *pipeline);
void gst_pipeline_use_clock (GstPipeline *pipeline, GstClock *clock);
gboolean gst_pipeline_set_clock (GstPipeline *pipeline, GstClock *clock);
GstClock* gst_pipeline_get_clock (GstPipeline *pipeline);
GstClock* gst_pipeline_get_pipeline_clock (GstPipeline *pipeline);
void gst_pipeline_auto_clock (GstPipeline *pipeline);
void gst_pipeline_set_delay (GstPipeline *pipeline, GstClockTime delay);