Threading in callbacks

moritz.vieli moritz.vieli at gmail.com
Sun Dec 30 20:37:22 UTC 2018


Hi there

I set up an app sink for MIDI files to be played in sync with audio files
and it all works fine. However, when I put some CPU load on the system and
add many MIDI files, the following error appears often and audio playback
stutters:
0:00:43.604328917  3140 0x34d6b350 WARN                    alsa
gstalsasink.c:983:xrun_recovery:<sink0> xrun recovery -32: Broken pipe

The problem seems to be the MIDI app sink, or more general, callback
processing from Gstreamer. When I add a level meter and process the produced
messages in my host, the same errors appear.

I am using a Java host and built it exactly on the example from the repo
gstreamer-java. It seems not to be different from the C examples in the
documentation. I also tried wrapping the processing in own threads, added
queues on different places but nothing worked. Somehow it seems like my host
is interrupting the Gstreamer pipe, but I have no idea why and how I could
work around it. A little delay for the processing on my side is no problem,
but audio should not interrupt.

Any help is highly welcome! :)

Best,
Moritz





--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list