VLC  4.0.0-dev
Macros | Functions | Variables
player.c File Reference
Include dependency graph for player.c:

Macros

#define vlc_player_foreach_inputs(it)    for (struct vlc_player_input *it = player->input; it != NULL; it = NULL)
 
#define VAR_CREATE(var, flag)
 

Functions

void vlc_player_PrepareNextMedia (vlc_player_t *player)
 
int vlc_player_OpenNextMedia (vlc_player_t *player)
 
static void vlc_player_CancelWaitError (vlc_player_t *player)
 
static bool vlc_list_HasInput (struct vlc_list *list, struct vlc_player_input *input)
 
static void vlc_player_destructor_AddInput (vlc_player_t *player, struct vlc_player_input *input)
 
void vlc_player_destructor_AddStoppingInput (vlc_player_t *player, struct vlc_player_input *input)
 
void vlc_player_destructor_AddJoinableInput (vlc_player_t *player, struct vlc_player_input *input)
 
static bool vlc_player_destructor_IsEmpty (vlc_player_t *player)
 
static void * vlc_player_destructor_Thread (void *data)
 
size_t vlc_player_GetProgramCount (vlc_player_t *player)
 Get the number of programs. More...
 
const struct vlc_player_programvlc_player_GetProgramAt (vlc_player_t *player, size_t index)
 Get the program at a specific index. More...
 
const struct vlc_player_programvlc_player_GetProgram (vlc_player_t *player, int id)
 Get a program from an ES group identifier. More...
 
void vlc_player_SelectProgram (vlc_player_t *player, int id)
 Select a program from an ES group identifier. More...
 
static void vlc_player_CycleProgram (vlc_player_t *player, bool next)
 
void vlc_player_SelectNextProgram (vlc_player_t *player)
 Select the next program. More...
 
void vlc_player_SelectPrevProgram (vlc_player_t *player)
 Select the previous program. 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_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. More...
 
static struct vlc_player_track_privvlc_player_GetPrivTrack (vlc_player_t *player, vlc_es_id_t *id)
 
const struct vlc_player_trackvlc_player_GetTrack (vlc_player_t *player, vlc_es_id_t *id)
 Get a track from an ES identifier. More...
 
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. More...
 
vlc_es_id_tvlc_player_GetEsIdFromVout (vlc_player_t *player, vout_thread_t *vout)
 Get the ES identifier of a video output. 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...
 
static vlc_es_id_t ** vlc_player_GetEsIdList (vlc_player_t *player, const enum es_format_category_e cat, vlc_es_id_t *id)
 
unsigned vlc_player_SelectEsId (vlc_player_t *player, vlc_es_id_t *id, enum vlc_player_select_policy policy)
 Select a track from an ES identifier. 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...
 
static void vlc_player_CycleTrack (vlc_player_t *player, enum es_format_category_e cat, bool next)
 
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 *id)
 Unselect a track from an ES identifier. More...
 
void vlc_player_RestartEsId (vlc_player_t *player, vlc_es_id_t *id)
 Restart a track from an ES identifier. 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...
 
void vlc_player_SetTeletextEnabled (vlc_player_t *player, bool enabled)
 Enable or disable teletext. More...
 
void vlc_player_SelectTeletextPage (vlc_player_t *player, unsigned page)
 Select a teletext page or do an action from a key. More...
 
void vlc_player_SetTeletextTransparency (vlc_player_t *player, bool enabled)
 Enable or disable teletext transparency. More...
 
bool vlc_player_HasTeletextMenu (vlc_player_t *player)
 Check if the media has a teletext menu. More...
 
bool vlc_player_IsTeletextEnabled (vlc_player_t *player)
 Check if teletext is enabled. More...
 
unsigned vlc_player_GetTeletextPage (vlc_player_t *player)
 Get the current teletext page. More...
 
bool vlc_player_IsTeletextTransparent (vlc_player_t *player)
 Check if teletext is transparent. More...
 
struct vlc_player_title_listvlc_player_GetTitleList (vlc_player_t *player)
 Get the title list of the current media. More...
 
ssize_t vlc_player_GetSelectedTitleIdx (vlc_player_t *player)
 Get the selected title index for the current media. More...
 
static ssize_t vlc_player_GetTitleIdx (vlc_player_t *player, const struct vlc_player_title *title)
 
void vlc_player_SelectTitleIdx (vlc_player_t *player, size_t index)
 Select a title index for the current media. More...
 
void vlc_player_SelectTitle (vlc_player_t *player, const struct vlc_player_title *title)
 Select a title for the current media. More...
 
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...
 
void vlc_player_SelectNextTitle (vlc_player_t *player)
 Select the next title for the current media. More...
 
void vlc_player_SelectPrevTitle (vlc_player_t *player)
 Select the previous title for the current media. More...
 
ssize_t vlc_player_GetSelectedChapterIdx (vlc_player_t *player)
 Get the selected chapter index for the current media. More...
 
void vlc_player_SelectChapterIdx (vlc_player_t *player, size_t index)
 Select a chapter index for the current media. More...
 
void vlc_player_SelectNextChapter (vlc_player_t *player)
 Select the next chapter for the current media. More...
 
void vlc_player_SelectPrevChapter (vlc_player_t *player)
 Select the previous chapter for the current media. More...
 
void vlc_player_Lock (vlc_player_t *player)
 Lock the player. More...
 
void vlc_player_Unlock (vlc_player_t *player)
 Unlock the player. More...
 
void vlc_player_CondWait (vlc_player_t *player, vlc_cond_t *cond)
 Wait on a condition variable. More...
 
vlc_player_listener_idvlc_player_AddListener (vlc_player_t *player, const struct vlc_player_cbs *cbs, void *cbs_data)
 Add a listener callback. More...
 
void vlc_player_RemoveListener (vlc_player_t *player, vlc_player_listener_id *id)
 Remove a listener callback. More...
 
int vlc_player_SetCurrentMedia (vlc_player_t *player, input_item_t *media)
 Set the current media. More...
 
input_item_tvlc_player_GetCurrentMedia (vlc_player_t *player)
 Get the current played media. More...
 
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. More...
 
void vlc_player_SetAssociatedSubsFPS (vlc_player_t *player, float fps)
 Set the associated subtitle FPS. More...
 
float vlc_player_GetAssociatedSubsFPS (vlc_player_t *player)
 Get the associated subtitle FPS. More...
 
void vlc_player_InvalidateNextMedia (vlc_player_t *player)
 Invalidate the next media. More...
 
int vlc_player_Start (vlc_player_t *player)
 Start the playback of the current media. More...
 
int vlc_player_Stop (vlc_player_t *player)
 Stop the playback of the current media. More...
 
void vlc_player_SetMediaStoppedAction (vlc_player_t *player, enum vlc_player_media_stopped_action action)
 Setup an action when a media is stopped. More...
 
void vlc_player_SetStartPaused (vlc_player_t *player, bool start_paused)
 Ask to start in a paused state. More...
 
static void vlc_player_SetPause (vlc_player_t *player, bool pause)
 
void vlc_player_Pause (vlc_player_t *player)
 Pause the playback. More...
 
void vlc_player_Resume (vlc_player_t *player)
 Resume the playback from a pause. More...
 
void vlc_player_NextVideoFrame (vlc_player_t *player)
 Pause and display the next video frame. More...
 
enum vlc_player_state vlc_player_GetState (vlc_player_t *player)
 Get the state of the player. More...
 
enum vlc_player_error vlc_player_GetError (vlc_player_t *player)
 Get the error state of the player. More...
 
int vlc_player_GetCapabilities (vlc_player_t *player)
 Get the player capabilities. More...
 
float vlc_player_GetRate (vlc_player_t *player)
 Get the rate of the player. More...
 
void vlc_player_ChangeRate (vlc_player_t *player, float rate)
 Change the rate of the player. More...
 
static void vlc_player_ChangeRateOffset (vlc_player_t *player, bool increment)
 
void vlc_player_IncrementRate (vlc_player_t *player)
 Increment the rate of the player (faster) More...
 
void vlc_player_DecrementRate (vlc_player_t *player)
 Decrement the rate of the player (Slower) More...
 
vlc_tick_t vlc_player_GetLength (vlc_player_t *player)
 Get the length of the current media. More...
 
vlc_tick_t vlc_player_GetTime (vlc_player_t *player)
 Get the time of the current media. More...
 
float vlc_player_GetPosition (vlc_player_t *player)
 Get the position of the current media. More...
 
static void vlc_player_assert_seek_params (enum vlc_player_seek_speed speed, enum vlc_player_whence whence)
 
void vlc_player_DisplayPosition (vlc_player_t *player)
 Display the player position on the vout OSD. More...
 
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. More...
 
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. More...
 
void vlc_player_SetRenderer (vlc_player_t *player, vlc_renderer_item_t *renderer)
 Set the renderer. More...
 
vlc_renderer_item_tvlc_player_GetRenderer (vlc_player_t *player)
 Get the renderer. More...
 
int vlc_player_SetAtoBLoop (vlc_player_t *player, enum vlc_player_abloop abloop)
 Enable A to B loop of the current media. More...
 
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. More...
 
void vlc_player_Navigate (vlc_player_t *player, enum vlc_player_nav nav)
 Navigate (for DVD/Bluray menus or viewpoint) More...
 
void vlc_player_UpdateViewpoint (vlc_player_t *player, const vlc_viewpoint_t *viewpoint, enum vlc_player_whence whence)
 Update the viewpoint. More...
 
bool vlc_player_IsRecording (vlc_player_t *player)
 Check if the playing is recording. More...
 
void vlc_player_SetRecordingEnabled (vlc_player_t *player, bool enable)
 Enable or disable recording for the current media. More...
 
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. More...
 
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. More...
 
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. More...
 
vlc_tick_t vlc_player_GetEsIdDelay (vlc_player_t *player, vlc_es_id_t *es_id)
 Get the delay of a track. 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...
 
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...
 
int vlc_player_GetSignal (vlc_player_t *player, float *quality, float *strength)
 Get the signal quality and strength of the current media. More...
 
const struct input_stats_tvlc_player_GetStatistics (vlc_player_t *player)
 Get the statistics of the current media. More...
 
void vlc_player_SetPauseOnCork (vlc_player_t *player, bool enabled)
 Enable or disable pause on cork event. More...
 
static int vlc_player_CorkCallback (vlc_object_t *this, const char *var, vlc_value_t oldval, vlc_value_t newval, void *data)
 
vlc_object_tvlc_player_GetV4l2Object (vlc_player_t *player)
 Get the V4L2 object used to do controls. More...
 
static void vlc_player_InitLocks (vlc_player_t *player, enum vlc_player_lock_type lock_type)
 
void vlc_player_Delete (vlc_player_t *player)
 Delete a player instance. More...
 
vlc_player_tvlc_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. More...
 
vlc_object_tvlc_player_GetObject (vlc_player_t *player)
 

Variables

struct {
   const char   var [sizeof("video")]
 
   const char   sout_var [sizeof("sout-video")]
 
cat2vars []
 

Macro Definition Documentation

◆ VAR_CREATE

#define VAR_CREATE (   var,
  flag 
)
Value:
do { \
if (var_Create(player, var, flag) != VLC_SUCCESS) \
goto error; \
} while(0)
#define VLC_SUCCESS
No error.
Definition: vlc_common.h:473
int() var_Create(vlc_object_t *p_this, const char *psz_name, int i_type)
Creates a VLC object variable.
Definition: variables.c:291
const char var[sizeof("video")]
Definition: player.c:1732

◆ vlc_player_foreach_inputs

#define vlc_player_foreach_inputs (   it)     for (struct vlc_player_input *it = player->input; it != NULL; it = NULL)

Function Documentation

◆ vlc_list_HasInput()

static bool vlc_list_HasInput ( struct vlc_list list,
struct vlc_player_input input 
)
static

◆ vlc_player_assert_seek_params()

static void vlc_player_assert_seek_params ( enum vlc_player_seek_speed  speed,
enum vlc_player_whence  whence 
)
inlinestatic

◆ vlc_player_CancelWaitError()

static void vlc_player_CancelWaitError ( vlc_player_t player)
static

◆ vlc_player_ChangeRateOffset()

static void vlc_player_ChangeRateOffset ( vlc_player_t player,
bool  increment 
)
static

◆ vlc_player_CorkCallback()

static int vlc_player_CorkCallback ( vlc_object_t this,
const char *  var,
vlc_value_t  oldval,
vlc_value_t  newval,
void *  data 
)
static

◆ vlc_player_CycleProgram()

static void vlc_player_CycleProgram ( vlc_player_t player,
bool  next 
)
static

◆ vlc_player_CycleTrack()

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

◆ vlc_player_destructor_AddInput()

static void vlc_player_destructor_AddInput ( vlc_player_t player,
struct vlc_player_input input 
)
static

◆ vlc_player_destructor_AddJoinableInput()

void vlc_player_destructor_AddJoinableInput ( vlc_player_t player,
struct vlc_player_input input 
)

◆ vlc_player_destructor_AddStoppingInput()

void vlc_player_destructor_AddStoppingInput ( vlc_player_t player,
struct vlc_player_input input 
)

◆ vlc_player_destructor_IsEmpty()

static bool vlc_player_destructor_IsEmpty ( vlc_player_t player)
static

◆ vlc_player_destructor_Thread()

static void* vlc_player_destructor_Thread ( void *  data)
static

◆ vlc_player_GetEsIdList()

static vlc_es_id_t** vlc_player_GetEsIdList ( vlc_player_t player,
const enum es_format_category_e  cat,
vlc_es_id_t id 
)
static

◆ vlc_player_GetObject()

vlc_object_t* vlc_player_GetObject ( vlc_player_t player)

◆ vlc_player_GetPrivTrack()

static struct vlc_player_track_priv* vlc_player_GetPrivTrack ( vlc_player_t player,
vlc_es_id_t id 
)
static

◆ vlc_player_GetTitleIdx()

static ssize_t vlc_player_GetTitleIdx ( vlc_player_t player,
const struct vlc_player_title title 
)
static

◆ vlc_player_InitLocks()

static void vlc_player_InitLocks ( vlc_player_t player,
enum vlc_player_lock_type  lock_type 
)
static

◆ vlc_player_OpenNextMedia()

int vlc_player_OpenNextMedia ( vlc_player_t player)

◆ vlc_player_PrepareNextMedia()

void vlc_player_PrepareNextMedia ( vlc_player_t player)

◆ vlc_player_SetPause()

static void vlc_player_SetPause ( vlc_player_t player,
bool  pause 
)
static

Variable Documentation

◆ 

struct { ... } cat2vars[]
Initial value:
= {
[VIDEO_ES] = { "video", "sout-video" },
[AUDIO_ES] = { "audio", "sout-audio" },
[SPU_ES] = { "spu", "sout-spu" },
}
@ SPU_ES
Definition: vlc_es.h:606
@ AUDIO_ES
Definition: vlc_es.h:605
@ VIDEO_ES
Definition: vlc_es.h:604

Referenced by vlc_player_IsTrackCategoryEnabled(), and vlc_player_SetTrackCategoryEnabled().

◆ sout_var

const char sout_var[sizeof("sout-video")]

◆ var

const char var[sizeof("video")]