[vlc-devel] [vlc-commits] aout: export used module internal name

Thomas Guillem thomas at gllm.fr
Fri Mar 23 09:21:35 CET 2018

On Fri, Mar 23, 2018, at 07:58, Rémi Denis-Courmont wrote:
> Le jeudi 22 mars 2018, 10:47:04 EET Thomas Guillem a écrit :
> > vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Mar 20 16:01:03
> > 2018 +0100| [3aa4fda0d0742c7a68b57600c8bec311b3078d72] | committer: Thomas
> > Guillem
> > 
> > aout: export used module internal name
> > 
> > This can be used by intf modules in order to show different settings
> > depending on audio modules.
> This looks like duplicated existing get_name functionality albeit less generic 
> but still identically flawed. get_name is only used for display/debugging for 
> a reason: it is intrisincally racy and unreliable.


This patch doesn't use module_get_name(), but module_get_object(). This function is quite used by QT for preferences.

The audio_output_t struct doesn't expose the module (that is a good design for me). But we really need a way to get the current module that is used.

It's way more reliable that using the configuration, specially since it'll be likely be "any" (automatic). In that case, we can only do a wild guess that the aout will be mmdevice (only if the probe doesn't fail).

Could you explain why it is racy ? The module is constant in the aout object lifetime. So, if QT has a reference on a aout, its module won't change.

> Please revert.

I would love to discuss it before

> -- 
> Rémi Denis-Courmont
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

More information about the vlc-devel mailing list