mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
libs/gst/base/gstbasesink.*: Fix documentation for the wait_clock method, rename basesink -> sink for consistency.
Original commit message from CVS: * libs/gst/base/gstbasesink.c: (gst_base_sink_commit_state), (gst_base_sink_wait_clock): * libs/gst/base/gstbasesink.h: Fix documentation for the wait_clock method, rename basesink -> sink for consistency.
This commit is contained in:
parent
291c2822f8
commit
10f9331125
3 changed files with 25 additions and 16 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2009-01-09 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
|
* libs/gst/base/gstbasesink.c: (gst_base_sink_commit_state),
|
||||||
|
(gst_base_sink_wait_clock):
|
||||||
|
* libs/gst/base/gstbasesink.h:
|
||||||
|
Fix documentation for the wait_clock method, rename basesink -> sink
|
||||||
|
for consistency.
|
||||||
|
|
||||||
2009-01-08 Stefan Kost <ensonic@users.sf.net>
|
2009-01-08 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* gst/gst.c:
|
* gst/gst.c:
|
||||||
|
|
|
@ -1346,6 +1346,7 @@ gst_base_sink_commit_state (GstBaseSink * basesink)
|
||||||
|
|
||||||
/* make sure we notify the subclass of async playing */
|
/* make sure we notify the subclass of async playing */
|
||||||
if (bclass->async_play) {
|
if (bclass->async_play) {
|
||||||
|
GST_WARNING_OBJECT (basesink, "deprecated async_play");
|
||||||
ret = bclass->async_play (basesink);
|
ret = bclass->async_play (basesink);
|
||||||
if (ret == GST_STATE_CHANGE_FAILURE)
|
if (ret == GST_STATE_CHANGE_FAILURE)
|
||||||
goto async_failed;
|
goto async_failed;
|
||||||
|
@ -1644,7 +1645,7 @@ gst_base_sink_adjust_time (GstBaseSink * basesink, GstClockTime time)
|
||||||
* Returns: #GstClockReturn
|
* Returns: #GstClockReturn
|
||||||
*/
|
*/
|
||||||
GstClockReturn
|
GstClockReturn
|
||||||
gst_base_sink_wait_clock (GstBaseSink * basesink, GstClockTime time,
|
gst_base_sink_wait_clock (GstBaseSink * sink, GstClockTime time,
|
||||||
GstClockTimeDiff * jitter)
|
GstClockTimeDiff * jitter)
|
||||||
{
|
{
|
||||||
GstClockID id;
|
GstClockID id;
|
||||||
|
@ -1654,51 +1655,51 @@ gst_base_sink_wait_clock (GstBaseSink * basesink, GstClockTime time,
|
||||||
if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (time)))
|
if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (time)))
|
||||||
goto invalid_time;
|
goto invalid_time;
|
||||||
|
|
||||||
GST_OBJECT_LOCK (basesink);
|
GST_OBJECT_LOCK (sink);
|
||||||
if (G_UNLIKELY (!basesink->sync))
|
if (G_UNLIKELY (!sink->sync))
|
||||||
goto no_sync;
|
goto no_sync;
|
||||||
|
|
||||||
if (G_UNLIKELY ((clock = GST_ELEMENT_CLOCK (basesink)) == NULL))
|
if (G_UNLIKELY ((clock = GST_ELEMENT_CLOCK (sink)) == NULL))
|
||||||
goto no_clock;
|
goto no_clock;
|
||||||
|
|
||||||
/* add base_time to running_time to get the time against the clock */
|
/* add base_time to running_time to get the time against the clock */
|
||||||
time += GST_ELEMENT_CAST (basesink)->base_time;
|
time += GST_ELEMENT_CAST (sink)->base_time;
|
||||||
|
|
||||||
id = gst_clock_new_single_shot_id (clock, time);
|
id = gst_clock_new_single_shot_id (clock, time);
|
||||||
GST_OBJECT_UNLOCK (basesink);
|
GST_OBJECT_UNLOCK (sink);
|
||||||
|
|
||||||
/* A blocking wait is performed on the clock. We save the ClockID
|
/* A blocking wait is performed on the clock. We save the ClockID
|
||||||
* so we can unlock the entry at any time. While we are blocking, we
|
* so we can unlock the entry at any time. While we are blocking, we
|
||||||
* release the PREROLL_LOCK so that other threads can interrupt the
|
* release the PREROLL_LOCK so that other threads can interrupt the
|
||||||
* entry. */
|
* entry. */
|
||||||
basesink->clock_id = id;
|
sink->clock_id = id;
|
||||||
/* release the preroll lock while waiting */
|
/* release the preroll lock while waiting */
|
||||||
GST_PAD_PREROLL_UNLOCK (basesink->sinkpad);
|
GST_PAD_PREROLL_UNLOCK (sink->sinkpad);
|
||||||
|
|
||||||
ret = gst_clock_id_wait (id, jitter);
|
ret = gst_clock_id_wait (id, jitter);
|
||||||
|
|
||||||
GST_PAD_PREROLL_LOCK (basesink->sinkpad);
|
GST_PAD_PREROLL_LOCK (sink->sinkpad);
|
||||||
gst_clock_id_unref (id);
|
gst_clock_id_unref (id);
|
||||||
basesink->clock_id = NULL;
|
sink->clock_id = NULL;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* no syncing needed */
|
/* no syncing needed */
|
||||||
invalid_time:
|
invalid_time:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (basesink, "time not valid, no sync needed");
|
GST_DEBUG_OBJECT (sink, "time not valid, no sync needed");
|
||||||
return GST_CLOCK_BADTIME;
|
return GST_CLOCK_BADTIME;
|
||||||
}
|
}
|
||||||
no_sync:
|
no_sync:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (basesink, "sync disabled");
|
GST_DEBUG_OBJECT (sink, "sync disabled");
|
||||||
GST_OBJECT_UNLOCK (basesink);
|
GST_OBJECT_UNLOCK (sink);
|
||||||
return GST_CLOCK_BADTIME;
|
return GST_CLOCK_BADTIME;
|
||||||
}
|
}
|
||||||
no_clock:
|
no_clock:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (basesink, "no clock, can't sync");
|
GST_DEBUG_OBJECT (sink, "no clock, can't sync");
|
||||||
GST_OBJECT_UNLOCK (basesink);
|
GST_OBJECT_UNLOCK (sink);
|
||||||
return GST_CLOCK_BADTIME;
|
return GST_CLOCK_BADTIME;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -227,7 +227,7 @@ GstClockTime gst_base_sink_get_render_delay (GstBaseSink *sink);
|
||||||
void gst_base_sink_set_blocksize (GstBaseSink *sink, guint blocksize);
|
void gst_base_sink_set_blocksize (GstBaseSink *sink, guint blocksize);
|
||||||
guint gst_base_sink_get_blocksize (GstBaseSink *sink);
|
guint gst_base_sink_get_blocksize (GstBaseSink *sink);
|
||||||
|
|
||||||
GstClockReturn gst_base_sink_wait_clock (GstBaseSink * basesink, GstClockTime time,
|
GstClockReturn gst_base_sink_wait_clock (GstBaseSink *sink, GstClockTime time,
|
||||||
GstClockTimeDiff * jitter);
|
GstClockTimeDiff * jitter);
|
||||||
GstFlowReturn gst_base_sink_wait_eos (GstBaseSink *sink, GstClockTime time,
|
GstFlowReturn gst_base_sink_wait_eos (GstBaseSink *sink, GstClockTime time,
|
||||||
GstClockTimeDiff *jitter);
|
GstClockTimeDiff *jitter);
|
||||||
|
|
Loading…
Reference in a new issue