gst-libs/gst/audio/gstbaseaudiosink.c: Revert previous patch that attempted to more accurately calculate the initial ...

Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_render), (gst_base_audio_sink_async_play):
Revert previous patch that attempted to more accurately calculate the
initial offset between master and slave clock. The best thing we can do
in general is take the time of both clocks as the diff since we don't
know when the actual preroll happened.
This commit is contained in:
Wim Taymans 2008-05-12 08:45:11 +00:00
parent 1482332184
commit 0c9b13988c
2 changed files with 13 additions and 10 deletions

View file

@ -1,3 +1,12 @@
2008-05-12 Wim Taymans <wim.taymans@collabora.co.uk>
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_render), (gst_base_audio_sink_async_play):
Revert previous patch that attempted to more accurately calculate the
initial offset between master and slave clock. The best thing we can do
in general is take the time of both clocks as the diff since we don't
know when the actual preroll happened.
2008-05-11 Tim-Philipp Müller <tim.muller at collabora co uk> 2008-05-11 Tim-Philipp Müller <tim.muller at collabora co uk>
* gst-libs/gst/pbutils/install-plugins.c: * gst-libs/gst/pbutils/install-plugins.c:

View file

@ -1419,21 +1419,15 @@ gst_base_audio_sink_async_play (GstBaseSink * basesink)
/* if we are slaved to a clock, we need to set the initial /* if we are slaved to a clock, we need to set the initial
* calibration */ * calibration */
/* get external and internal time to set as calibration params */
etime = GST_ELEMENT_CAST (sink)->base_time;
itime = gst_base_audio_sink_get_time (sink->provided_clock, sink);
switch (sink->priv->slave_method) { switch (sink->priv->slave_method) {
case GST_BASE_AUDIO_SINK_SLAVE_SKEW: case GST_BASE_AUDIO_SINK_SLAVE_SKEW:
case GST_BASE_AUDIO_SINK_SLAVE_RESAMPLE: case GST_BASE_AUDIO_SINK_SLAVE_RESAMPLE:
/* adjust with upstream latency, when we are prerolled, our internal clock
* should exactly have been the time of the upstream latency */
etime += sink->priv->us_latency;
break;
case GST_BASE_AUDIO_SINK_SLAVE_NONE: case GST_BASE_AUDIO_SINK_SLAVE_NONE:
/* no slaving, base_time corresponds to our 0 time */
itime = 0;
default: default:
/* When we are prerolled, our internal clock should exactly have been the time
* of the external clock */
etime = gst_clock_get_time (clock);
itime = gst_base_audio_sink_get_time (sink->provided_clock, sink);
break; break;
} }
GST_DEBUG_OBJECT (sink, GST_DEBUG_OBJECT (sink,