[Bug 787683] alsamidisrc behavior with non-live sinks

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Oct 3 16:53:40 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=787683

--- Comment #5 from Antonio Ospite <ao2 at ao2.it> ---
Created attachment 360846
  --> https://bugzilla.gnome.org/attachment.cgi?id=360846&action=edit
Improved event timestamping

To recap, the ALSA sequencer can timestamp events either with a tick count or
with some real-time information relative to when the sequencer queue timer was
started.

I decided to use the real-time option to avoid conversions based on the tempo
and the beats-per-quarter-notes.

Letting the sequencer schedule the tick events makes the change a lot less
invasive than having to wait and fire events explicitly in the GStreamer
element.

I prototyped a patch in gst-aseq-appsrc[1] and it seems to work quite well, see
the attached image: the "after" graph shows the new, saner, behavior.

The tick event must still be handled explicitly because unfortunately alsa-lib
does not support decoding it.

Currently[2] I am calculating the difference between the GStreamer time and the
sequencer time, using the suggested formula, at the transition to the PLAYING
state and then I apply the delay for each event as they come.

Patches to alsamidisrc are coming in the next days.

Ciao,
   Antonio

[1]
https://git.ao2.it/gst-aseq-appsrc.git/commitdiff/d49c7665151703d8074a07d2d1834e904ec85758
[2]
https://git.ao2.it/gst-aseq-appsrc.git/blob/d49c7665151703d8074a07d2d1834e904ec85758:/gst-aseq-appsrc.c#l376

-- 
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