mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
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:
parent
1482332184
commit
0c9b13988c
2 changed files with 13 additions and 10 deletions
|
@ -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>
|
||||
|
||||
* gst-libs/gst/pbutils/install-plugins.c:
|
||||
|
|
|
@ -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
|
||||
* 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) {
|
||||
case GST_BASE_AUDIO_SINK_SLAVE_SKEW:
|
||||
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:
|
||||
/* no slaving, base_time corresponds to our 0 time */
|
||||
itime = 0;
|
||||
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;
|
||||
}
|
||||
GST_DEBUG_OBJECT (sink,
|
||||
|
|
Loading…
Reference in a new issue