VLC 4.0.0-dev
|
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_track * | vlc_player_track_Dup (const struct vlc_player_track *track) |
Duplicate a track. More... | |
void | vlc_player_track_Delete (struct vlc_player_track *track) |
Delete a duplicated track. More... | |
size_t | vlc_player_GetTrackCount (vlc_player_t *player, enum es_format_category_e cat) |
Get the number of tracks for an ES category. More... | |
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. More... | |
static size_t | vlc_player_GetVideoTrackCount (vlc_player_t *player) |
Helper to get the video track count. More... | |
static const struct vlc_player_track * | vlc_player_GetVideoTrackAt (vlc_player_t *player, size_t index) |
Helper to get a video track at a specific index. More... | |
static size_t | vlc_player_GetAudioTrackCount (vlc_player_t *player) |
Helper to get the audio track count. More... | |
static const struct vlc_player_track * | vlc_player_GetAudioTrackAt (vlc_player_t *player, size_t index) |
Helper to get an audio track at a specific index. More... | |
static size_t | vlc_player_GetSubtitleTrackCount (vlc_player_t *player) |
Helper to get the subtitle track count. More... | |
static const struct vlc_player_track * | vlc_player_GetSubtitleTrackAt (vlc_player_t *player, size_t index) |
Helper to get a subtitle track at a specific index. More... | |
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. More... | |
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. More... | |
vlc_es_id_t * | vlc_player_GetEsIdFromVout (vlc_player_t *player, vout_thread_t *vout) |
Get the ES identifier of a video output. More... | |
static const struct vlc_player_track * | vlc_player_GetSelectedTrack (vlc_player_t *player, enum es_format_category_e cat) |
Helper to get the selected track from an ES category. More... | |
void | vlc_player_SelectTracksByStringIds (vlc_player_t *player, enum es_format_category_e cat, const char *str_ids) |
Select tracks by their string identifier. More... | |
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. More... | |
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. More... | |
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. More... | |
void | vlc_player_SelectNextTrack (vlc_player_t *player, enum es_format_category_e cat) |
Select the next track. More... | |
void | vlc_player_SelectPrevTrack (vlc_player_t *player, enum es_format_category_e cat) |
Select the Previous track. More... | |
void | vlc_player_UnselectEsId (vlc_player_t *player, vlc_es_id_t *es_id) |
Unselect a track from an ES identifier. More... | |
static void | vlc_player_UnselectTrack (vlc_player_t *player, const struct vlc_player_track *track) |
Helper to unselect a track. More... | |
static void | vlc_player_UnselectTrackCategory (vlc_player_t *player, enum es_format_category_e cat) |
Helper to unselect all tracks from an ES category. More... | |
void | vlc_player_RestartEsId (vlc_player_t *player, vlc_es_id_t *es_id) |
Restart a track from an ES identifier. More... | |
static void | vlc_player_RestartTrack (vlc_player_t *player, const struct vlc_player_track *track) |
Helper to restart a track. More... | |
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. More... | |
void | vlc_player_SelectCategoryLanguage (vlc_player_t *player, enum es_format_category_e cat, const char *lang) |
Select the language for an ES category. More... | |
char * | vlc_player_GetCategoryLanguage (vlc_player_t *player, enum es_format_category_e cat) |
Get the language of an ES category. More... | |
static void | vlc_player_SelectAudioLanguage (vlc_player_t *player, const char *lang) |
Helper to select the audio language. More... | |
static void | vlc_player_SelectSubtitleLanguage (vlc_player_t *player, const char *lang) |
Helper to select the subtitle language. More... | |
void | vlc_player_SetTrackCategoryEnabled (vlc_player_t *player, enum es_format_category_e cat, bool enabled) |
Enable or disable a track category. More... | |
bool | vlc_player_IsTrackCategoryEnabled (vlc_player_t *player, enum es_format_category_e cat) |
Check if a track category is enabled. More... | |
static void | vlc_player_SetVideoEnabled (vlc_player_t *player, bool enabled) |
Helper to enable or disable video tracks. More... | |
static bool | vlc_player_IsVideoEnabled (vlc_player_t *player) |
Helper to check if video tracks are enabled. More... | |
static void | vlc_player_SetAudioEnabled (vlc_player_t *player, bool enabled) |
Helper to enable or disable audio tracks. More... | |
static bool | vlc_player_IsAudioEnabled (vlc_player_t *player) |
Helper to check if audio tracks are enabled. More... | |
static void | vlc_player_SetSubtitleEnabled (vlc_player_t *player, bool enabled) |
Helper to enable or disable subtitle tracks. More... | |
static bool | vlc_player_IsSubtitleEnabled (vlc_player_t *player) |
Helper to check if subtitle tracks are enabled. More... | |
static void | vlc_player_ToggleSubtitle (vlc_player_t *player) |
Helper to toggle subtitles. More... | |
void | vlc_player_SetSubtitleTextScale (vlc_player_t *player, unsigned scale) |
Set the subtitle text scaling factor. More... | |
unsigned | vlc_player_GetSubtitleTextScale (vlc_player_t *player) |
Get the subtitle text scaling factor. More... | |
Player selection policy.
|
inlinestatic |
Helper to get an audio track at a specific index.
References AUDIO_ES, and vlc_player_GetTrackAt().
|
inlinestatic |
Helper to get the audio track count.
References AUDIO_ES, and vlc_player_GetTrackCount().
char * vlc_player_GetCategoryLanguage | ( | vlc_player_t * | player, |
enum es_format_category_e | cat | ||
) |
Get the language of an ES category.
player | locked player instance |
cat | AUDIO_ES or SPU_ES |
References AUDIO_ES, vlc_player_input::player, SPU_ES, var_GetString(), vlc_assert_unreachable, and vlc_player_assert_locked().
Referenced by vlc_strfplayer().
vlc_es_id_t * vlc_player_GetEsIdFromVout | ( | vlc_player_t * | player, |
vout_thread_t * | vout | ||
) |
Get the ES identifier of a video output.
player | locked player instance |
vout | vout (can't be NULL) |
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.
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.
player | locked player instance |
es_id | an ES ID (retrieved from vlc_player_cbs.on_track_list_changed or vlc_player_GetTrackAt()) |
order | if not null, the order of the vout |
References vlc_player_GetPrivTrack(), vlc_player_track_priv::vout, and vlc_player_track_priv::vout_order.
Referenced by vlc_player_UpdateMLStates().
|
inlinestatic |
Helper to get the selected track from an ES category.
References count, vlc_player_track::selected, vlc_player_GetTrackAt(), and vlc_player_GetTrackCount().
Referenced by vlc_strfplayer().
unsigned vlc_player_GetSubtitleTextScale | ( | vlc_player_t * | player | ) |
Get the subtitle text scaling factor.
player | locked player instance |
References vlc_player_input::player, and var_GetInteger().
|
inlinestatic |
Helper to get a subtitle track at a specific index.
References SPU_ES, and vlc_player_GetTrackAt().
|
inlinestatic |
Helper to get the subtitle track count.
References SPU_ES, and vlc_player_GetTrackCount().
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.
player | locked player instance |
es_id | an ES ID (retrieved from vlc_player_cbs.on_track_list_changed or vlc_player_GetTrackAt()) |
References vlc_player_track_priv::t, and vlc_player_GetPrivTrack().
Referenced by vlc_player_osd_Track(), and vlc_player_osd_Tracks().
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.
player | locked player instance |
cat | VIDEO_ES, AUDIO_ES or SPU_ES |
index | valid index in the range [0; 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().
size_t vlc_player_GetTrackCount | ( | vlc_player_t * | player, |
enum es_format_category_e | cat | ||
) |
Get the number of tracks for an ES category.
player | locked player instance |
cat | VIDEO_ES, AUDIO_ES or SPU_ES |
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().
|
inlinestatic |
Helper to get a video track at a specific index.
References VIDEO_ES, and vlc_player_GetTrackAt().
|
inlinestatic |
Helper to get the video track count.
References VIDEO_ES, and vlc_player_GetTrackCount().
|
inlinestatic |
Helper to check if audio tracks are enabled.
References AUDIO_ES, and vlc_player_IsTrackCategoryEnabled().
|
inlinestatic |
Helper to check if subtitle tracks are enabled.
References SPU_ES, and vlc_player_IsTrackCategoryEnabled().
Referenced by vlc_player_ToggleSubtitle().
bool vlc_player_IsTrackCategoryEnabled | ( | vlc_player_t * | player, |
enum es_format_category_e | cat | ||
) |
Check if a track category is enabled.
player | locked player instance |
cat | VIDEO_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().
|
inlinestatic |
Helper to check if video tracks are enabled.
References VIDEO_ES, and vlc_player_IsTrackCategoryEnabled().
void vlc_player_RestartEsId | ( | vlc_player_t * | player, |
vlc_es_id_t * | es_id | ||
) |
Restart a track from an ES identifier.
player | locked player instance |
es_id | an 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().
|
inlinestatic |
Helper to restart a track.
References vlc_player_track::es_id, and vlc_player_RestartEsId().
Referenced by vlc_player_RestartTrackCategory().
|
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().
|
inlinestatic |
Helper to select the audio language.
References AUDIO_ES, and 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.
player | locked player instance |
cat | AUDIO_ES or SPU_ES |
lang | comma 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().
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.
player | locked player instance |
es_id | an ES ID (retrieved from vlc_player_cbs.on_track_list_changed or vlc_player_GetTrackAt()) |
policy | exclusive or simultaneous |
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().
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.
player | locked player instance |
cat | VIDEO_ES, AUDIO_ES or SPU_ES |
es_id_list | a 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()) |
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_SelectEsId().
void vlc_player_SelectNextTrack | ( | vlc_player_t * | player, |
enum es_format_category_e | cat | ||
) |
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.
player | locked player instance |
cat | VIDEO_ES, AUDIO_ES or SPU_ES |
References vlc_player_CycleTrack().
void vlc_player_SelectPrevTrack | ( | vlc_player_t * | player, |
enum es_format_category_e | cat | ||
) |
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.
player | locked player instance |
cat | VIDEO_ES, AUDIO_ES or SPU_ES |
References vlc_player_CycleTrack().
|
inlinestatic |
Helper to select the subtitle language.
References SPU_ES, and vlc_player_SelectCategoryLanguage().
|
inlinestatic |
Helper to select a track.
References vlc_player_track::es_id, and vlc_player_SelectEsId().
Referenced by vlc_player_CycleTrack().
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:
player | locked player instance |
cat | VIDEO_ES, AUDIO_ES or SPU_ES |
str_ids | list 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().
|
inlinestatic |
Helper to enable or disable audio tracks.
References AUDIO_ES, and vlc_player_SetTrackCategoryEnabled().
|
inlinestatic |
Helper to enable or disable subtitle tracks.
References SPU_ES, and vlc_player_SetTrackCategoryEnabled().
Referenced by vlc_player_ToggleSubtitle().
void vlc_player_SetSubtitleTextScale | ( | vlc_player_t * | player, |
unsigned | scale | ||
) |
Set the subtitle text scaling factor.
player | locked player instance |
scale | factor in the range [10;500] (default: 100) |
References vlc_player_input::player, and var_SetInteger().
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()).
player | locked player instance |
cat | VIDEO_ES, AUDIO_ES or SPU_ES |
enabled | true 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().
|
inlinestatic |
Helper to enable or disable video tracks.
References VIDEO_ES, and vlc_player_SetTrackCategoryEnabled().
|
inlinestatic |
Helper to toggle subtitles.
References vlc_player_IsSubtitleEnabled(), and vlc_player_SetSubtitleEnabled().
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().
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.
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().
void vlc_player_UnselectEsId | ( | vlc_player_t * | player, |
vlc_es_id_t * | es_id | ||
) |
Unselect a track from an ES identifier.
player | locked player instance |
es_id | an 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().
|
inlinestatic |
Helper to unselect a track.
References vlc_player_track::es_id, and vlc_player_UnselectEsId().
Referenced by vlc_player_CycleTrack(), and vlc_player_UnselectTrackCategory().
|
inlinestatic |
Helper to unselect all tracks from an ES category.
References count, vlc_player_track::selected, vlc_player_GetTrackAt(), vlc_player_GetTrackCount(), and vlc_player_UnselectTrack().
Referenced by vlc_player_SetTrackCategoryEnabled().