Skip to content

[3.0] vlc_modules: add an API to get the shortcut to use with a module

Steve Lhomme requested to merge robUx4/vlc:30-module-shortcut into 3.0.x

3.0 version of !5671 to fix #28691

The review should be done on this branch as depending on what is possible for 3.0 we will do it on 4.0 (or not). In particular I'm not sure we can add an API entry to libvlccore in VLC 3. Or maybe I'm doing it wrong.


A plugin may contain multiple modules. They all have the same first shortcut which is the VLC_MODULE_NAME [1]. Then if there's a shortcut (or more) it's further in the list.

module_get_object() cannot differentiate between the modules inside a plugin. It should keep returning the name of the VLC_MODULE_NAME. But we need another API to get the proper shortcut to use.

[1] https://code.videolan.org/videolan/vlc/-/blob/2c6d9de9f66aefb639ac8f00af7b030760cce294/src/modules/entry.c#L292

Plus a small backport to remove a warning during build.

Merge request reports

Loading