VLC 4.0.0-dev
No Matches
Collaboration diagram for Player instance:


typedef struct vlc_player_t vlc_player_t
 Player opaque structure.


 Player lock type (normal or reentrant) More...


vlc_player_tvlc_player_New (vlc_object_t *parent, enum vlc_player_lock_type lock_type)
 Create a new player instance.
void vlc_player_Delete (vlc_player_t *player)
 Delete a player instance.
void vlc_player_Lock (vlc_player_t *player)
 Lock the player.
void vlc_player_Unlock (vlc_player_t *player)
 Unlock the player.
void vlc_player_CondWait (vlc_player_t *player, vlc_cond_t *cond)
 Wait on a condition variable.
void vlc_player_SetStartPaused (vlc_player_t *player, bool start_paused)
 Ask to start in a paused state.
void vlc_player_SetPauseOnCork (vlc_player_t *player, bool enabled)
 Enable or disable pause on cork event.

Detailed Description

Typedef Documentation

◆ vlc_player_t

typedef struct vlc_player_t vlc_player_t

Player opaque structure.

Enumeration Type Documentation

◆ vlc_player_lock_type

Player lock type (normal or reentrant)


Normal lock.

If the player is already locked, subsequent calls to vlc_player_Lock() will deadlock.


Reentrant lock.

If the player is already locked, subsequent calls to vlc_player_Lock() will still succeed. To unlock the player, one call to vlc_player_Unlock() per vlc_player_Lock() is necessary.

Function Documentation

◆ vlc_player_CondWait()

void vlc_player_CondWait ( vlc_player_t player,
vlc_cond_t cond 

Wait on a condition variable.

This call allow users to use their own condition with the player mutex.

playerlocked player instance
condexternal condition

References vlc_player_t::lock, vlc_player_input::player, vlc_cond_wait(), and vlc_player_assert_locked().

◆ vlc_player_Delete()

◆ vlc_player_Lock()

◆ vlc_player_New()

vlc_player_t * vlc_player_New ( vlc_object_t parent,
enum vlc_player_lock_type  lock_type 

Create a new player instance.

parentparent VLC object
lock_typewhether the player lock is reentrant or not
media_providerpointer to a media_provider structure or NULL, the structure must be valid during the lifetime of the player
media_provider_dataopaque data used by provider callbacks
a pointer to a valid player instance or NULL in case of error

References vlc_player_t::aout_listeners, vlc_player_t::audio_string_ids, vlc_player_t::corked, vlc_player_t::deleting, vlc_player_t::destructor, vlc_player_t::eos_burst_count, vlc_player_input::error, vlc_player_t::global_state, vlc_player_t::input, input_resource_New(), input_resource_Release(), vlc_player_t::inputs, vlc_player_t::joinable_inputs, vlc_player_t::last_eos, likely, vlc_player_t::listeners, vlc_player_t::media, vlc_player_t::metadata_listeners, vlc_player_t::next_media, vlc_value_t::p_address, vlc_player_t::pause_on_cork, vlc_player_input::player, vlc_player_t::releasing_media, vlc_player_t::renderer, vlc_player_t::resource, vlc_player_t::start_paused, vlc_player_t::started, vlc_player_t::stopping_inputs, vlc_player_t::sub_string_ids, vlc_player_t::thread, var_AddCallback(), VAR_CREATE, var_DelCallback(), var_SetChecked(), vlc_player_t::video_string_ids, vlc_clone(), vlc_custom_create, vlc_http_cookies_new(), vlc_list_init(), VLC_OBJECT, vlc_object_delete, vlc_player_aout_Deinit(), vlc_player_aout_Init(), vlc_player_CorkCallback(), vlc_player_DestroyTimer(), vlc_player_destructor_Thread(), vlc_player_InitLocks(), vlc_player_InitTimer(), VLC_PLAYER_STATE_STOPPED, VLC_TICK_INVALID, VLC_VAR_ADDRESS, VLC_VAR_BOOL, VLC_VAR_DOINHERIT, VLC_VAR_FLOAT, VLC_VAR_INTEGER, VLC_VAR_STRING, and vlc_player_t::vout_listeners.

Referenced by vlc_playlist_PlayerInit(), and vlm_MediaInstanceNew().

◆ vlc_player_SetPauseOnCork()

void vlc_player_SetPauseOnCork ( vlc_player_t player,
bool  enabled 

Enable or disable pause on cork event.

If enabled, the player will automatically pause and resume on cork events. In that case, cork events won't be propagated via callbacks.

See also
playerlocked player instance
enabledtrue to enable

References vlc_player_t::pause_on_cork, vlc_player_input::player, and vlc_player_assert_locked().

Referenced by PlaylistConfigureFromVariables().

◆ vlc_player_SetStartPaused()

void vlc_player_SetStartPaused ( vlc_player_t player,
bool  start_paused 

Ask to start in a paused state.

This function can be used before vlc_player_Start()

playerlocked player instance
start_pausedtrue to start in a paused state, false to cancel it

References vlc_player_input::player, vlc_player_t::start_paused, and vlc_player_assert_locked().

Referenced by PlaylistConfigureFromVariables().

◆ vlc_player_Unlock()