VLC 4.0.0-dev
Loading...
Searching...
No Matches
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.
 
#define VLC_PLAYER_TITLE_INTERACTIVE   0x02
 vlc_player_title.flags: The title is interactive.
 
#define VLC_PLAYER_TITLE_MAIN   0x04
 vlc_player_title.flags: The title is the main one.
 

Typedefs

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

Functions

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

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_MAIN

#define VLC_PLAYER_TITLE_MAIN   0x04

vlc_player_title.flags: The title is the main one.

◆ 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()

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()

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_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()

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()

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_chapter_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()

void vlc_player_SelectNextChapter ( vlc_player_t player)

◆ vlc_player_SelectNextTitle()

void vlc_player_SelectNextTitle ( vlc_player_t player)

◆ vlc_player_SelectPrevChapter()

void vlc_player_SelectPrevChapter ( vlc_player_t player)

◆ vlc_player_SelectPrevTitle()

void vlc_player_SelectPrevTitle ( vlc_player_t player)

◆ vlc_player_SelectTitle()

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()

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()

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
titlesa valid title list
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()

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_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()