VLC 4.0.0-dev
Loading...
Searching...
No Matches
Collaboration diagram for Tracks control:

Data Structures

struct  vlc_player_track
 Player track structure. More...
 

Enumerations

enum  vlc_player_select_policy { VLC_PLAYER_SELECT_EXCLUSIVE , VLC_PLAYER_SELECT_SIMULTANEOUS }
 Player selection policy. More...
 

Functions

struct vlc_player_trackvlc_player_track_Dup (const struct vlc_player_track *track)
 Duplicate a track.
 
void vlc_player_track_Delete (struct vlc_player_track *track)
 Delete a duplicated track.
 
size_t vlc_player_GetTrackCount (vlc_player_t *player, enum es_format_category_e cat)
 Get the number of tracks for an ES category.
 
const struct vlc_player_trackvlc_player_GetTrackAt (vlc_player_t *player, enum es_format_category_e cat, size_t index)
 Get the track at a specific index for an ES category.
 
static size_t vlc_player_GetVideoTrackCount (vlc_player_t *player)
 Helper to get the video track count.
 
static const struct vlc_player_trackvlc_player_GetVideoTrackAt (vlc_player_t *player, size_t index)
 Helper to get a video track at a specific index.
 
static size_t vlc_player_GetAudioTrackCount (vlc_player_t *player)
 Helper to get the audio track count.
 
static const struct vlc_player_trackvlc_player_GetAudioTrackAt (vlc_player_t *player, size_t index)
 Helper to get an audio track at a specific index.
 
static size_t vlc_player_GetSubtitleTrackCount (vlc_player_t *player)
 Helper to get the subtitle track count.
 
static const struct vlc_player_trackvlc_player_GetSubtitleTrackAt (vlc_player_t *player, size_t index)
 Helper to get a subtitle track at a specific index.
 
const struct vlc_player_trackvlc_player_GetTrack (vlc_player_t *player, vlc_es_id_t *es_id)
 Get a track from an ES identifier.
 
vout_thread_tvlc_player_GetEsIdVout (vlc_player_t *player, vlc_es_id_t *es_id, enum vlc_vout_order *order)
 Get and the video output used by a ES identifier.
 
vlc_es_id_tvlc_player_GetEsIdFromVout (vlc_player_t *player, vout_thread_t *vout)
 Get the ES identifier of a video output.
 
static const struct vlc_player_trackvlc_player_GetSelectedTrack (vlc_player_t *player, enum es_format_category_e cat)
 Helper to get the selected track from an ES category.
 
void vlc_player_SelectTracksByStringIds (vlc_player_t *player, enum es_format_category_e cat, const char *str_ids)
 Select tracks by their string identifier.
 
unsigned vlc_player_SelectEsId (vlc_player_t *player, vlc_es_id_t *es_id, enum vlc_player_select_policy policy)
 Select a track from an ES identifier.
 
static unsigned vlc_player_SelectTrack (vlc_player_t *player, const struct vlc_player_track *track, enum vlc_player_select_policy policy)
 Helper to select a track.
 
unsigned vlc_player_SelectEsIdList (vlc_player_t *player, enum es_format_category_e cat, vlc_es_id_t *const es_id_list[])
 Select multiple tracks from a list of ES identifiers.
 
void vlc_player_CycleTrack (vlc_player_t *player, enum es_format_category_e cat, enum vlc_vout_order vout_order, bool next)
 Cycle through the tracks.
 
static void vlc_player_SelectNextTrack (vlc_player_t *player, enum es_format_category_e cat, enum vlc_vout_order vout_order)
 Helper to select the next track.
 
static void vlc_player_SelectPrevTrack (vlc_player_t *player, enum es_format_category_e cat, enum vlc_vout_order vout_order)
 Helper to select the Previous track.
 
void vlc_player_UnselectEsId (vlc_player_t *player, vlc_es_id_t *es_id)
 Unselect a track from an ES identifier.
 
static void vlc_player_UnselectTrack (vlc_player_t *player, const struct vlc_player_track *track)
 Helper to unselect a track.
 
static void vlc_player_UnselectTrackCategory (vlc_player_t *player, enum es_format_category_e cat)
 Helper to unselect all tracks from an ES category.
 
void vlc_player_RestartEsId (vlc_player_t *player, vlc_es_id_t *es_id)
 Restart a track from an ES identifier.
 
static void vlc_player_RestartTrack (vlc_player_t *player, const struct vlc_player_track *track)
 Helper to restart a track.
 
static void vlc_player_RestartTrackCategory (vlc_player_t *player, enum es_format_category_e cat)
 Helper to restart all selected tracks from an ES category.
 
void vlc_player_SelectCategoryLanguage (vlc_player_t *player, enum es_format_category_e cat, const char *lang)
 Select the language for an ES category.
 
char * vlc_player_GetCategoryLanguage (vlc_player_t *player, enum es_format_category_e cat)
 Get the language of an ES category.
 
static void vlc_player_SelectAudioLanguage (vlc_player_t *player, const char *lang)
 Helper to select the audio language.
 
static void vlc_player_SelectSubtitleLanguage (vlc_player_t *player, const char *lang)
 Helper to select the subtitle language.
 
void vlc_player_SetTrackCategoryEnabled (vlc_player_t *player, enum es_format_category_e cat, bool enabled)
 Enable or disable a track category.
 
bool vlc_player_IsTrackCategoryEnabled (vlc_player_t *player, enum es_format_category_e cat)
 Check if a track category is enabled.
 
static void vlc_player_SetVideoEnabled (vlc_player_t *player, bool enabled)
 Helper to enable or disable video tracks.
 
static bool vlc_player_IsVideoEnabled (vlc_player_t *player)
 Helper to check if video tracks are enabled.
 
static void vlc_player_SetAudioEnabled (vlc_player_t *player, bool enabled)
 Helper to enable or disable audio tracks.
 
static bool vlc_player_IsAudioEnabled (vlc_player_t *player)
 Helper to check if audio tracks are enabled.
 
static void vlc_player_SetSubtitleEnabled (vlc_player_t *player, bool enabled)
 Helper to enable or disable subtitle tracks.
 
static bool vlc_player_IsSubtitleEnabled (vlc_player_t *player)
 Helper to check if subtitle tracks are enabled.
 
static void vlc_player_ToggleSubtitle (vlc_player_t *player)
 Helper to toggle subtitles.
 
void vlc_player_SetSubtitleTextScale (vlc_player_t *player, unsigned scale)
 Set the subtitle text scaling factor.
 
unsigned vlc_player_GetSubtitleTextScale (vlc_player_t *player)
 Get the subtitle text scaling factor.
 

Detailed Description

Enumeration Type Documentation

◆ vlc_player_select_policy

Player selection policy.

See also
vlc_player_SelectEsId()
Enumerator
VLC_PLAYER_SELECT_EXCLUSIVE 

Only one track per category is selected.

Selecting a track with this policy will disable all other tracks for the same category.

VLC_PLAYER_SELECT_SIMULTANEOUS 

Select multiple tracks for one category.

Only one audio track can be selected at a time. Two subtitle tracks can be selected simultaneously. Multiple video tracks can be selected simultaneously.

Function Documentation

◆ vlc_player_CycleTrack()

void vlc_player_CycleTrack ( vlc_player_t player,
enum es_format_category_e  cat,
enum vlc_vout_order  vout_order,
bool  next 
)

Cycle through the tracks.

If the last track is already selected, a call to this function will disable this last track. And a second call will select the first track. Unless called on the PRIMARY with a SECONDARY selected, it will cycle through

Parameters
playerlocked player instance
catVIDEO_ES, AUDIO_ES or SPU_ES
nextthe cycle order

References count, vlc_player_track::es_id, vlc_player_input::player, vlc_player_track::selected, vlc_player_GetEsIdVout(), vlc_player_GetTrackAt(), vlc_player_GetTrackCount(), vlc_player_SelectEsIdList(), VLC_VOUT_ORDER_PRIMARY, and VLC_VOUT_ORDER_SECONDARY.

Referenced by vlc_player_SelectNextTrack(), and vlc_player_SelectPrevTrack().

◆ vlc_player_GetAudioTrackAt()

static const struct vlc_player_track * vlc_player_GetAudioTrackAt ( vlc_player_t player,
size_t  index 
)
inlinestatic

Helper to get an audio track at a specific index.

References AUDIO_ES, and vlc_player_GetTrackAt().

◆ vlc_player_GetAudioTrackCount()

static size_t vlc_player_GetAudioTrackCount ( vlc_player_t player)
inlinestatic

Helper to get the audio track count.

References AUDIO_ES, and vlc_player_GetTrackCount().

◆ vlc_player_GetCategoryLanguage()

char * vlc_player_GetCategoryLanguage ( vlc_player_t player,
enum es_format_category_e  cat 
)

Get the language of an ES category.

Warning
This only reflects the change made by vlc_player_SelectCategoryLanguage(). The current playing track doesn't necessarily correspond to the returned language.
See also
vlc_player_SelectCategoryLanguage
Parameters
playerlocked player instance
catAUDIO_ES or SPU_ES
Returns
valid language or NULL, need to be freed

References AUDIO_ES, vlc_player_input::player, SPU_ES, var_GetString(), vlc_assert_unreachable, and vlc_player_assert_locked().

Referenced by vlc_strfplayer().

◆ vlc_player_GetEsIdFromVout()

vlc_es_id_t * vlc_player_GetEsIdFromVout ( vlc_player_t player,
vout_thread_t vout 
)

Get the ES identifier of a video output.

Warning
A same vout can be associated with multiple ES during the lifetime of the player. The information returned by this function becomes invalid when the player is unlocked. The returned es_id doesn't need to be released, but must be held with vlc_es_id_Hold() if it accessed after the player is unlocked.
Parameters
playerlocked player instance
voutvout (can't be NULL)
Returns
a valid ES identifier or NULL (if the vout is stopped)

References ARRAY_SIZE, AUDIO_ES, vlc_player_track_vector::data, vlc_player_track::es_id, vlc_player_input::player, vlc_player_track_vector::size, SPU_ES, vlc_player_track_priv::t, VIDEO_ES, vlc_player_get_input_locked(), vlc_player_input_GetTrackVector(), and vlc_player_track_priv::vout.

◆ vlc_player_GetEsIdVout()

vout_thread_t * vlc_player_GetEsIdVout ( vlc_player_t player,
vlc_es_id_t es_id,
enum vlc_vout_order order 
)

Get and the video output used by a ES identifier.

Warning
A same vout can be associated with multiple ES during the lifetime of the player. The information returned by this function becomes invalid when the player is unlocked. The returned vout doesn't need to be released, but must be held with vout_Hold() if it is accessed after the player is unlocked.
Parameters
playerlocked player instance
es_idan ES ID (retrieved from vlc_player_cbs.on_track_list_changed or vlc_player_GetTrackAt())
orderif not null, the order of the vout
Returns
a valid vout or NULL (if the track is disabled, it it's not a video or spu track, or if the vout failed to start)

References vlc_player_GetPrivTrack(), vlc_player_track_priv::vout, and vlc_player_track_priv::vout_order.

Referenced by vlc_player_CycleTrack(), and vlc_player_UpdateMLStates().

◆ vlc_player_GetSelectedTrack()

static const struct vlc_player_track * vlc_player_GetSelectedTrack ( vlc_player_t player,
enum es_format_category_e  cat 
)
inlinestatic

Helper to get the selected track from an ES category.

Warning
The player can have more than one selected track for a same ES category. This function will only return the first selected one. Use vlc_player_GetTrackAt() and vlc_player_GetTrackCount() to iterate through several selected tracks.

References count, vlc_player_track::selected, vlc_player_GetTrackAt(), and vlc_player_GetTrackCount().

Referenced by vlc_strfplayer().

◆ vlc_player_GetSubtitleTextScale()

unsigned vlc_player_GetSubtitleTextScale ( vlc_player_t player)

Get the subtitle text scaling factor.

Parameters
playerlocked player instance
Returns
scale factor

References vlc_player_input::player, and var_GetInteger().

◆ vlc_player_GetSubtitleTrackAt()

static const struct vlc_player_track * vlc_player_GetSubtitleTrackAt ( vlc_player_t player,
size_t  index 
)
inlinestatic

Helper to get a subtitle track at a specific index.

References SPU_ES, and vlc_player_GetTrackAt().

◆ vlc_player_GetSubtitleTrackCount()

static size_t vlc_player_GetSubtitleTrackCount ( vlc_player_t player)
inlinestatic

Helper to get the subtitle track count.

References SPU_ES, and vlc_player_GetTrackCount().

◆ vlc_player_GetTrack()

const struct vlc_player_track * vlc_player_GetTrack ( vlc_player_t player,
vlc_es_id_t es_id 
)

Get a track from an ES identifier.

Warning
The returned pointer becomes invalid when the player is unlocked. The referenced structure can be safely copied with vlc_player_track_Dup().
Parameters
playerlocked player instance
es_idan ES ID (retrieved from vlc_player_cbs.on_track_list_changed or vlc_player_GetTrackAt())
Returns
a valid player track or NULL (if the track was terminated by the playback thread)

References vlc_player_track_priv::t, and vlc_player_GetPrivTrack().

Referenced by vlc_player_osd_Track(), and vlc_player_osd_Tracks().

◆ vlc_player_GetTrackAt()

const struct vlc_player_track * vlc_player_GetTrackAt ( vlc_player_t player,
enum es_format_category_e  cat,
size_t  index 
)

Get the track at a specific index for an ES category.

Warning
The behaviour is undefined if the index is not valid.
The returned pointer becomes invalid when the player is unlocked. The referenced structure can be safely copied with vlc_player_track_Dup().
Parameters
playerlocked player instance
catVIDEO_ES, AUDIO_ES or SPU_ES
indexvalid index in the range [0; count[
Returns
a valid track (can't be NULL if vlc_player_GetTrackCount() returned a valid count)

References vlc_player_track_vector::data, vlc_player_input::player, vlc_player_track_priv::t, vlc_player_get_input_locked(), and vlc_player_input_GetTrackVector().

Referenced by vlc_player_CycleTrack(), vlc_player_GetAudioTrackAt(), vlc_player_GetEsIdList(), vlc_player_GetSelectedTrack(), vlc_player_GetSubtitleTrackAt(), vlc_player_GetVideoTrackAt(), vlc_player_RestartTrackCategory(), and vlc_player_UnselectTrackCategory().

◆ vlc_player_GetTrackCount()

size_t vlc_player_GetTrackCount ( vlc_player_t player,
enum es_format_category_e  cat 
)

Get the number of tracks for an ES category.

Warning
The returned size becomes invalid when the player is unlocked.
Parameters
playerlocked player instance
catVIDEO_ES, AUDIO_ES or SPU_ES
Returns
number of tracks, or 0 (in case of error, or if the media is not started)

References vlc_player_input::player, vlc_player_track_vector::size, vlc_player_get_input_locked(), and vlc_player_input_GetTrackVector().

Referenced by vlc_player_CycleTrack(), vlc_player_GetAudioTrackCount(), vlc_player_GetEsIdList(), vlc_player_GetSelectedTrack(), vlc_player_GetSubtitleTrackCount(), vlc_player_GetVideoTrackCount(), vlc_player_RestartTrackCategory(), and vlc_player_UnselectTrackCategory().

◆ vlc_player_GetVideoTrackAt()

static const struct vlc_player_track * vlc_player_GetVideoTrackAt ( vlc_player_t player,
size_t  index 
)
inlinestatic

Helper to get a video track at a specific index.

References VIDEO_ES, and vlc_player_GetTrackAt().

◆ vlc_player_GetVideoTrackCount()

static size_t vlc_player_GetVideoTrackCount ( vlc_player_t player)
inlinestatic

Helper to get the video track count.

References VIDEO_ES, and vlc_player_GetTrackCount().

◆ vlc_player_IsAudioEnabled()

static bool vlc_player_IsAudioEnabled ( vlc_player_t player)
inlinestatic

Helper to check if audio tracks are enabled.

References AUDIO_ES, and vlc_player_IsTrackCategoryEnabled().

◆ vlc_player_IsSubtitleEnabled()

static bool vlc_player_IsSubtitleEnabled ( vlc_player_t player)
inlinestatic

Helper to check if subtitle tracks are enabled.

References SPU_ES, and vlc_player_IsTrackCategoryEnabled().

Referenced by vlc_player_ToggleSubtitle().

◆ vlc_player_IsTrackCategoryEnabled()

bool vlc_player_IsTrackCategoryEnabled ( vlc_player_t player,
enum es_format_category_e  cat 
)

Check if a track category is enabled.

Parameters
playerlocked player instance
catVIDEO_ES, AUDIO_ES or SPU_ES

References cat2vars, DATA_ES, vlc_player_input::player, UNKNOWN_ES, var, and var_GetBool().

Referenced by vlc_player_IsAudioEnabled(), vlc_player_IsSubtitleEnabled(), and vlc_player_IsVideoEnabled().

◆ vlc_player_IsVideoEnabled()

static bool vlc_player_IsVideoEnabled ( vlc_player_t player)
inlinestatic

Helper to check if video tracks are enabled.

References VIDEO_ES, and vlc_player_IsTrackCategoryEnabled().

◆ vlc_player_RestartEsId()

void vlc_player_RestartEsId ( vlc_player_t player,
vlc_es_id_t es_id 
)

Restart a track from an ES identifier.

Note
A successful call will trigger the vlc_player_cbs.on_track_selection_changed event.
Parameters
playerlocked player instance
es_idan ES ID (retrieved from vlc_player_cbs.on_track_list_changed or vlc_player_GetTrackAt())

References INPUT_CONTROL_RESTART_ES, input_ControlPushEsHelper(), vlc_player_input::player, vlc_player_input::thread, and vlc_player_get_input_locked().

Referenced by vlc_player_RestartTrack().

◆ vlc_player_RestartTrack()

static void vlc_player_RestartTrack ( vlc_player_t player,
const struct vlc_player_track track 
)
inlinestatic

Helper to restart a track.

References vlc_player_track::es_id, and vlc_player_RestartEsId().

Referenced by vlc_player_RestartTrackCategory().

◆ vlc_player_RestartTrackCategory()

static void vlc_player_RestartTrackCategory ( vlc_player_t player,
enum es_format_category_e  cat 
)
inlinestatic

Helper to restart all selected tracks from an ES category.

References count, vlc_player_track::selected, vlc_player_GetTrackAt(), vlc_player_GetTrackCount(), and vlc_player_RestartTrack().

◆ vlc_player_SelectAudioLanguage()

static void vlc_player_SelectAudioLanguage ( vlc_player_t player,
const char *  lang 
)
inlinestatic

Helper to select the audio language.

References AUDIO_ES, and vlc_player_SelectCategoryLanguage().

◆ vlc_player_SelectCategoryLanguage()

void vlc_player_SelectCategoryLanguage ( vlc_player_t player,
enum es_format_category_e  cat,
const char *  lang 
)

Select the language for an ES category.

Warning
The language will only be set for all future played media.
Parameters
playerlocked player instance
catAUDIO_ES or SPU_ES
langcomma separated, two or three letters country code, 'any' as a fallback or NULL to reset the default state

References AUDIO_ES, vlc_player_input::player, SPU_ES, var_SetString(), vlc_assert_unreachable, and vlc_player_assert_locked().

Referenced by vlc_player_SelectAudioLanguage(), and vlc_player_SelectSubtitleLanguage().

◆ vlc_player_SelectEsId()

unsigned vlc_player_SelectEsId ( vlc_player_t player,
vlc_es_id_t es_id,
enum vlc_player_select_policy  policy 
)

Select a track from an ES identifier.

Note
A successful call will trigger the vlc_player_cbs.on_track_selection_changed event.
Parameters
playerlocked player instance
es_idan ES ID (retrieved from vlc_player_cbs.on_track_list_changed or vlc_player_GetTrackAt())
policyexclusive or simultaneous
Returns
the number of track selected for es_id category

References INPUT_CONTROL_SET_ES, input_ControlPushEsHelper(), vlc_player_input::player, vlc_player_input::thread, vlc_es_id_GetCat(), vlc_player_get_input_locked(), vlc_player_GetEsIdList(), vlc_player_osd_Track(), VLC_PLAYER_SELECT_EXCLUSIVE, vlc_player_SelectEsIdList(), and VLC_SUCCESS.

Referenced by vlc_player_SelectTrack(), and vlc_player_SetTeletextEnabled().

◆ vlc_player_SelectEsIdList()

unsigned vlc_player_SelectEsIdList ( vlc_player_t player,
enum es_format_category_e  cat,
vlc_es_id_t *const  es_id_list[] 
)

Select multiple tracks from a list of ES identifiers.

Any tracks of the category, not referenced in the list will be unselected.

Warning
there is no guarantee all requested tracks will be selected. The behaviour is undefined if the list is not null-terminated.
Note
A successful call will trigger the vlc_player_cbs.on_track_selection_changed event for each track that has its selection state changed.
See also
VLC_PLAYER_SELECT_SIMULTANEOUS
Parameters
playerlocked player instance
catVIDEO_ES, AUDIO_ES or SPU_ES
es_id_lista null-terminated list of ES identifiers. es_ids not corresponding to the category will be ignored. (ES IDs can be retrieved from vlc_player_cbs.on_track_list_changed or vlc_player_GetTrackAt())
Returns
the number of track selected for that category

References AUDIO_ES, DATA_ES, INPUT_CONTROL_SET_ES_LIST, input_ControlPush(), vlc_player_input::player, SPU_ES, vlc_player_input::thread, UNKNOWN_ES, VIDEO_ES, vlc_alloc(), vlc_es_id_GetCat(), vlc_es_id_Hold(), vlc_player_get_input_locked(), vlc_player_osd_Tracks(), and VLC_SUCCESS.

Referenced by vlc_player_CycleTrack(), and vlc_player_SelectEsId().

◆ vlc_player_SelectNextTrack()

static void vlc_player_SelectNextTrack ( vlc_player_t player,
enum es_format_category_e  cat,
enum vlc_vout_order  vout_order 
)
inlinestatic

Helper to select the next track.

If the last track is already selected, a call to this function will disable this last track. And a second call will select the first track. Unless called on the PRIMARY with a SECONDARY selected, it will cycle through

Parameters
playerlocked player instance
catVIDEO_ES, AUDIO_ES or SPU_ES

References vlc_player_CycleTrack().

◆ vlc_player_SelectPrevTrack()

static void vlc_player_SelectPrevTrack ( vlc_player_t player,
enum es_format_category_e  cat,
enum vlc_vout_order  vout_order 
)
inlinestatic

Helper to select the Previous track.

If the first track is already selected, a call to this function will disable this first track. And a second call will select the last track. Unless called on the PRIMARY with a SECONDARY selected, it will cycle through

Parameters
playerlocked player instance
catVIDEO_ES, AUDIO_ES or SPU_ES

References vlc_player_CycleTrack().

◆ vlc_player_SelectSubtitleLanguage()

static void vlc_player_SelectSubtitleLanguage ( vlc_player_t player,
const char *  lang 
)
inlinestatic

Helper to select the subtitle language.

References SPU_ES, and vlc_player_SelectCategoryLanguage().

◆ vlc_player_SelectTrack()

static unsigned vlc_player_SelectTrack ( vlc_player_t player,
const struct vlc_player_track track,
enum vlc_player_select_policy  policy 
)
inlinestatic

Helper to select a track.

References vlc_player_track::es_id, and vlc_player_SelectEsId().

◆ vlc_player_SelectTracksByStringIds()

void vlc_player_SelectTracksByStringIds ( vlc_player_t player,
enum es_format_category_e  cat,
const char *  str_ids 
)

Select tracks by their string identifier.

This function can be used to pre-select a list of tracks before starting the player. It has only effect for the current media. It can also be used when the player is already started.

'str_ids' can contain more than one track id, delimited with ','. "" or any invalid track id will cause the player to unselect all tracks of that category. NULL will disable the preference for newer tracks without unselecting any current tracks.

Example:

  • (VIDEO_ES, "video/1,video/2") will select these 2 video tracks. If there is only one video track with the id "video/0", no tracks will be selected.
  • (SPU_ES, "${slave_url_md5sum}/spu/0) will select one spu added by an input slave with the corresponding url.
Note
The string identifier of a track can be found via vlc_es_id_GetStrId().
Parameters
playerlocked player instance
catVIDEO_ES, AUDIO_ES or SPU_ES
str_idslist of string identifier or NULL

References AUDIO_ES, vlc_player_t::audio_string_ids, vlc_player_input::player, SPU_ES, strdup(), vlc_player_t::sub_string_ids, VIDEO_ES, vlc_player_t::video_string_ids, vlc_player_assert_locked(), vlc_player_get_input_locked(), and vlc_player_input_SelectTracksByStringIds().

◆ vlc_player_SetAudioEnabled()

static void vlc_player_SetAudioEnabled ( vlc_player_t player,
bool  enabled 
)
inlinestatic

Helper to enable or disable audio tracks.

References AUDIO_ES, and vlc_player_SetTrackCategoryEnabled().

◆ vlc_player_SetSubtitleEnabled()

static void vlc_player_SetSubtitleEnabled ( vlc_player_t player,
bool  enabled 
)
inlinestatic

Helper to enable or disable subtitle tracks.

References SPU_ES, and vlc_player_SetTrackCategoryEnabled().

Referenced by vlc_player_ToggleSubtitle().

◆ vlc_player_SetSubtitleTextScale()

void vlc_player_SetSubtitleTextScale ( vlc_player_t player,
unsigned  scale 
)

Set the subtitle text scaling factor.

Note
This function have an effect only if the subtitle track is a text type.
Parameters
playerlocked player instance
scalefactor in the range [10;500] (default: 100)

References vlc_player_input::player, and var_SetInteger().

◆ vlc_player_SetTrackCategoryEnabled()

void vlc_player_SetTrackCategoryEnabled ( vlc_player_t player,
enum es_format_category_e  cat,
bool  enabled 
)

Enable or disable a track category.

If a track category is disabled, the player won't select any tracks of this category automatically or via an user action (vlc_player_SelectTrack()).

Parameters
playerlocked player instance
catVIDEO_ES, AUDIO_ES or SPU_ES
enabledtrue to enable

References cat2vars, DATA_ES, vlc_player_input::player, sout_var, vlc_player_input::thread, UNKNOWN_ES, var, var_SetBool(), vlc_player_get_input_locked(), and vlc_player_UnselectTrackCategory().

Referenced by vlc_player_SetAudioEnabled(), vlc_player_SetSubtitleEnabled(), and vlc_player_SetVideoEnabled().

◆ vlc_player_SetVideoEnabled()

static void vlc_player_SetVideoEnabled ( vlc_player_t player,
bool  enabled 
)
inlinestatic

Helper to enable or disable video tracks.

References VIDEO_ES, and vlc_player_SetTrackCategoryEnabled().

◆ vlc_player_ToggleSubtitle()

static void vlc_player_ToggleSubtitle ( vlc_player_t player)
inlinestatic

Helper to toggle subtitles.

References vlc_player_IsSubtitleEnabled(), and vlc_player_SetSubtitleEnabled().

◆ vlc_player_track_Delete()

void vlc_player_track_Delete ( struct vlc_player_track track)

Delete a duplicated track.

References container_of, vlc_player_track_priv::t, and vlc_player_track_priv_Delete().

◆ vlc_player_track_Dup()

struct vlc_player_track * vlc_player_track_Dup ( const struct vlc_player_track track)

Duplicate a track.

This function can be used to pass a track from a callback to an other context. The es_id will be held by the duplicated track.

Warning
The returned track won't be updated if the original one is modified by the player.
See also
vlc_player_cbs.on_track_list_changed
Returns
a duplicated track or NULL on allocation error

References vlc_player_track::es_id, vlc_player_track::fmt, vlc_player_track::name, vlc_player_track::selected, vlc_player_track_priv::t, and vlc_player_track_priv_New().

◆ vlc_player_UnselectEsId()

void vlc_player_UnselectEsId ( vlc_player_t player,
vlc_es_id_t es_id 
)

Unselect a track from an ES identifier.

Warning
Other tracks of the same category won't be touched.
Note
A successful call will trigger the vlc_player_cbs.on_track_selection_changed event.
Parameters
playerlocked player instance
es_idan ES ID (retrieved from vlc_player_cbs.on_track_list_changed or vlc_player_GetTrackAt())

References INPUT_CONTROL_UNSET_ES, input_ControlPushEsHelper(), vlc_player_input::player, vlc_player_input::thread, vlc_es_id_GetCat(), vlc_player_get_input_locked(), vlc_player_GetEsIdList(), vlc_player_osd_Tracks(), and VLC_SUCCESS.

Referenced by vlc_player_SetTeletextEnabled(), and vlc_player_UnselectTrack().

◆ vlc_player_UnselectTrack()

static void vlc_player_UnselectTrack ( vlc_player_t player,
const struct vlc_player_track track 
)
inlinestatic

Helper to unselect a track.

References vlc_player_track::es_id, and vlc_player_UnselectEsId().

Referenced by vlc_player_UnselectTrackCategory().

◆ vlc_player_UnselectTrackCategory()

static void vlc_player_UnselectTrackCategory ( vlc_player_t player,
enum es_format_category_e  cat 
)
inlinestatic