vlc_extensions: add player reference

The player will be used by the extensions to listen to events, like the
media changed for input-listener capabilities or meta changed for
meta-listener capabilities.

In the previous design for the vlc_extensions, the whole extension
system was setup by the UI, and since the UI were subscribing to
playlist events signalling that the input item changed, the UI was
forwarding those calls to the extension subsystem. However, there is now
the unified interface to control or listen to the playback, ie. the
vlc_player, which can better fit this goal.

It allows to split this need from the question of where the
vlc_extensions are initialized.
This commit is contained in:
Alexandre Janniaux 2023-01-27 21:44:22 +01:00 committed by Jean-Baptiste Kempf
parent 2668c39911
commit 8bb7a418b9

View File

@ -29,6 +29,7 @@
/* Structures */
typedef struct extensions_manager_sys_t extensions_manager_sys_t;
typedef struct extensions_manager_t extensions_manager_t;
struct vlc_player_t;
struct vlc_logger;
/** Extension descriptor: name, title, author, ... */
@ -60,6 +61,7 @@ struct extensions_manager_t
module_t *p_module; /**< Extensions manager module */
void *p_sys; /**< Reserved for the module */
struct vlc_player_t *player;
DECL_ARRAY(extension_t*) extensions; /**< Array of extension descriptors */
vlc_mutex_t lock; /**< A lock for the extensions array */