VLC  4.0.0-dev
Data Structures | Typedefs | Enumerations | Functions
Collaboration diagram for Metadata callbacks:

Data Structures

union  vlc_player_metadata_cbs
 Player metadata callbacks. More...
 

Typedefs

typedef struct vlc_player_metadata_listener_id vlc_player_metadata_listener_id
 Player metadata listener opaque structure. More...
 

Enumerations

enum  vlc_player_metadata_option { VLC_PLAYER_METADATA_LOUDNESS_MOMENTARY , VLC_PLAYER_METADATA_LOUDNESS_FULL }
 Player metadata option. More...
 

Functions

vlc_player_metadata_listener_idvlc_player_AddMetadataListener (vlc_player_t *player, enum vlc_player_metadata_option option, const union vlc_player_metadata_cbs *cbs, void *cbs_data)
 Add a metadata listener. More...
 
void vlc_player_RemoveMetadataListener (vlc_player_t *player, vlc_player_metadata_listener_id *listener_id)
 Remove a metadata listener. More...
 

Detailed Description

Typedef Documentation

◆ vlc_player_metadata_listener_id

Player metadata listener opaque structure.

This opaque structure is returned by vlc_player_AddMetadataListener() and can be used to remove the listener via vlc_player_RemoveMetadataListener().

Enumeration Type Documentation

◆ vlc_player_metadata_option

Player metadata option.

Enumerator
VLC_PLAYER_METADATA_LOUDNESS_MOMENTARY 

Ask for momentary loudness measurement.

Very low CPU usage.

See also
vlc_player_metadata_cbs.on_momentary_loudness_changed
VLC_PLAYER_METADATA_LOUDNESS_FULL 

Ask for all loudness measurements.

High CPU usage.

See also
vlc_player_metadata_cbs.on_loudness_changed

Function Documentation

◆ vlc_player_AddMetadataListener()

vlc_player_metadata_listener_id* vlc_player_AddMetadataListener ( vlc_player_t player,
enum vlc_player_metadata_option  option,
const union vlc_player_metadata_cbs cbs,
void *  cbs_data 
)

Add a metadata listener.

Note
Every registered loudness meter need to be removed by the caller with vlc_player_RemoveMetadataListener().
Parameters
playerlocked player instance
cbspointer to a vlc_player_metadata_cbs union, the structure must be valid during the lifetime of the player
cbs_dataopaque pointer used by the callbacks
Returns
a valid listener id, or NULL in case of error (plugin missing)

References vlc_audio_meter_plugin_owner::cbs, vlc_player_metadata_listener_id::cbs, vlc_player_metadata_listener_id::cbs_data, vlc_player_t::metadata_listeners, vlc_player_t::metadata_listeners_lock, vlc_player_metadata_listener_id::node, vlc_player_metadata_listener_id::option, vlc_assert_unreachable, VLC_EGENERIC, vlc_list_append(), vlc_mutex_lock(), vlc_mutex_unlock(), vlc_player_AddMetadataLoudnessListener(), vlc_player_assert_locked(), VLC_PLAYER_METADATA_LOUDNESS_FULL, and VLC_PLAYER_METADATA_LOUDNESS_MOMENTARY.

◆ vlc_player_RemoveMetadataListener()

void vlc_player_RemoveMetadataListener ( vlc_player_t player,
vlc_player_metadata_listener_id listener_id 
)