Audio backend configuration and probes

Nicolas Dufresne nicolas.dufresne at collabora.com
Tue Feb 9 19:14:05 UTC 2016


Le mardi 09 février 2016 à 17:07 +0100, Uli Franke a écrit :
> 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.

I would recommend to create a sub-class of GstBin, that will shadow
(using ghostpad) the internal alsasink. This way, you can better handle
"closing" the device. For the asynchonous aspect, you can use a
blocking pad probe instead, and unblock that when your setup is done.
This way to avoid all risky deadlock around it.

Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160209/d0a05b17/attachment.sig>


More information about the gstreamer-devel mailing list