[Bug 787683] alsamidisrc behavior with non-live sinks

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Sep 27 12:56:47 UTC 2017


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

--- Comment #4 from Nicolas Dufresne (stormer) <nicolas at ndufresne.ca> ---
(In reply to Antonio Ospite from comment #3)

> I still have some doubts tho:
> 
>   - I am not sure how and where to correlate the timestamps from the ALSA
>     sequencer queue with the GStreamer element running time.

We need to read the API but normally drivers will translate their timestamp to
some known clock, like monotonic clock. When this is the case, you simply read
that clock, then read GST clock, substract these, that gives you the delta
between the two clocks. You then add this delta to the event timestamp to get a
time in GST clock, substract GST element base_time and that's your ts.

If you don't know the clock, then the Alsa driven tick comes handy. You then
subclass GstClock around your tick counter. Then you provide that clock, or
slave it. Your time stamps becomes the tick counter converted to nanosecond.

> 
>   - Should I handle the PAUSED state? Is it a valid state for live elements?

Live source don't produce data in paused state. Events are lost in that state.
If midi is state less, there nothing to do. Just set GstBaseSrc to live.

> 
> Ciao ciao,
>    Antonio

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