* @pipeline: a #GstPipeline
* @time: the new running time to set
*
- * Note, the name of this function is wrong, it should be
- * gst_pipeline_set_new_running_time(), this function does not change the stream
- * time of the pipeline elements but the running time.
- *
- * Set the new running time of @pipeline to @time. The running time is used to
+ * Set the new start time of @pipeline to @time. The start time is used to
* set the base time on the elements (see gst_element_set_base_time())
* in the PAUSED->PLAYING state transition.
*
* pipelines have the same clock.
*
* MT safe.
+ *
+ * Deprecated: This function has the wrong name and is equivalent to
+ * gst_element_set_start_time().
*/
+#ifndef GST_REMOVE_DEPRECATED
void
gst_pipeline_set_new_stream_time (GstPipeline * pipeline, GstClockTime time)
{
g_return_if_fail (GST_IS_PIPELINE (pipeline));
- GST_OBJECT_LOCK (pipeline);
- GST_ELEMENT_START_TIME (pipeline) = time;
- GST_OBJECT_UNLOCK (pipeline);
-
- GST_DEBUG_OBJECT (pipeline, "set new stream_time to %" GST_TIME_FORMAT,
- GST_TIME_ARGS (time));
+ gst_element_set_start_time (GST_ELEMENT_CAST (pipeline), time);
if (time == GST_CLOCK_TIME_NONE)
GST_DEBUG_OBJECT (pipeline, "told not to adjust base_time");
}
+#endif /* GST_REMOVE_DEPRECATED */
/**
* gst_pipeline_get_last_stream_time:
* @pipeline: a #GstPipeline
*
- * Note, the name of this function is wrong, it should be
- * gst_pipeline_get_last_running_time().
- *
* Gets the last running time of @pipeline. If the pipeline is PLAYING,
* the returned time is the running time used to configure the element's
* base time in the PAUSED->PLAYING state. If the pipeline is PAUSED, the
* configured to not handle the management of the element's base time
* (see gst_pipeline_set_new_stream_time()).
*
+ * MT safe.
+ *
* Returns: a #GstClockTime.
*
- * MT safe.
+ * Deprecated: This function has the wrong name and is equivalent to
+ * gst_element_get_start_time().
*/
+#ifndef GST_REMOVE_DEPRECATED
GstClockTime
gst_pipeline_get_last_stream_time (GstPipeline * pipeline)
{
g_return_val_if_fail (GST_IS_PIPELINE (pipeline), GST_CLOCK_TIME_NONE);
- GST_OBJECT_LOCK (pipeline);
- result = GST_ELEMENT_START_TIME (pipeline);
- GST_OBJECT_UNLOCK (pipeline);
+ result = gst_element_get_start_time (GST_ELEMENT_CAST (pipeline));
return result;
}
+#endif /* GST_REMOVE_DEPRECATED */
static GstClock *
gst_pipeline_provide_clock_func (GstElement * element)
fail_unless (clock && GST_IS_CLOCK (clock), "i want a clock dammit");
gst_pipeline_use_clock (GST_PIPELINE (pipeline), clock);
- fail_unless (gst_pipeline_get_last_stream_time (GST_PIPELINE (pipeline)) == 0,
+ fail_unless (gst_element_get_start_time (pipeline) == 0,
"stream time doesn't start off at 0");
probe_lock = g_mutex_new ();
fail_unless (upper >= base, "bogus base time: %" GST_TIME_FORMAT " > %"
GST_TIME_FORMAT, GST_TIME_ARGS (base), GST_TIME_ARGS (upper));
- stream = gst_pipeline_get_last_stream_time (GST_PIPELINE (pipeline));
+ stream = gst_element_get_start_time (pipeline);
fail_unless (stream > 0, "bogus new stream time: %" GST_TIME_FORMAT " > %"
GST_TIME_FORMAT, GST_TIME_ARGS (stream), GST_TIME_ARGS (0));
fail_if (observed == GST_CLOCK_TIME_NONE, "no timestamp recorded");
- stream = gst_pipeline_get_last_stream_time (GST_PIPELINE (pipeline));
+ stream = gst_element_get_start_time (pipeline);
fail_unless (base >= oldbase + WAIT_TIME, "base time not reset");
fail_unless (upper >= base + stream, "bogus base time: %"
fail_unless (lower >= upper + WAIT_TIME, "clock did not advance?");
/* bling */
- gst_pipeline_set_new_stream_time (GST_PIPELINE (pipeline),
- GST_CLOCK_TIME_NONE);
+ gst_element_set_start_time (pipeline, GST_CLOCK_TIME_NONE);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
fail_unless (gst_element_get_state (pipeline, NULL, NULL,
fail_if (observed == GST_CLOCK_TIME_NONE, "no timestamp recorded");
- fail_unless (gst_pipeline_get_last_stream_time (GST_PIPELINE (pipeline))
+ fail_unless (gst_element_get_start_time (pipeline)
== GST_CLOCK_TIME_NONE, "stream time was reset");
fail_unless (base == oldbase, "base time was reset");