VLC 4.0.0-dev
Collaboration diagram for Video output control:

Data Structures

struct  vlc_player_vout_cbs
 Player vout callbacks. More...
 

Typedefs

typedef struct vlc_player_vout_listener_id vlc_player_vout_listener_id
 Player vout listener opaque structure. More...
 

Enumerations

enum  vlc_player_vout_action { VLC_PLAYER_VOUT_STARTED , VLC_PLAYER_VOUT_STOPPED }
 action of vlc_player_cbs.on_vout_changed callback More...
 

Functions

vout_thread_tvlc_player_vout_Hold (vlc_player_t *player)
 Get and hold the main video output. More...
 
vout_thread_t ** vlc_player_vout_HoldAll (vlc_player_t *player, size_t *count)
 Get and hold the list of video output. More...
 
vlc_player_vout_listener_idvlc_player_vout_AddListener (vlc_player_t *player, const struct vlc_player_vout_cbs *cbs, void *cbs_data)
 Add a listener callback for video output events. More...
 
void vlc_player_vout_RemoveListener (vlc_player_t *player, vlc_player_vout_listener_id *listener_id)
 Remove a vout listener callback. More...
 
bool vlc_player_vout_IsFullscreen (vlc_player_t *player)
 Check if the player is fullscreen. More...
 
void vlc_player_vout_SetFullscreen (vlc_player_t *player, bool enabled)
 Enable or disable the player fullscreen state. More...
 
static void vlc_player_vout_ToggleFullscreen (vlc_player_t *player)
 Helper to toggle the player fullscreen state. More...
 
bool vlc_player_vout_IsWallpaperModeEnabled (vlc_player_t *player)
 Check if the player has wallpaper-mode enaled. More...
 
void vlc_player_vout_SetWallpaperModeEnabled (vlc_player_t *player, bool enabled)
 Enable or disable the player wallpaper-mode. More...
 
static void vlc_player_vout_ToggleWallpaperMode (vlc_player_t *player)
 Helper to toggle the player wallpaper-mode state. More...
 
void vlc_player_vout_Snapshot (vlc_player_t *player)
 Take a snapshot on all vouts. More...
 
void vlc_player_osd_Message (vlc_player_t *player, const char *fmt,...)
 Display an OSD message on all vouts. More...
 

Detailed Description

Typedef Documentation

◆ vlc_player_vout_listener_id

Player vout listener opaque structure.

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

Enumeration Type Documentation

◆ vlc_player_vout_action

action of vlc_player_cbs.on_vout_changed callback

Enumerator
VLC_PLAYER_VOUT_STARTED 
VLC_PLAYER_VOUT_STOPPED 

Function Documentation

◆ vlc_player_osd_Message()

◆ vlc_player_vout_AddListener()

vlc_player_vout_listener_id * vlc_player_vout_AddListener ( vlc_player_t player,
const struct vlc_player_vout_cbs cbs,
void *  cbs_data 
)

Add a listener callback for video output events.

Note
The player instance doesn't need to be locked for vlc_player_vout_*() functions.
Every registered callbacks need to be removed by the caller with vlc_player_vout_RemoveListener().
Parameters
playerplayer instance
cbspointer to a vlc_player_vout_cbs structure, 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 allocation error

References vlc_player_vout_listener_id::cbs, vlc_player_vout_listener_id::cbs_data, vlc_player_vout_listener_id::node, vlc_list_append(), vlc_mutex_lock(), vlc_mutex_unlock(), vlc_player_t::vout_listeners, and vlc_player_t::vout_listeners_lock.

◆ vlc_player_vout_Hold()

vout_thread_t * vlc_player_vout_Hold ( vlc_player_t player)

Get and hold the main video output.

Warning
the returned vout_thread_t * must be released with vout_Release().
See also
vlc_players_cbs.on_vout_changed
Note
The player is guaranteed to always hold one valid vout. Only vout variables can be changed from this instance. The vout returned before playback is not necessarily the same one that will be used for playback.
Parameters
playerplayer instance
Returns
a valid vout_thread_t * or NULL, cf. warning

References input_resource_HoldDummyVout(), input_resource_HoldVout(), and vlc_player_t::resource.

Referenced by vlc_player_input_RestoreMlStates(), vlc_player_vout_IsFullscreen(), vlc_player_vout_IsWallpaperModeEnabled(), and vlc_player_vout_SetVar().

◆ vlc_player_vout_HoldAll()

vout_thread_t ** vlc_player_vout_HoldAll ( vlc_player_t player,
size_t *  count 
)

Get and hold the list of video output.

Warning
All vout_thread_t * element of the array must be released with vout_Release(). The returned array must be freed.
See also
vlc_players_cbs.on_vout_changed
Parameters
playerplayer instance
countvalid pointer to store the array count
Returns
a array of vout_thread_t * or NULL, cf. warning

References count, input_resource_HoldDummyVout(), input_resource_HoldVouts(), vlc_player_t::resource, and vlc_alloc().

◆ vlc_player_vout_IsFullscreen()

bool vlc_player_vout_IsFullscreen ( vlc_player_t player)

Check if the player is fullscreen.

Warning
The fullscreen state of the player and all vouts can be different.
Note
The player instance doesn't need to be locked for vlc_player_vout_*() functions.
See also
vlc_player_vout_cbs.on_fullscreen_changed
Parameters
playerplayer instance
Returns
true if the player is fullscreen

References var_GetBool(), vlc_player_vout_Hold(), and vout_Release().

Referenced by vlc_player_osd_Position(), vlc_player_osd_Volume(), and vlc_player_vout_ToggleFullscreen().

◆ vlc_player_vout_IsWallpaperModeEnabled()

bool vlc_player_vout_IsWallpaperModeEnabled ( vlc_player_t player)

Check if the player has wallpaper-mode enaled.

Warning
The wallpaper-mode state of the player and all vouts can be different.
Note
The player instance doesn't need to be locked for vlc_player_vout_*() functions.
See also
vlc_player_vout_cbs.on_wallpaper_mode_changed
Parameters
playerplayer instance
Returns
true if the player is fullscreen

References var_GetBool(), vlc_player_vout_Hold(), and vout_Release().

Referenced by vlc_player_vout_ToggleWallpaperMode().

◆ vlc_player_vout_RemoveListener()

void vlc_player_vout_RemoveListener ( vlc_player_t player,
vlc_player_vout_listener_id listener_id 
)

Remove a vout listener callback.

Parameters
playerplayer instance
listener_idlistener id returned by vlc_player_vout_AddListener()

References vlc_player_vout_listener_id::node, vlc_list_remove(), vlc_mutex_lock(), vlc_mutex_unlock(), and vlc_player_t::vout_listeners_lock.

◆ vlc_player_vout_SetFullscreen()

void vlc_player_vout_SetFullscreen ( vlc_player_t player,
bool  enabled 
)

Enable or disable the player fullscreen state.

This will have an effect on all current and future vouts.

Note
The player instance doesn't need to be locked for vlc_player_vout_*() functions.
A successful call will trigger the vlc_player_vout_cbs.on_fullscreen_changed event.
Parameters
playerplayer instance
enabledtrue to enable fullscreen

References vlc_player_vout_SendEvent, vlc_player_vout_SetVar(), and VLC_VAR_BOOL.

Referenced by vlc_player_vout_ToggleFullscreen().

◆ vlc_player_vout_SetWallpaperModeEnabled()

void vlc_player_vout_SetWallpaperModeEnabled ( vlc_player_t player,
bool  enabled 
)

Enable or disable the player wallpaper-mode.

This will have an effect on all current and future vouts.

Note
The player instance doesn't need to be locked for vlc_player_vout_*() functions.
A successful call will trigger the vlc_player_vout_cbs.on_wallpaper_mode_changed event.
Parameters
playerplayer instance
enabledtrue to enable wallpaper-mode

References vlc_player_vout_SendEvent, vlc_player_vout_SetVar(), and VLC_VAR_BOOL.

Referenced by vlc_player_vout_ToggleWallpaperMode().

◆ vlc_player_vout_Snapshot()

void vlc_player_vout_Snapshot ( vlc_player_t player)

Take a snapshot on all vouts.

Parameters
playerplayer instance

References vlc_player_vout_TriggerOption().

◆ vlc_player_vout_ToggleFullscreen()

static void vlc_player_vout_ToggleFullscreen ( vlc_player_t player)
inlinestatic

Helper to toggle the player fullscreen state.

References vlc_player_vout_IsFullscreen(), and vlc_player_vout_SetFullscreen().

◆ vlc_player_vout_ToggleWallpaperMode()

static void vlc_player_vout_ToggleWallpaperMode ( vlc_player_t player)
inlinestatic

Helper to toggle the player wallpaper-mode state.

References vlc_player_vout_IsWallpaperModeEnabled(), and vlc_player_vout_SetWallpaperModeEnabled().