[Bug 692953] alsasink does not synchronise properly with a live streaming source, yet (timing skew)

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed May 14 03:24:59 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=692953
  GStreamer | gst-plugins-base | 1.0.10

--- Comment #199 from Tom Deseyn <tom.deseyn at gmail.com> 2014-05-14 10:24:49 UTC ---
Update:

I looked at this further and I think this is what happens:
* The audio source provides the pipeline clock, but it does not take into
account buffer underruns (gst_audio_base_src_get_time).
* The audio sink relates it's time with the pipeline time but only allows that
the time of the sink is later than that of the
pipeline.(gst_audio_base_sink_skew_slaving). However after enough buffer
underruns from the source, the pipeline time will be less than the sink time...

When setting provide-clock to false on the alsasrc, I did not encounter the
issue.

To debug this I have been using:
GST_DEBUG=audiosrc:6,audiosink:6,alsa:5,ringbuffer:5,audiobasesrc:6,audiobasesink:5
I added a sleep in the gst_alsasrc_read to occasionally generate buffer
underruns.

After a while the audiobasesink DEBUG logging looks like this:
   0x80cc0 DEBUG          audiobasesink
gstaudiobasesink.c:1256:gst_audio_base_sink_skew_slaving:<alsasink0> internal
0:00:01.085532879 external 0:00:00.605102040 cinternal 0:00:00.000000000
cexternal 0:00:00.000000000
0:00:01.262867407  9974    0x80cc0 DEBUG          audiobasesink
gstaudiobasesink.c:1276:gst_audio_base_sink_skew_slaving:<alsasink0> internal
0:00:01.085532879 external 0:00:00.605102040 skew 480430839 avg 577713
0:00:01.263301518  9974    0x80cc0 DEBUG          audiobasesink
gstaudiobasesink.c:1819:gst_audio_base_sink_render:<alsasink0> final
timestamps: start 0:00:00.801088434 - stop 0:00:00.812698411

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list