VLC  4.0.0-dev
Data Structures | Macros | Typedefs | Functions
Title and chapter control
Collaboration diagram for Title and chapter control:

Data Structures

struct  vlc_player_chapter
 Player chapter structure. More...
 
struct  vlc_player_title
 Player title structure. More...
 

Macros

#define VLC_PLAYER_TITLE_MENU   0x01
 vlc_player_title.flags: The title is a menu. More...
 
#define VLC_PLAYER_TITLE_INTERACTIVE   0x02
 vlc_player_title.flags: The title is interactive. More...
 

Typedefs

typedef struct vlc_player_title_list vlc_player_title_list
 Opaque structure representing a list of vlc_player_title. More...
 

Functions

VLC_EXPORT vlc_player_title_listvlc_player_title_list_Hold (vlc_player_title_list *titles)
 Hold the title list of the player. More...
 
VLC_EXPORT void vlc_player_title_list_Release (vlc_player_title_list *titles)
 Release of previously held title list. More...
 
VLC_EXPORT size_t vlc_player_title_list_GetCount (vlc_player_title_list *titles)
 Get the number of title of a list. More...
 
VLC_EXPORT const struct vlc_player_titlevlc_player_title_list_GetAt (vlc_player_title_list *titles, size_t idx)
 Get the title at a given index. More...
 
VLC_EXPORT vlc_player_title_listvlc_player_GetTitleList (vlc_player_t *player)
 Get the title list of the current media. More...
 
VLC_EXPORT ssize_t vlc_player_GetSelectedTitleIdx (vlc_player_t *player)
 Get the selected title index for the current media. More...
 
static const struct vlc_player_titlevlc_player_GetSelectedTitle (vlc_player_t *player)
 Helper to get the current selected title. More...
 
VLC_EXPORT void vlc_player_SelectTitleIdx (vlc_player_t *player, size_t index)
 Select a title index for the current media. More...
 
VLC_EXPORT void vlc_player_SelectTitle (vlc_player_t *player, const struct vlc_player_title *title)
 Select a title for the current media. More...
 
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. More...
 
VLC_EXPORT void vlc_player_SelectNextTitle (vlc_player_t *player)
 Select the next title for the current media. More...
 
VLC_EXPORT void vlc_player_SelectPrevTitle (vlc_player_t *player)
 Select the previous title for the current media. More...
 
VLC_EXPORT ssize_t vlc_player_GetSelectedChapterIdx (vlc_player_t *player)
 Get the selected chapter index for the current media. More...
 
static const struct vlc_player_chaptervlc_player_GetSelectedChapter (vlc_player_t *player)
 Helper to get the current selected chapter. More...
 
VLC_EXPORT void vlc_player_SelectChapterIdx (vlc_player_t *player, size_t index)
 Select a chapter index for the current media. More...
 
VLC_EXPORT void vlc_player_SelectNextChapter (vlc_player_t *player)
 Select the next chapter for the current media. More...
 
VLC_EXPORT void vlc_player_SelectPrevChapter (vlc_player_t *player)
 Select the previous chapter for the current media. More...
 

Detailed Description

Macro Definition Documentation

◆ VLC_PLAYER_TITLE_INTERACTIVE

#define VLC_PLAYER_TITLE_INTERACTIVE   0x02

vlc_player_title.flags: The title is interactive.

◆ VLC_PLAYER_TITLE_MENU

#define VLC_PLAYER_TITLE_MENU   0x01

vlc_player_title.flags: The title is a menu.

Typedef Documentation

◆ vlc_player_title_list

Function Documentation

◆ vlc_player_GetSelectedChapter()

static const struct vlc_player_chapter* vlc_player_GetSelectedChapter ( vlc_player_t player)
inlinestatic

◆ vlc_player_GetSelectedChapterIdx()

VLC_EXPORT ssize_t vlc_player_GetSelectedChapterIdx ( vlc_player_t player)

Get the selected chapter index for the current media.

See also
vlc_player_cbs.on_chapter_selection_changed
Parameters
playerlocked player instance

References vlc_player_input::chapter_selected, vlc_player_input::player, and vlc_player_get_input_locked().

Referenced by vlc_player_GetSelectedChapter(), and vlc_strfplayer().

◆ vlc_player_GetSelectedTitle()

static const struct vlc_player_title* vlc_player_GetSelectedTitle ( vlc_player_t player)
inlinestatic

Helper to get the current selected title.

References vlc_player_GetSelectedTitleIdx(), vlc_player_GetTitleList(), and vlc_player_title_list_GetAt().

Referenced by vlc_player_GetSelectedChapter().

◆ vlc_player_GetSelectedTitleIdx()

VLC_EXPORT ssize_t vlc_player_GetSelectedTitleIdx ( vlc_player_t player)

Get the selected title index for the current media.

See also
vlc_player_cbs.on_title_selection_changed
Parameters
playerlocked player instance

References vlc_player_input::player, vlc_player_input::title_selected, and vlc_player_get_input_locked().

Referenced by vlc_player_GetSelectedTitle(), vlc_player_SelectChapter(), and vlc_strfplayer().

◆ vlc_player_GetTitleList()

VLC_EXPORT vlc_player_title_list* vlc_player_GetTitleList ( vlc_player_t player)

Get the title list of the current media.

See also
vlc_player_cbs.on_titles_changed
Parameters
playerlocked player instance

References vlc_player_input::player, vlc_player_input::titles, and vlc_player_get_input_locked().

Referenced by vlc_player_GetSelectedTitle().

◆ vlc_player_SelectChapter()

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.

Note
A successful call will trigger the vlc_player_cbs.on_chapter_selection_changed event.
Parameters
playerlocked player instance
titlethe selected title
chapter_idxindex from vlc_player_title.chapters

References vlc_player_input::player, vlc_player_GetSelectedTitleIdx(), vlc_player_GetTitleIdx(), and vlc_player_SelectChapterIdx().

◆ vlc_player_SelectChapterIdx()

VLC_EXPORT void vlc_player_SelectChapterIdx ( vlc_player_t player,
size_t  index 
)

Select a chapter index for the current media.

Note
A successful call will trigger the vlc_player_cbs.on_chaper_selection_changed event.
See also
vlc_player_title.chapters
Parameters
playerlocked player instance
indexvalid index in the range [0;vlc_player_title.chapter_count[

References _, INPUT_CONTROL_SET_SEEKPOINT, input_ControlPushHelper(), vlc_player_input::player, vlc_player_input::thread, vlc_player_get_input_locked(), vlc_player_osd_Message(), and VLC_SUCCESS.

Referenced by vlc_player_SelectChapter().

◆ vlc_player_SelectNextChapter()

VLC_EXPORT void vlc_player_SelectNextChapter ( vlc_player_t player)

◆ vlc_player_SelectNextTitle()

VLC_EXPORT void vlc_player_SelectNextTitle ( vlc_player_t player)

◆ vlc_player_SelectPrevChapter()

VLC_EXPORT void vlc_player_SelectPrevChapter ( vlc_player_t player)

◆ vlc_player_SelectPrevTitle()

VLC_EXPORT void vlc_player_SelectPrevTitle ( vlc_player_t player)

◆ vlc_player_SelectTitle()

VLC_EXPORT void vlc_player_SelectTitle ( vlc_player_t player,
const struct vlc_player_title title 
)

Select a title for the current media.

Note
A successful call will trigger the vlc_player_cbs.on_title_selection_changed event.
See also
vlc_player_title_list_GetAt()
vlc_player_title_list_GetCount()
Parameters
playerlocked player instance
titlea valid title coming from the vlc_player_title_list

References vlc_player_input::player, vlc_player_GetTitleIdx(), and vlc_player_SelectTitleIdx().

◆ vlc_player_SelectTitleIdx()

VLC_EXPORT void vlc_player_SelectTitleIdx ( vlc_player_t player,
size_t  index 
)

Select a title index for the current media.

Note
A successful call will trigger the vlc_player_cbs.on_title_selection_changed event.
See also
vlc_player_title_list_GetAt()
vlc_player_title_list_GetCount()
Parameters
playerlocked player instance
indexvalid index in the range [0;count[

References INPUT_CONTROL_SET_TITLE, input_ControlPushHelper(), vlc_player_input::player, vlc_player_input::thread, and vlc_player_get_input_locked().

Referenced by vlc_player_input_HandleTitleEvent(), and vlc_player_SelectTitle().

◆ vlc_player_title_list_GetAt()

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.

Parameters
idxindex in the range [0; count[
Returns
a valid title (can't be NULL)

References vlc_player_title_list::array, and count.

Referenced by vlc_player_GetSelectedTitle().

◆ vlc_player_title_list_GetCount()

VLC_EXPORT size_t vlc_player_title_list_GetCount ( vlc_player_title_list titles)

Get the number of title of a list.

References vlc_player_title_list::count.

◆ vlc_player_title_list_Hold()

VLC_EXPORT vlc_player_title_list* vlc_player_title_list_Hold ( vlc_player_title_list titles)

Hold the title list of the player.

This function can be used to pass this title list from a callback to an other thread.

See also
vlc_player_cbs.on_titles_changed
Returns
the same instance

References vlc_player_title_list::rc, and vlc_atomic_rc_inc().

◆ vlc_player_title_list_Release()

VLC_EXPORT void vlc_player_title_list_Release ( vlc_player_title_list titles)