VLC 4.0.0-dev
Loading...
Searching...
No Matches
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

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.
 
const struct vlc_player_programvlc_player_GetProgramAt (vlc_player_t *player, size_t index)
 Get the program at a specific index.
 
const struct vlc_player_programvlc_player_GetProgram (vlc_player_t *player, int id)
 Get a program from an ES group identifier.
 
void vlc_player_SelectProgram (vlc_player_t *player, int id)
 Select a program from an ES group identifier.
 
static void vlc_player_CycleProgram (vlc_player_t *player, bool next)
 
void vlc_player_SelectNextProgram (vlc_player_t *player)
 Select the next program.
 
void vlc_player_SelectPrevProgram (vlc_player_t *player)
 Select the previous program.
 
size_t vlc_player_GetTrackCount (vlc_player_t *player, enum es_format_category_e cat)
 Get the number of tracks for an ES category.
 
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.
 
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.
 
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.
 
vlc_es_id_tvlc_player_GetEsIdFromVout (vlc_player_t *player, vout_thread_t *vout)
 Get the ES identifier of a video output.
 
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.
 
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.
 
void vlc_player_SelectTracksByStringIds (vlc_player_t *player, enum es_format_category_e cat, const char *str_ids)
 Select tracks by their string identifier.
 
void vlc_player_CycleTrack (vlc_player_t *player, enum es_format_category_e cat, enum vlc_vout_order vout_order, bool next)
 Cycle through the tracks.
 
void vlc_player_UnselectEsId (vlc_player_t *player, vlc_es_id_t *id)
 Unselect a track from an ES identifier.
 
void vlc_player_RestartEsId (vlc_player_t *player, vlc_es_id_t *id)
 Restart a track from an ES identifier.
 
void vlc_player_SelectCategoryLanguage (vlc_player_t *player, enum es_format_category_e cat, const char *lang)
 Select the language for an ES category.
 
char * vlc_player_GetCategoryLanguage (vlc_player_t *player, enum es_format_category_e cat)
 Get the language of an ES category.
 
void vlc_player_SetTeletextEnabled (vlc_player_t *player, bool enabled)
 Enable or disable teletext.
 
void vlc_player_SelectTeletextPage (vlc_player_t *player, unsigned page)
 Select a teletext page or do an action from a key.
 
void vlc_player_SetTeletextTransparency (vlc_player_t *player, bool enabled)
 Enable or disable teletext transparency.
 
bool vlc_player_HasTeletextMenu (vlc_player_t *player)
 Check if the media has a teletext menu.
 
bool vlc_player_IsTeletextEnabled (vlc_player_t *player)
 Check if teletext is enabled.
 
unsigned vlc_player_GetTeletextPage (vlc_player_t *player)
 Get the current teletext page.
 
bool vlc_player_IsTeletextTransparent (vlc_player_t *player)
 Check if teletext is transparent.
 
struct 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 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.
 
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.
 
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.
 
void vlc_player_Lock (vlc_player_t *player)
 Lock the player.
 
void vlc_player_Unlock (vlc_player_t *player)
 Unlock the player.
 
void vlc_player_CondWait (vlc_player_t *player, vlc_cond_t *cond)
 Wait on a condition variable.
 
vlc_player_listener_idvlc_player_AddListener (vlc_player_t *player, const struct vlc_player_cbs *cbs, void *cbs_data)
 Add a listener callback.
 
void vlc_player_RemoveListener (vlc_player_t *player, vlc_player_listener_id *id)
 Remove a listener callback.
 
static void vlc_player_InvalidateNextMedia (vlc_player_t *player)
 
int vlc_player_SetCurrentMedia (vlc_player_t *player, input_item_t *media)
 Set the current media.
 
void vlc_player_SetNextMedia (vlc_player_t *player, input_item_t *media)
 Set the next media.
 
input_item_tvlc_player_GetNextMedia (vlc_player_t *player)
 Get the next played media.
 
input_item_tvlc_player_GetCurrentMedia (vlc_player_t *player)
 Get the current played media.
 
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.
 
void vlc_player_SetAssociatedSubsFPS (vlc_player_t *player, float fps)
 Set the associated subtitle FPS.
 
float vlc_player_GetAssociatedSubsFPS (vlc_player_t *player)
 Get the associated subtitle FPS.
 
int vlc_player_Start (vlc_player_t *player)
 Start the playback of the current media.
 
int vlc_player_Stop (vlc_player_t *player)
 Stop the playback of the current media.
 
void vlc_player_SetStartPaused (vlc_player_t *player, bool start_paused)
 Ask to start in a paused state.
 
static void vlc_player_SetPause (vlc_player_t *player, bool pause)
 
void vlc_player_Pause (vlc_player_t *player)
 Pause the playback.
 
void vlc_player_Resume (vlc_player_t *player)
 Resume the playback from a pause.
 
void vlc_player_NextVideoFrame (vlc_player_t *player)
 Pause and display the next video frame.
 
enum vlc_player_state vlc_player_GetState (vlc_player_t *player)
 Get the state of the player.
 
enum vlc_player_error vlc_player_GetError (vlc_player_t *player)
 Get the error state of the player.
 
int vlc_player_GetCapabilities (vlc_player_t *player)
 Get the player capabilities.
 
float vlc_player_GetRate (vlc_player_t *player)
 Get the rate of the player.
 
void vlc_player_ChangeRate (vlc_player_t *player, float rate)
 Change the rate of the player.
 
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)
 
void vlc_player_DecrementRate (vlc_player_t *player)
 Decrement the rate of the player (Slower)
 
vlc_tick_t vlc_player_GetLength (vlc_player_t *player)
 Get the length of the current media.
 
vlc_tick_t vlc_player_GetTime (vlc_player_t *player)
 Get the time of the current media.
 
double vlc_player_GetPosition (vlc_player_t *player)
 Get the position of the current media.
 
void vlc_player_DisplayPosition (vlc_player_t *player)
 Display the player position on the vout OSD.
 
void vlc_player_SeekByPos (vlc_player_t *player, double position, enum vlc_player_seek_speed speed, enum vlc_player_whence whence)
 Seek the current media by position.
 
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.
 
void vlc_player_SetRenderer (vlc_player_t *player, vlc_renderer_item_t *renderer)
 Set the renderer.
 
vlc_renderer_item_tvlc_player_GetRenderer (vlc_player_t *player)
 Get the renderer.
 
int vlc_player_SetAtoBLoop (vlc_player_t *player, enum vlc_player_abloop abloop)
 Enable A to B loop of the current media.
 
enum vlc_player_abloop vlc_player_GetAtoBLoop (vlc_player_t *player, vlc_tick_t *a_time, double *a_pos, vlc_tick_t *b_time, double *b_pos)
 Get the A to B loop status.
 
void vlc_player_Navigate (vlc_player_t *player, enum vlc_player_nav nav)
 Navigate (for DVD/Bluray menus or viewpoint)
 
void vlc_player_UpdateViewpoint (vlc_player_t *player, const vlc_viewpoint_t *viewpoint, enum vlc_player_whence whence)
 Update the viewpoint.
 
bool vlc_player_IsRecording (vlc_player_t *player)
 Check if the playing is recording.
 
void vlc_player_SetRecordingEnabled (vlc_player_t *player, bool enable, const char *dir_path_)
 Enable or disable recording for the current media.
 
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.
 
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.
 
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.
 
vlc_tick_t vlc_player_GetEsIdDelay (vlc_player_t *player, vlc_es_id_t *es_id)
 Get the delay of a track.
 
void vlc_player_SetTrackCategoryEnabled (vlc_player_t *player, enum es_format_category_e cat, bool enabled)
 Enable or disable a track category.
 
bool vlc_player_IsTrackCategoryEnabled (vlc_player_t *player, enum es_format_category_e cat)
 Check if a track category is enabled.
 
void vlc_player_SetSubtitleTextScale (vlc_player_t *player, unsigned scale)
 Set the subtitle text scaling factor.
 
unsigned vlc_player_GetSubtitleTextScale (vlc_player_t *player)
 Get the subtitle text scaling factor.
 
int vlc_player_GetSignal (vlc_player_t *player, float *quality, float *strength)
 Get the signal quality and strength of the current media.
 
const struct input_stats_tvlc_player_GetStatistics (vlc_player_t *player)
 Get the statistics of the current media.
 
void vlc_player_SetPauseOnCork (vlc_player_t *player, bool enabled)
 Enable or disable pause on cork event.
 
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.
 
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.
 
vlc_player_tvlc_player_New (vlc_object_t *parent, enum vlc_player_lock_type lock_type)
 Create a new player instance.
 
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:478
int() var_Create(vlc_object_t *p_this, const char *psz_name, int i_type)
Creates a VLC object variable.
Definition variables.c:289
const char var[sizeof("video")]
Definition player.c:1719

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

◆ vlc_player_ChangeRateOffset()

static void vlc_player_ChangeRateOffset ( vlc_player_t player,
bool  increment 
)
static

◆ vlc_player_CorkCallback()

◆ vlc_player_CycleProgram()

◆ vlc_player_destructor_AddInput()

◆ vlc_player_destructor_AddJoinableInput()

◆ vlc_player_destructor_AddStoppingInput()

◆ vlc_player_destructor_IsEmpty()

◆ vlc_player_destructor_Thread()

◆ vlc_player_GetEsIdList()

◆ vlc_player_GetObject()

vlc_object_t * vlc_player_GetObject ( vlc_player_t player)

◆ vlc_player_GetPrivTrack()

◆ vlc_player_GetTitleIdx()

◆ vlc_player_InitLocks()

◆ vlc_player_InvalidateNextMedia()

static void vlc_player_InvalidateNextMedia ( vlc_player_t player)
static

◆ vlc_player_OpenNextMedia()

◆ vlc_player_SetPause()

Variable Documentation

◆ [struct]

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:620
@ AUDIO_ES
Definition vlc_es.h:619
@ VIDEO_ES
Definition vlc_es.h:618

Referenced by vlc_player_IsTrackCategoryEnabled(), and vlc_player_SetTrackCategoryEnabled().

◆ sout_var

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

◆ var