Audio backend configuration and probes
Uli Franke
uli.franke at weiss.ch
Tue Feb 9 16:07:29 UTC 2016
Hi everyone,
I have an event probe on an ALSA audio sink's sink pad to catch
downstream caps events and perform hardware reconfiguration based on
that. I block within the caps probe until the HW is reconfigured and
it's safe to open the ALSA device. But according to the documentation
[1] this is not a good idea (even though I had no crashes or other
problems up to now).
Therefore I'm curious how you guys would approach such a task.
The thing is that I'd like to stay within the application because the
hardware setup is controlled from it as well.
Thanks a lot!
Regards
Uli
____
[1]
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-dataaccess.html
"Data probes run in pipeline streaming thread context, so callbacks
should try to not block and generally not do any weird stuff, since this
could have a negative impact on pipeline performance or, in case of
bugs, cause deadlocks or crashes. More precisely, one should usually not
call any GUI-related functions from within a probe callback, nor try to
change the state of the pipeline. An application may post custom
messages on the pipeline's bus though to communicate with the main
application thread and have it do things like stop the pipeline."
More information about the gstreamer-devel
mailing list