Go to the documentation of this file.
22 #define VLC_PLAYER_H 1
142 void *media_provider_data);
357 #define VLC_PLAYER_CAP_SEEK (1<<0)
359 #define VLC_PLAYER_CAP_PAUSE (1<<1)
361 #define VLC_PLAYER_CAP_CHANGE_RATE (1<<2)
363 #define VLC_PLAYER_CAP_REWIND (1<<3)
366 #define VLC_PLAYER_TELETEXT_KEY_RED ('r' << 16)
368 #define VLC_PLAYER_TELETEXT_KEY_GREEN ('g' << 16)
370 #define VLC_PLAYER_TELETEXT_KEY_YELLOW ('y' << 16)
372 #define VLC_PLAYER_TELETEXT_KEY_BLUE ('b' << 16)
374 #define VLC_PLAYER_TELETEXT_KEY_INDEX ('i' << 16)
891 bool select,
bool notify,
bool check_ext);
950 #define VLC_PLAYER_TITLE_MENU 0x01
952 #define VLC_PLAYER_TITLE_INTERACTIVE 0x02
1043 if (selected_idx < 0)
1092 size_t chapter_idx);
1130 return chapter_idx >= 0 ? &title->
chapters[chapter_idx] : NULL;
1284 for (
size_t i = 0; i <
count; ++i)
1401 static inline size_t
1419 static inline size_t
1437 static inline size_t
1515 for (
size_t i = 0; i <
count; ++i)
1553 const char *str_ids);
1575 static inline unsigned
1677 for (
size_t i = 0; i <
count; ++i)
1718 for (
size_t i = 0; i <
count; ++i)
2211 double momentary_loudness,
2798 float new_buffering,
void *data);
2811 float new_rate,
void *data);
2824 int old_caps,
int new_caps,
void *data);
2922 int unselected_id,
int selected_id,
void *data);
2985 bool has_teletext_menu,
void *data);
2997 bool enabled,
void *data);
3009 unsigned new_page,
void *data);
3021 bool enabled,
void *data);
3046 float subs_fps,
void *data);
3070 bool recording,
void *data);
3081 float quality,
float strength,
void *data);
static size_t vlc_player_GetSubtitleTrackCount(vlc_player_t *player)
Helper to get the subtitle track count.
Definition: vlc_player.h:1439
const char * name
Program name, always valid.
Definition: vlc_player.h:1179
VLC_EXPORT char * vlc_player_GetCategoryLanguage(vlc_player_t *player, enum es_format_category_e cat)
Get the language of an ES category.
Definition: player.c:725
@ VLC_PLAYER_NAV_UP
Select a navigation item above or move the viewpoint up.
Definition: vlc_player.h:334
VLC_EXPORT void vlc_player_Navigate(vlc_player_t *player, enum vlc_player_nav nav)
Navigate (for DVD/Bluray menus or viewpoint)
Definition: player.c:1554
@ VLC_PLAYER_LIST_ADDED
Definition: vlc_player.h:2723
VLC_EXPORT vlc_player_title_list * vlc_player_GetTitleList(vlc_player_t *player)
Get the title list of the current media.
Definition: player.c:814
static void vlc_player_SelectSubtitleLanguage(vlc_player_t *player, const char *lang)
Helper to select the subtitle language.
Definition: vlc_player.h:1774
void(* on_error_changed)(vlc_player_t *player, enum vlc_player_error error, void *data)
Called when a media triggered an error.
Definition: vlc_player.h:2785
@ VLC_PLAYER_MEDIA_STOPPED_STOP
Stop, even if there is a next media to play.
Definition: vlc_player.h:102
size_t count
Definition: core.c:401
VLC_EXPORT void vlc_player_SelectTitle(vlc_player_t *player, const struct vlc_player_title *title)
Select a title for the current media.
Definition: player.c:852
@ VLC_PLAYER_MEDIA_STOPPED_PAUSE
Pause when reaching the end of file.
Definition: vlc_player.h:100
#define VLC_API
Definition: fourcc_gen.c:31
@ VIDEO_ES
Definition: vlc_es.h:603
Player vout callbacks.
Definition: vlc_player.h:2512
static void vlc_player_SetAudioDelay(vlc_player_t *player, vlc_tick_t delay, enum vlc_player_whence whence)
Helper to set the audio delay.
Definition: vlc_player.h:1972
VLC_EXPORT enum vlc_player_state vlc_player_GetState(vlc_player_t *player)
Get the state of the player.
Definition: player.c:1261
VLC_EXPORT vlc_player_title_list * vlc_player_title_list_Hold(vlc_player_title_list *titles)
Hold the title list of the player.
Definition: title.c:31
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.
Definition: vlc_player.h:1430
VLC_EXPORT void vlc_player_RestartEsId(vlc_player_t *player, vlc_es_id_t *es_id)
Restart a track from an ES identifier.
Definition: player.c:697
VLC_EXPORT void vlc_player_SetSubtitleTextScale(vlc_player_t *player, unsigned scale)
Set the subtitle text scaling factor.
Definition: player.c:1769
vlc_player_media_stopped_action
Action when the player is stopped.
Definition: vlc_player.h:96
static size_t vlc_player_GetVideoTrackCount(vlc_player_t *player)
Helper to get the video track count.
Definition: vlc_player.h:1403
void(* on_media_subitems_changed)(vlc_player_t *player, input_item_t *media, input_item_node_t *new_subitems, void *data)
Called when the media has new subitems.
Definition: vlc_player.h:3153
VLC_EXPORT void vlc_player_SeekByTime(vlc_player_t *player, vlc_tick_t time, enum vlc_player_seek_speed speed, enum vlc_player_whence whence)
Seek the current media by time.
Definition: player.c:1423
void(* on_update)(const struct vlc_player_timer_point *value, void *data)
Called when the state or the time changed.
Definition: vlc_player.h:3321
VLC_EXPORT vlc_tick_t vlc_player_timer_point_GetNextIntervalDate(const struct vlc_player_timer_point *point, vlc_tick_t system_now, vlc_tick_t interpolated_ts, vlc_tick_t next_interval)
Get the date of the next interval.
Definition: timer.c:515
void(* on_teletext_menu_changed)(vlc_player_t *player, bool has_teletext_menu, void *data)
Called when the media has a teletext menu.
Definition: vlc_player.h:2985
VLC_EXPORT void vlc_player_SelectPrevTrack(vlc_player_t *player, enum es_format_category_e cat)
Select the Previous track.
Definition: player.c:669
void(* on_playback_restore_queried)(vlc_player_t *player, void *data)
Called to query the user about restoring the previous playback position.
Definition: vlc_player.h:3210
VLC_EXPORT enum vlc_player_abloop vlc_player_GetAtoBLoop(vlc_player_t *player, vlc_tick_t *a_time, float *a_pos, vlc_tick_t *b_time, float *b_pos)
Get the A to B loop status.
Definition: player.c:1531
void(* on_vout_changed)(vlc_player_t *player, enum vlc_player_vout_action action, vout_thread_t *vout, enum vlc_vout_order order, vlc_es_id_t *es_id, void *data)
Called when a vout is started or stopped.
Definition: vlc_player.h:3170
VLC_EXPORT vlc_tick_t vlc_player_GetTime(vlc_player_t *player)
Get the time of the current media.
Definition: player.c:1356
VLC_EXPORT void vlc_player_IncrementRate(vlc_player_t *player)
Increment the rate of the player (faster)
Definition: player.c:1337
float position
Position in the range [0.0f;1.0].
Definition: vlc_player.h:3259
VLC_EXPORT struct vlc_player_track * vlc_player_track_Dup(const struct vlc_player_track *track)
Duplicate a track.
Definition: track.c:157
VLC_EXPORT int vlc_player_SetEsIdDelay(vlc_player_t *player, vlc_es_id_t *es_id, vlc_tick_t delay, enum vlc_player_whence whence)
Set the delay of one track.
Definition: player.c:1680
unsigned minutes
Minutes [0;59].
Definition: vlc_player.h:3285
void(* on_volume_changed)(audio_output_t *aout, float new_volume, void *data)
Called when the volume has changed.
Definition: vlc_player.h:2296
static bool vlc_player_IsVideoEnabled(vlc_player_t *player)
Helper to check if video tracks are enabled.
Definition: vlc_player.h:1816
vlc_player_error
Error of the player.
Definition: vlc_player.h:289
VLC_EXPORT vlc_player_listener_id * vlc_player_AddListener(vlc_player_t *player, const struct vlc_player_cbs *cbs, void *cbs_data)
Add a listener callback.
Definition: player.c:970
@ VLC_PLAYER_RESTORE_PLAYBACK_POS_NEVER
Definition: vlc_player.h:379
bool selected
True if the program is selected.
Definition: vlc_player.h:1181
void(* on_rate_changed)(vlc_player_t *player, float new_rate, void *data)
Called when the player rate has changed.
Definition: vlc_player.h:2811
static void vlc_player_vout_ToggleFullscreen(vlc_player_t *player)
Helper to toggle the player fullscreen state.
Definition: vlc_player.h:2636
Player title structure.
Definition: vlc_player.h:956
@ VLC_PLAYER_RESTORE_PLAYBACK_POS_ASK
Definition: vlc_player.h:380
@ VLC_PLAYER_LOCK_NORMAL
Normal lock.
Definition: vlc_player.h:79
static const struct vlc_player_chapter * vlc_player_GetSelectedChapter(vlc_player_t *player)
Helper to get the current selected chapter.
Definition: vlc_player.h:1125
VLC_EXPORT struct vlc_player_program * vlc_player_program_Dup(const struct vlc_player_program *prgm)
Duplicate a program.
Definition: track.c:69
Player aout callbacks.
Definition: vlc_player.h:2285
VLC_EXPORT void vlc_player_track_Delete(struct vlc_player_track *track)
Delete a duplicated track.
Definition: track.c:149
VLC_EXPORT const struct vlc_player_program * vlc_player_GetProgram(vlc_player_t *player, int group_id)
Get a program from an ES group identifier.
Definition: player.c:279
int group_id
Id used for vlc_player_SelectProgram()
Definition: vlc_player.h:1177
bool scrambled
True if the program is scrambled.
Definition: vlc_player.h:1183
vlc_player_select_policy
Player selection policy.
Definition: vlc_player.h:1308
static bool vlc_player_CanChangeRate(vlc_player_t *player)
Helper to get the change-rate capability.
Definition: vlc_player.h:591
VLC_EXPORT void vlc_player_SelectCategoryLanguage(vlc_player_t *player, enum es_format_category_e cat, const char *lang)
Select the language for an ES category.
Definition: player.c:706
VLC_EXPORT int vlc_player_aout_IsMuted(vlc_player_t *player)
Check if the audio output is muted.
Definition: aout.c:159
VLC_EXPORT void vlc_player_osd_Message(vlc_player_t *player, const char *fmt,...)
Display an OSD message on all vouts.
Definition: osd.c:89
static vlc_tick_t vlc_player_GetSubtitleDelay(vlc_player_t *player)
Helper to get the subtitle delay.
Definition: vlc_player.h:1983
@ VLC_PLAYER_ERROR_GENERIC
Definition: vlc_player.h:292
VLC_EXPORT void vlc_player_title_list_Release(vlc_player_title_list *titles)
Release of previously held title list.
Definition: title.c:38
size_t chapter_count
Number of chapters, can be 0.
Definition: vlc_player.h:966
#define VLC_PLAYER_CAP_PAUSE
Player capability: can pause.
Definition: vlc_player.h:360
VLC_EXPORT void vlc_player_SelectNextTitle(vlc_player_t *player)
Select the next title for the current media.
Definition: player.c:871
@ VLC_PLAYER_STATE_STARTED
The player is started.
Definition: vlc_player.h:258
VLC_EXPORT vlc_tick_t vlc_player_GetCategoryDelay(vlc_player_t *player, enum es_format_category_e cat)
Get the delay of an ES category for the current media.
Definition: player.c:1667
unsigned hours
Hours [0;n].
Definition: vlc_player.h:3283
VLC_EXPORT ssize_t vlc_player_GetSelectedChapterIdx(vlc_player_t *player)
Get the selected chapter index for the current media.
Definition: player.c:895
VLC_EXPORT input_item_t * vlc_player_GetCurrentMedia(vlc_player_t *player)
Get the current played media.
Definition: player.c:1043
void(* on_titles_changed)(vlc_player_t *player, vlc_player_title_list *titles, void *data)
Called when the media titles has changed.
Definition: vlc_player.h:2939
void(* on_program_list_changed)(vlc_player_t *player, enum vlc_player_list_action action, const struct vlc_player_program *prgm, void *data)
Called when a new program is added, removed or updated.
Definition: vlc_player.h:2907
VLC_EXPORT int vlc_player_aout_SetVolume(vlc_player_t *player, float volume)
Set the audio volume.
Definition: aout.c:135
VLC_EXPORT int vlc_player_Stop(vlc_player_t *player)
Stop the playback of the current media.
Definition: player.c:1185
VLC_EXPORT 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.
Definition: player.c:446
static void vlc_player_ToggleRecording(vlc_player_t *player)
Helper to toggle the recording state.
Definition: vlc_player.h:874
static input_item_t * vlc_player_HoldCurrentMedia(vlc_player_t *player)
Helper that hold the current media.
Definition: vlc_player.h:421
VLC_EXPORT void vlc_player_SetTrackCategoryEnabled(vlc_player_t *player, enum es_format_category_e cat, bool enabled)
Enable or disable a track category.
Definition: player.c:1741
VLC_EXPORT vout_thread_t ** vlc_player_vout_HoldAll(vlc_player_t *player, size_t *count)
Get and hold the list of video output.
Definition: vout.c:50
VLC_EXPORT void vlc_player_SelectProgram(vlc_player_t *player, int group_id)
Select a program from an ES group identifier.
Definition: player.c:292
@ VLC_PLAYER_STATE_PLAYING
The player is playing.
Definition: vlc_player.h:266
const char * name
Title name, always valid.
Definition: vlc_player.h:959
vlc_player_vout_action
action of vlc_player_cbs.on_vout_changed callback
Definition: vlc_player.h:2494
Player smpte timer callbacks.
Definition: vlc_player.h:3341
static size_t vlc_player_GetAudioTrackCount(vlc_player_t *player)
Helper to get the audio track count.
Definition: vlc_player.h:1421
VLC_EXPORT void vlc_player_SetRenderer(vlc_player_t *player, vlc_renderer_item_t *renderer)
Set the renderer.
Definition: player.c:1447
static int vlc_player_aout_ToggleMute(vlc_player_t *player)
Helper to toggle the mute state.
Definition: vlc_player.h:2460
VLC_EXPORT int vlc_player_Start(vlc_player_t *player)
Start the playback of the current media.
Definition: player.c:1136
vlc_tick_t length
Valid length >= VLC_TICK_0 or VLC_TICK_INVALID.
Definition: vlc_player.h:3266
void(* on_wallpaper_mode_changed)(vout_thread_t *vout, bool enabled, void *data)
Called when the player and/or vout wallpaper mode has changed.
Definition: vlc_player.h:2535
Player track structure.
Definition: vlc_player.h:1334
VLC_EXPORT vlc_object_t * vlc_player_GetV4l2Object(vlc_player_t *player)
Get the V4L2 object used to do controls.
Definition: player.c:1850
VLC_EXPORT void vlc_player_RestorePlaybackPos(vlc_player_t *player)
Restore the previous playback position of the current media.
Definition: medialib.c:294
VLC_EXPORT void vlc_player_InvalidateNextMedia(vlc_player_t *player)
Invalidate the next media.
Definition: player.c:1123
@ VLC_PLAYER_NAV_ACTIVATE
Activate the navigation item selected.
Definition: vlc_player.h:332
Viewpoints.
Definition: vlc_viewpoint.h:41
static void vlc_player_vout_ToggleWallpaperMode(vlc_player_t *player)
Helper to toggle the player wallpaper-mode state.
Definition: vlc_player.h:2679
const struct vlc_player_chapter * chapters
Array of chapters, can be NULL.
Definition: vlc_player.h:968
VLC_EXPORT void vlc_player_vout_Snapshot(vlc_player_t *player)
Take a snapshot on all vouts.
Definition: vout.c:206
VLC_EXPORT 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.
Definition: player.c:560
@ VLC_PLAYER_NAV_RIGHT
Select a navigation item on the right or move the viewpoint right.
Definition: vlc_player.h:340
static vlc_tick_t vlc_player_GetAudioDelay(vlc_player_t *player)
Helper to get the audio delay.
Definition: vlc_player.h:1963
VLC_EXPORT 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.
Definition: player.c:367
VLC_EXPORT void vlc_player_SelectTeletextPage(vlc_player_t *player, unsigned page)
Select a teletext page or do an action from a key.
Definition: player.c:754
static void vlc_player_SetTimeFast(vlc_player_t *player, vlc_tick_t time)
Helper to set the absolute time fast.
Definition: vlc_player.h:763
const char * name
Track name, always valid.
Definition: vlc_player.h:1339
VLC_EXPORT void vlc_player_ChangeRate(vlc_player_t *player, float rate)
Change the rate of the player.
Definition: player.c:1292
vlc_player_lock_type
Player lock type (normal or reentrant)
Definition: vlc_player.h:71
@ VLC_PLAYER_NAV_DOWN
Select a navigation item under or move the viewpoint down.
Definition: vlc_player.h:336
void(* on_update)(const struct vlc_player_timer_smpte_timecode *tc, void *data)
Called when a new frame is displayed.
Definition: vlc_player.h:3353
@ VLC_PLAYER_LIST_UPDATED
Definition: vlc_player.h:2725
VLC_EXPORT int vlc_player_timer_point_Interpolate(const struct vlc_player_timer_point *point, vlc_tick_t system_now, vlc_tick_t *out_ts, float *out_pos)
Interpolate the last timer value to now.
Definition: timer.c:474
VLC_EXPORT void vlc_player_vout_SetWallpaperModeEnabled(vlc_player_t *player, bool enabled)
Enable or disable the player wallpaper-mode.
Definition: vout.c:198
VLC_EXPORT void vlc_player_DisplayPosition(vlc_player_t *player)
Display the player position on the vout OSD.
Definition: player.c:1386
static const struct vlc_player_program * vlc_player_GetSelectedProgram(vlc_player_t *player)
Helper to get the current selected program.
Definition: vlc_player.h:1282
@ VLC_PLAYER_ABLOOP_B
Definition: vlc_player.h:354
@ VLC_PLAYER_ERROR_NONE
Definition: vlc_player.h:291
static int vlc_player_aout_DecrementVolume(vlc_player_t *player, int steps, float *result)
Helper to decrement the audio volume.
Definition: vlc_player.h:2421
es_format_category_e
ES Categories.
Definition: vlc_es.h:600
static void vlc_player_SelectAudioLanguage(vlc_player_t *player, const char *lang)
Helper to select the audio language.
Definition: vlc_player.h:1765
VLC_EXPORT float vlc_player_GetPosition(vlc_player_t *player)
Get the position of the current media.
Definition: player.c:1367
static void vlc_player_SetSubtitleDelay(vlc_player_t *player, vlc_tick_t delay, enum vlc_player_whence whence)
Helper to set the subtitle delay.
Definition: vlc_player.h:1992
void(* on_capabilities_changed)(vlc_player_t *player, int old_caps, int new_caps, void *data)
Called when the media capabilities has changed.
Definition: vlc_player.h:2824
void(* on_cork_changed)(vlc_player_t *player, unsigned cork_count, void *data)
Called when the player is corked.
Definition: vlc_player.h:3193
@ VLC_PLAYER_WHENCE_RELATIVE
The current position +/- the given time/position.
Definition: vlc_player.h:321
Audio output object.
Definition: vlc_aout.h:141
VLC_EXPORT vlc_es_id_t * vlc_player_GetEsIdFromVout(vlc_player_t *player, vout_thread_t *vout)
Get the ES identifier of a video output.
Definition: player.c:420
VLC_EXPORT vlc_player_aout_listener_id * vlc_player_aout_AddListener(vlc_player_t *player, const struct vlc_player_aout_cbs *cbs, void *cbs_data)
Add a listener callback for audio output events.
Definition: aout.c:50
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.
Definition: vlc_player.h:1513
VLC_EXPORT void vlc_player_SetRecordingEnabled(vlc_player_t *player, bool enabled)
Enable or disable recording for the current media.
Definition: player.c:1618
static void vlc_player_TogglePause(vlc_player_t *player)
Helper to toggle the pause state.
Definition: vlc_player.h:545
VLC_EXPORT const struct input_stats_t * vlc_player_GetStatistics(vlc_player_t *player)
Get the statistics of the current media.
Definition: player.c:1797
VLC_EXPORT void vlc_player_Unlock(vlc_player_t *player)
Unlock the player.
Definition: player.c:957
VLC_EXPORT void vlc_player_SetMediaStoppedAction(vlc_player_t *player, enum vlc_player_media_stopped_action action)
Setup an action when a media is stopped.
Definition: player.c:1203
@ VLC_PLAYER_SELECT_SIMULTANEOUS
Select multiple tracks for one category.
Definition: vlc_player.h:1322
VLC_EXPORT void vlc_player_SetAssociatedSubsFPS(vlc_player_t *player, float fps)
Set the associated subtitle FPS.
Definition: player.c:1104
static bool vlc_player_CanSeek(vlc_player_t *player)
Helper to get the seek capability.
Definition: vlc_player.h:573
Player program structure.
Definition: vlc_player.h:1174
void(* on_media_epg_changed)(vlc_player_t *player, input_item_t *media, void *data)
Called when media epg has changed.
Definition: vlc_player.h:3142
VLC_EXPORT void vlc_player_SelectTracksByStringIds(vlc_player_t *player, enum es_format_category_e cat, const char *str_ids)
Select tracks by their string identifier.
Definition: player.c:587
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.
Definition: vlc_player.h:1715
#define VLC_PLAYER_CAP_REWIND
Player capability: can seek back.
Definition: vlc_player.h:364
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.
Definition: vlc_player.h:1412
VLC_EXPORT void vlc_player_SelectNextProgram(vlc_player_t *player)
Select the next program.
Definition: player.c:342
VLC_EXPORT size_t vlc_player_GetTrackCount(vlc_player_t *player, enum es_format_category_e cat)
Get the number of tracks for an ES category.
Definition: player.c:354
VLC_EXPORT const struct vlc_player_program * vlc_player_GetProgramAt(vlc_player_t *player, size_t index)
Get the program at a specific index.
Definition: player.c:267
VLC_EXPORT void vlc_player_SeekByPos(vlc_player_t *player, float position, enum vlc_player_seek_speed speed, enum vlc_player_whence whence)
Seek the current media by position.
Definition: player.c:1398
void(* on_device_changed)(audio_output_t *aout, const char *device, void *data)
Called when the audio device has changed.
Definition: vlc_player.h:2318
void(* on_title_selection_changed)(vlc_player_t *player, const struct vlc_player_title *new_title, size_t new_idx, void *data)
Called when a new title is selected.
Definition: vlc_player.h:2955
VLC_EXPORT vlc_player_t * vlc_player_New(vlc_object_t *parent, enum vlc_player_lock_type lock_type, const struct vlc_player_media_provider *media_provider, void *media_provider_data)
Create a new player instance.
Definition: player.c:1921
VLC_EXPORT void vlc_player_vout_RemoveListener(vlc_player_t *player, vlc_player_vout_listener_id *listener_id)
Remove a vout listener callback.
Definition: vout.c:89
VLC_EXPORT int vlc_player_SetCurrentMedia(vlc_player_t *player, input_item_t *media)
Set the current media.
Definition: player.c:1000
VLC_EXPORT void vlc_player_Pause(vlc_player_t *player)
Pause the playback.
Definition: player.c:1237
VLC_EXPORT unsigned vlc_player_GetTeletextPage(vlc_player_t *player)
Get the current teletext page.
Definition: player.c:800
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:45
@ VLC_PLAYER_SELECT_EXCLUSIVE
Only one track per category is selected.
Definition: vlc_player.h:1314
static bool vlc_player_IsSubtitleEnabled(vlc_player_t *player)
Helper to check if subtitle tracks are enabled.
Definition: vlc_player.h:1852
@ VLC_PLAYER_WHENCE_ABSOLUTE
Given time/position.
Definition: vlc_player.h:319
VLC_EXPORT bool vlc_player_vout_IsFullscreen(vlc_player_t *player)
Check if the player is fullscreen.
Definition: vout.c:101
@ VLC_PLAYER_MEDIA_STOPPED_CONTINUE
Continue (or stop if there is no next media), default behavior.
Definition: vlc_player.h:98
bool drop_frame
True if the source is NTSC 29.97fps or 59.94fps DF.
Definition: vlc_player.h:3293
VLC_EXPORT vlc_tick_t vlc_player_GetLength(vlc_player_t *player)
Get the length of the current media.
Definition: player.c:1349
#define VLC_DEPRECATED
Deprecated functions or compound members annotation.
Definition: vlc_common.h:119
VLC_EXPORT const struct vlc_player_title * vlc_player_title_list_GetAt(vlc_player_title_list *titles, size_t idx)
Get the title at a given index.
Definition: title.c:164
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.
Definition: vlc_player.h:1448
VLC_EXPORT void vlc_player_CondWait(vlc_player_t *player, vlc_cond_t *cond)
Wait on a condition variable.
Definition: player.c:963
VLC_EXPORT void vlc_player_SelectTitleIdx(vlc_player_t *player, size_t index)
Select a title index for the current media.
Definition: player.c:843
VLC_EXPORT int vlc_player_GetCapabilities(vlc_player_t *player)
Get the player capabilities.
Definition: player.c:1275
VLC_EXPORT void vlc_player_vout_SetFullscreen(vlc_player_t *player, bool enabled)
Enable or disable the player fullscreen state.
Definition: vout.c:181
VLC_EXPORT void vlc_player_SelectPrevTitle(vlc_player_t *player)
Select the previous title for the current media.
Definition: player.c:883
VLC_EXPORT int vlc_player_SetCategoryDelay(vlc_player_t *player, enum es_format_category_e cat, vlc_tick_t delay, enum vlc_player_whence whence)
Set the delay of one category for the current media.
Definition: player.c:1633
static void vlc_player_SetSubtitleEnabled(vlc_player_t *player, bool enabled)
Helper to enable or disable subtitle tracks.
Definition: vlc_player.h:1843
void(* on_signal_changed)(vlc_player_t *player, float quality, float strength, void *data)
Called when the media signal has changed.
Definition: vlc_player.h:3081
@ VLC_PLAYER_VOUT_STOPPED
Definition: vlc_player.h:2497
VLC_EXPORT void vlc_player_SetStartPaused(vlc_player_t *player, bool start_paused)
Ask to start in a paused state.
Definition: player.c:1214
static void vlc_player_SetPosition(vlc_player_t *player, float position)
Helper to set the absolute position precisely.
Definition: vlc_player.h:721
vlc_tick_t system_date
System date of this record (always valid), this date can be in the future or in the past.
Definition: vlc_player.h:3272
VLC_EXPORT void vlc_player_Lock(vlc_player_t *player)
Lock the player.
Definition: player.c:941
unsigned flags
Bit flag of VLC_PLAYER_TITLE_MENU and VLC_PLAYER_TITLE_INTERACTIVE.
Definition: vlc_player.h:964
static void vlc_player_SetTime(vlc_player_t *player, vlc_tick_t time)
Helper to set the absolute time precisely.
Definition: vlc_player.h:753
VLC_EXPORT bool vlc_player_HasTeletextMenu(vlc_player_t *player)
Check if the media has a teletext menu.
Definition: player.c:781
VLC_EXPORT void vlc_player_program_Delete(struct vlc_player_program *prgm)
Delete a duplicated program.
Definition: track.c:82
VLC_EXPORT bool vlc_player_IsTeletextTransparent(vlc_player_t *player)
Check if teletext is transparent.
Definition: player.c:807
void(* on_teletext_transparency_changed)(vlc_player_t *player, bool enabled, void *data)
Called when the teletext transparency has changed.
Definition: vlc_player.h:3021
VLC_EXPORT size_t vlc_player_GetProgramCount(vlc_player_t *player)
Get the number of programs.
Definition: player.c:259
@ VLC_PLAYER_NAV_LEFT
Select a navigation item on the left or move the viewpoint left.
Definition: vlc_player.h:338
vlc_player_abloop
A to B loop state.
Definition: vlc_player.h:350
@ VLC_PLAYER_RESTORE_PLAYBACK_POS_ALWAYS
Definition: vlc_player.h:381
vlc_es_id_t * es_id
Id used for any player actions, like vlc_player_SelectEsId()
Definition: vlc_player.h:1337
static bool vlc_player_IsStarted(vlc_player_t *player)
Helper to get the started state.
Definition: vlc_player.h:519
@ VLC_PLAYER_STATE_STOPPING
The player is stopping.
Definition: vlc_player.h:281
@ VLC_PLAYER_SEEK_PRECISE
Do a precise seek.
Definition: vlc_player.h:304
void(* on_teletext_page_changed)(vlc_player_t *player, unsigned new_page, void *data)
Called when the teletext page has changed.
Definition: vlc_player.h:3009
@ VLC_PLAYER_NAV_MENU
Activate disc Root Menu.
Definition: vlc_player.h:344
double rate
Rate of the player.
Definition: vlc_player.h:3261
vlc_player_seek_speed
Seek speed type.
Definition: vlc_player.h:301
VLC_EXPORT float vlc_player_aout_GetVolume(vlc_player_t *player)
Get the audio volume.
Definition: aout.c:123
Player chapter structure.
Definition: vlc_player.h:942
VLC_EXPORT void vlc_player_SelectNextTrack(vlc_player_t *player, enum es_format_category_e cat)
Select the next track.
Definition: player.c:662
VLC_EXPORT ssize_t vlc_player_GetSelectedTitleIdx(vlc_player_t *player)
Get the selected title index for the current media.
Definition: player.c:821
VLC_EXPORT bool vlc_player_vout_IsWallpaperModeEnabled(vlc_player_t *player)
Check if the player has wallpaper-mode enaled.
Definition: vout.c:189
VLC_EXPORT float vlc_player_GetAssociatedSubsFPS(vlc_player_t *player)
Get the associated subtitle FPS.
Definition: player.c:1116
static void vlc_player_SetVideoEnabled(vlc_player_t *player, bool enabled)
Helper to enable or disable video tracks.
Definition: vlc_player.h:1807
vlc_player_whence
Player seek/delay directive.
Definition: vlc_player.h:316
Opaque structure representing an ES (Elementary Stream) track.
Definition: es_out.c:94
@ AUDIO_ES
Definition: vlc_es.h:604
@ VLC_PLAYER_LIST_REMOVED
Definition: vlc_player.h:2724
static void vlc_player_JumpPos(vlc_player_t *player, float jumppos)
Helper to jump the position precisely.
Definition: vlc_player.h:741
void(* on_track_selection_changed)(vlc_player_t *player, vlc_es_id_t *unselected_id, vlc_es_id_t *selected_id, void *data)
Called when a new track is selected and/or unselected.
Definition: vlc_player.h:2881
void(* on_statistics_changed)(vlc_player_t *player, const struct input_stats_t *stats, void *data)
Called when the player has new statisics.
Definition: vlc_player.h:3094
unsigned seconds
Seconds [0;59].
Definition: vlc_player.h:3287
static bool vlc_player_CanRewind(vlc_player_t *player)
Helper to get the rewindable capability.
Definition: vlc_player.h:600
vlc_player_list_action
Action of vlc_player_cbs.on_track_list_changed, vlc_player_cbs.on_program_list_changed callbacks.
Definition: vlc_player.h:2721
void(* on_associated_subs_fps_changed)(vlc_player_t *player, float subs_fps, void *data)
Called when associated subtitle has changed.
Definition: vlc_player.h:3046
void(* on_fullscreen_changed)(vout_thread_t *vout, bool enabled, void *data)
Called when the player and/or vout fullscreen state has changed.
Definition: vlc_player.h:2523
VLC_EXPORT void vlc_player_NextVideoFrame(vlc_player_t *player)
Pause and display the next video frame.
Definition: player.c:1249
static const struct vlc_player_title * vlc_player_GetSelectedTitle(vlc_player_t *player)
Helper to get the current selected title.
Definition: vlc_player.h:1038
VLC object common members.
Definition: vlc_objects.h:43
VLC_EXPORT int vlc_player_AddAssociatedMedia(vlc_player_t *player, enum es_format_category_e cat, const char *uri, bool select, bool notify, bool check_ext)
Add an associated (or external) media to the current media.
Definition: player.c:1051
void(* on_mute_changed)(audio_output_t *aout, bool new_muted, void *data)
Called when the mute state has changed.
Definition: vlc_player.h:2308
VLC_EXPORT void vlc_player_DecrementRate(vlc_player_t *player)
Decrement the rate of the player (Slower)
Definition: player.c:1343
vlc_tick_t length
Length of the title.
Definition: vlc_player.h:961
void(* on_length_changed)(vlc_player_t *player, vlc_tick_t new_length, void *data)
Called when the media length has changed.
Definition: vlc_player.h:2851
@ VLC_PLAYER_MEDIA_STOPPED_EXIT
Exit VLC.
Definition: vlc_player.h:104
VLC_EXPORT void vlc_player_aout_RemoveListener(vlc_player_t *player, vlc_player_aout_listener_id *listener_id)
Remove a aout listener callback.
Definition: aout.c:71
void(* on_chapter_selection_changed)(vlc_player_t *player, const struct vlc_player_title *title, size_t title_idx, const struct vlc_player_chapter *new_chapter, size_t new_chapter_idx, void *data)
Called when a new chapter is selected.
Definition: vlc_player.h:2973
@ VLC_PLAYER_ABLOOP_A
Definition: vlc_player.h:353
VLC_EXPORT vlc_player_timer_id * vlc_player_AddTimer(vlc_player_t *player, vlc_tick_t min_period, const struct vlc_player_timer_cbs *cbs, void *data)
Add a timer in order to get times updates.
Definition: timer.c:418
VLC_EXPORT void vlc_player_SetPauseOnCork(vlc_player_t *player, bool enabled)
Enable or disable pause on cork event.
Definition: player.c:1805
void(* on_media_stopped_action_changed)(vlc_player_t *player, enum vlc_player_media_stopped_action new_action, void *data)
Called when media stopped action has changed.
Definition: vlc_player.h:3122
VLC_EXPORT bool vlc_player_IsTeletextEnabled(vlc_player_t *player)
Check if teletext is enabled.
Definition: player.c:788
@ VLC_PLAYER_SEEK_FAST
Do a fast seek.
Definition: vlc_player.h:306
VLC_EXPORT size_t vlc_player_title_list_GetCount(vlc_player_title_list *titles)
Get the number of title of a list.
Definition: title.c:171
@ VLC_PLAYER_STATE_PAUSED
The player is paused.
Definition: vlc_player.h:273
void(* on_buffering_changed)(vlc_player_t *player, float new_buffering, void *data)
Called when the player buffering (or cache) has changed.
Definition: vlc_player.h:2798
VLC_EXPORT bool vlc_player_IsRecording(vlc_player_t *player)
Check if the playing is recording.
Definition: player.c:1610
VLC_EXPORT int vlc_player_GetSignal(vlc_player_t *player, float *quality, float *strength)
Get the signal quality and strength of the current media.
Definition: player.c:1782
VLC_EXPORT 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.
Definition: player.c:397
void(* on_renderer_changed)(vlc_player_t *player, vlc_renderer_item_t *new_item, void *data)
Called when a new renderer item is set.
Definition: vlc_player.h:3058
const char * name
Chapter name, always valid.
Definition: vlc_player.h:945
vlc_tick_t ts
Valid time >= VLC_TICK_0 or VLC_TICK_INVALID, subtract this time with VLC_TICK_0 to get the original ...
Definition: vlc_player.h:3264
@ VLC_PLAYER_ABLOOP_NONE
Definition: vlc_player.h:352
vlc_player_restore_playback_pos
Definition: vlc_player.h:377
@ VLC_PLAYER_VOUT_STARTED
Definition: vlc_player.h:2496
static bool vlc_player_IsAudioEnabled(vlc_player_t *player)
Helper to check if audio tracks are enabled.
Definition: vlc_player.h:1834
bool selected
True if the track is selected.
Definition: vlc_player.h:1343
const char name[16]
Definition: httpd.c:1268
Definition: renderer_discovery.c:34
vlc_player_state
State of the player.
Definition: vlc_player.h:243
VLC_EXPORT void vlc_player_RemoveListener(vlc_player_t *player, vlc_player_listener_id *listener_id)
Remove a listener callback.
Definition: player.c:989
VLC_EXPORT void vlc_player_UnselectEsId(vlc_player_t *player, vlc_es_id_t *es_id)
Unselect a track from an ES identifier.
Definition: player.c:676
Condition variable.
Definition: vlc_threads.h:349
void(* on_state_changed)(vlc_player_t *player, enum vlc_player_state new_state, void *data)
Called when the player state has changed.
Definition: vlc_player.h:2771
vlc_vout_order
vout or spu_channel order
Definition: vlc_vout.h:70
#define VLC_PLAYER_CAP_CHANGE_RATE
Player capability: can change the rate.
Definition: vlc_player.h:362
static void vlc_player_UnselectTrack(vlc_player_t *player, const struct vlc_player_track *track)
Helper to unselect a track.
Definition: vlc_player.h:1664
VLC_EXPORT int vlc_player_aout_Mute(vlc_player_t *player, bool mute)
Mute or unmute the audio output.
Definition: aout.c:171
@ SPU_ES
Definition: vlc_es.h:605
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.
Definition: vlc_player.h:1577
VLC_EXPORT void vlc_player_SetTeletextTransparency(vlc_player_t *player, bool enabled)
Enable or disable teletext transparency.
Definition: player.c:767
void(* on_track_delay_changed)(vlc_player_t *player, vlc_es_id_t *es_id, vlc_tick_t delay, void *data)
Called when a track delay has changed.
Definition: vlc_player.h:2892
VLC_EXPORT unsigned vlc_player_GetSubtitleTextScale(vlc_player_t *player)
Get the subtitle text scaling factor.
Definition: player.c:1776
VLC_EXPORT bool vlc_player_IsTrackCategoryEnabled(vlc_player_t *player, enum es_format_category_e cat)
Check if a track category is enabled.
Definition: player.c:1761
VLC_EXPORT vlc_player_timer_id * vlc_player_AddSmpteTimer(vlc_player_t *player, const struct vlc_player_timer_smpte_cbs *cbs, void *data)
Add a smpte timer in order to get accurate video frame updates.
Definition: timer.c:440
vlc_tick_t time
Position of this chapter.
Definition: vlc_player.h:947
Player smpte timecode.
Definition: vlc_player.h:3280
VLC_EXPORT void vlc_player_Delete(vlc_player_t *player)
Delete a player instance.
Definition: player.c:1873
VLC_EXPORT int vlc_player_aout_IncrementVolume(vlc_player_t *player, int steps, float *result)
Increment the audio volume.
Definition: aout.c:147
unsigned frame_resolution
Maximum number of digits needed to display the frame number.
Definition: vlc_player.h:3291
void(* on_position_changed)(vlc_player_t *player, vlc_tick_t new_time, float new_pos, void *data)
Called when the player position has changed.
Definition: vlc_player.h:2837
VLC_EXPORT int vlc_player_SetAtoBLoop(vlc_player_t *player, enum vlc_player_abloop abloop)
Enable A to B loop of the current media.
Definition: player.c:1474
static void vlc_player_ToggleSubtitle(vlc_player_t *player)
Helper to toggle subtitles.
Definition: vlc_player.h:1861
@ VLC_PLAYER_NAV_POPUP
Activate the popup Menu (for BD)
Definition: vlc_player.h:342
vlc_player_nav
Menu (VCD/DVD/BD) and viewpoint navigations.
Definition: vlc_player.h:329
VLC_EXPORT void vlc_player_SelectChapter(vlc_player_t *player, const struct vlc_player_title *title, size_t chapter_idx)
Select a chapter for the current media.
Definition: player.c:861
VLC_EXPORT float vlc_player_GetRate(vlc_player_t *player)
Get the rate of the player.
Definition: player.c:1282
VLC_EXPORT void vlc_player_SelectPrevChapter(vlc_player_t *player)
Select the previous chapter for the current media.
Definition: player.c:929
VLC_EXPORT void vlc_player_SelectChapterIdx(vlc_player_t *player, size_t index)
Select a chapter index for the current media.
Definition: player.c:905
VLC_EXPORT audio_output_t * vlc_player_aout_Hold(vlc_player_t *player)
Get the audio output.
Definition: aout.c:44
void(* on_media_meta_changed)(vlc_player_t *player, input_item_t *media, void *data)
Called when the media meta has changed.
Definition: vlc_player.h:3132
VLC_EXPORT 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.
Definition: player.c:405
Video output thread descriptor.
Definition: vlc_vout.h:55
VLC_EXPORT void vlc_player_aout_Reset(vlc_player_t *player)
Reset the main audio output.
Definition: aout.c:242
VLC_EXPORT void vlc_player_SelectNextChapter(vlc_player_t *player)
Select the next chapter for the current media.
Definition: player.c:917
es_format_t fmt
Es format.
Definition: vlc_player.h:1341
void(* on_category_delay_changed)(vlc_player_t *player, enum es_format_category_e cat, vlc_tick_t new_delay, void *data)
Called when the player category delay has changed for the current media.
Definition: vlc_player.h:3034
void(* on_atobloop_changed)(vlc_player_t *player, enum vlc_player_abloop new_state, vlc_tick_t time, float pos, void *data)
Called when the A to B loop has changed.
Definition: vlc_player.h:3109
@ VLC_PLAYER_STATE_STOPPED
The player is stopped.
Definition: vlc_player.h:251
VLC_EXPORT void vlc_player_SelectPrevProgram(vlc_player_t *player)
Select the previous program.
Definition: player.c:348
void(* on_program_selection_changed)(vlc_player_t *player, int unselected_id, int selected_id, void *data)
Called when a new program is selected and/or unselected.
Definition: vlc_player.h:2922
void(* on_current_media_changed)(vlc_player_t *player, input_item_t *new_media, void *data)
Called when the current media has changed.
Definition: vlc_player.h:2759
Player callbacks.
Definition: vlc_player.h:2742
static void vlc_player_JumpTime(vlc_player_t *player, vlc_tick_t jumptime)
Helper to jump the time precisely.
Definition: vlc_player.h:773
Player timer point.
Definition: vlc_player.h:3256
static void vlc_player_SetAudioEnabled(vlc_player_t *player, bool enabled)
Helper to enable or disable audio tracks.
Definition: vlc_player.h:1825
void(* on_teletext_enabled_changed)(vlc_player_t *player, bool enabled, void *data)
Called when teletext is enabled or disabled.
Definition: vlc_player.h:2997
unsigned frames
Frame number [0;n].
Definition: vlc_player.h:3289
void(* on_track_list_changed)(vlc_player_t *player, enum vlc_player_list_action action, const struct vlc_player_track *track, void *data)
Called when a track is added, removed, or updated.
Definition: vlc_player.h:2866
Player timer callbacks.
Definition: vlc_player.h:3301
static bool vlc_player_CanPause(vlc_player_t *player)
Helper to get the pause capability.
Definition: vlc_player.h:582
void(* on_discontinuity)(vlc_tick_t system_date, void *data)
The player is paused or a discontinuity occurred, likely caused by seek from the user or because the ...
Definition: vlc_player.h:3333
VLC_EXPORT 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.
Definition: vout.c:68
VLC_EXPORT vlc_tick_t vlc_player_GetEsIdDelay(vlc_player_t *player, vlc_es_id_t *es_id)
Get the delay of a track.
Definition: player.c:1720
VLC_EXPORT vout_thread_t * vlc_player_vout_Hold(vlc_player_t *player)
Get and hold the main video output.
Definition: vout.c:43
static void vlc_player_SetPositionFast(vlc_player_t *player, float position)
Helper to set the absolute position fast.
Definition: vlc_player.h:731
@ VLC_PLAYER_LOCK_REENTRANT
Reentrant lock.
Definition: vlc_player.h:88
VLC_EXPORT void vlc_player_SetTeletextEnabled(vlc_player_t *player, bool enabled)
Enable or disable teletext.
Definition: player.c:741
#define VLC_PLAYER_CAP_SEEK
Player capability: can seek.
Definition: vlc_player.h:358
static void vlc_player_UnselectTrackCategory(vlc_player_t *player, enum es_format_category_e cat)
Helper to unselect all tracks from an ES category.
Definition: vlc_player.h:1674
VLC_EXPORT int vlc_player_aout_EnableFilter(vlc_player_t *player, const char *name, bool add)
Enable or disable an audio filter.
Definition: aout.c:183
VLC_EXPORT void vlc_player_Resume(vlc_player_t *player)
Resume the playback from a pause.
Definition: player.c:1243
VLC_EXPORT void vlc_player_RemoveTimer(vlc_player_t *player, vlc_player_timer_id *timer)
Remove a player timer.
Definition: timer.c:462
VLC_EXPORT vlc_renderer_item_t * vlc_player_GetRenderer(vlc_player_t *player)
Get the renderer.
Definition: player.c:1467
VLC_EXPORT enum vlc_player_error vlc_player_GetError(vlc_player_t *player)
Get the error state of the player.
Definition: player.c:1268
void(* on_recording_changed)(vlc_player_t *player, bool recording, void *data)
Called when the player recording state has changed.
Definition: vlc_player.h:3070
static void vlc_player_RestartTrack(vlc_player_t *player, const struct vlc_player_track *track)
Helper to restart a track.
Definition: vlc_player.h:1705
Audio loudness measurement.
Definition: vlc_aout.h:549
VLC_EXPORT void vlc_player_UpdateViewpoint(vlc_player_t *player, const vlc_viewpoint_t *viewpoint, enum vlc_player_whence whence)
Update the viewpoint.
Definition: player.c:1592
static bool vlc_player_IsPaused(vlc_player_t *player)
Helper to get the paused state.
Definition: vlc_player.h:536