VLC 4.0.0-dev
Loading...
Searching...
No Matches
player.h File Reference
Include dependency graph for player.h:

Go to the source code of this file.

Data Structures

struct  vlc_player_track_priv
 
struct  vlc_player_program_vector
 
struct  vlc_player_track_vector
 
struct  vlc_player_title_list
 
struct  vlc_player_input
 
struct  vlc_player_listener_id
 
struct  vlc_player_metadata_listener_id
 
struct  vlc_player_vout_listener_id
 
struct  vlc_player_aout_listener_id
 
struct  vlc_player_timer_id
 
struct  vlc_player_timer_source
 
struct  vlc_player_timer
 
struct  vlc_player_t
 

Macros

#define best_source   sources[VLC_PLAYER_TIMER_TYPE_BEST]
 
#define smpte_source   sources[VLC_PLAYER_TIMER_TYPE_SMPTE]
 
#define VLC_PLAYER_EOS_BURST_THRESHOLD   VLC_TICK_FROM_MS(250)
 Playing a tiny stream (either empty, or with unreported errors) in a loop would cause high CPU usage.
 
#define vlc_player_SendEvent(player, event, ...)
 

Enumerations

enum  vlc_player_timer_source_type { VLC_PLAYER_TIMER_TYPE_BEST , VLC_PLAYER_TIMER_TYPE_SMPTE , VLC_PLAYER_TIMER_TYPE_COUNT }
 
enum  vlc_player_timer_event { VLC_PLAYER_TIMER_EVENT_PLAYING , VLC_PLAYER_TIMER_EVENT_PAUSED , VLC_PLAYER_TIMER_EVENT_DISCONTINUITY , VLC_PLAYER_TIMER_EVENT_STOPPING }
 

Functions

static void vlc_player_assert_locked (vlc_player_t *player)
 
static struct vlc_player_inputvlc_player_get_input_locked (vlc_player_t *player)
 
static const char * es_format_category_to_string (enum es_format_category_e cat)
 
vlc_object_tvlc_player_GetObject (vlc_player_t *player)
 
int vlc_player_OpenNextMedia (vlc_player_t *player)
 
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)
 
struct vlc_player_programvlc_player_program_New (int id, const char *name)
 
int vlc_player_program_Update (struct vlc_player_program *prgm, int id, const char *name)
 
struct vlc_player_programvlc_player_program_vector_FindById (vlc_player_program_vector *vec, int id, size_t *idx)
 
struct vlc_player_track_privvlc_player_track_priv_New (vlc_es_id_t *id, const char *name, const es_format_t *fmt)
 
void vlc_player_track_priv_Delete (struct vlc_player_track_priv *trackpriv)
 
int vlc_player_track_priv_Update (struct vlc_player_track_priv *trackpriv, const char *name, const es_format_t *fmt)
 
struct vlc_player_track_privvlc_player_track_vector_FindById (vlc_player_track_vector *vec, vlc_es_id_t *id, size_t *idx)
 
int vlc_player_GetFirstSelectedTrackId (const vlc_player_track_vector *tracks)
 
struct vlc_player_title_listvlc_player_title_list_Create (input_title_t *const *array, size_t count, int title_offset, int chapter_offset)
 
static vlc_player_track_vectorvlc_player_input_GetTrackVector (struct vlc_player_input *input, enum es_format_category_e cat)
 
struct vlc_player_track_privvlc_player_input_FindTrackById (struct vlc_player_input *input, vlc_es_id_t *id, size_t *idx)
 
struct vlc_player_inputvlc_player_input_New (vlc_player_t *player, input_item_t *item)
 
void vlc_player_input_Delete (struct vlc_player_input *input)
 
void vlc_player_input_SelectTracksByStringIds (struct vlc_player_input *input, enum es_format_category_e cat, const char *str_ids)
 
char * vlc_player_input_GetSelectedTrackStringIds (struct vlc_player_input *input, enum es_format_category_e cat)
 
vlc_tick_t vlc_player_input_GetTime (struct vlc_player_input *input, bool seeking, vlc_tick_t system_now)
 
double vlc_player_input_GetPos (struct vlc_player_input *input, bool seeking, vlc_tick_t system_now)
 
int vlc_player_input_Start (struct vlc_player_input *input)
 
void vlc_player_input_SeekByPos (struct vlc_player_input *input, double position, enum vlc_player_seek_speed speed, enum vlc_player_whence whence)
 
void vlc_player_input_SeekByTime (struct vlc_player_input *input, vlc_tick_t time, enum vlc_player_seek_speed speed, enum vlc_player_whence whence)
 
void vlc_player_input_UpdateViewpoint (struct vlc_player_input *input, const vlc_viewpoint_t *viewpoint, enum vlc_player_whence whence)
 
void vlc_player_input_HandleState (struct vlc_player_input *, enum vlc_player_state, vlc_tick_t state_date)
 
void vlc_player_InitTimer (vlc_player_t *player)
 
void vlc_player_DestroyTimer (vlc_player_t *player)
 
void vlc_player_ResetTimer (vlc_player_t *player)
 
void vlc_player_UpdateTimerEvent (vlc_player_t *player, vlc_es_id_t *es_source, enum vlc_player_timer_event event, vlc_tick_t system_date)
 
void vlc_player_UpdateTimerSeekState (vlc_player_t *player, vlc_tick_t time, double position)
 
void vlc_player_UpdateTimer (vlc_player_t *player, vlc_es_id_t *es_source, bool es_source_is_master, const struct vlc_player_timer_point *point, vlc_tick_t normal_time, unsigned frame_rate, unsigned frame_rate_base, vlc_tick_t start_offset)
 
void vlc_player_RemoveTimerSource (vlc_player_t *player, vlc_es_id_t *es_source)
 
int vlc_player_GetTimerPoint (vlc_player_t *player, bool seeking, vlc_tick_t system_now, vlc_tick_t *out_ts, double *out_pos)
 
void vlc_player_vout_AddCallbacks (vlc_player_t *player, vout_thread_t *vout)
 
void vlc_player_vout_DelCallbacks (vlc_player_t *player, vout_thread_t *vout)
 
audio_output_tvlc_player_aout_Init (vlc_player_t *player)
 
void vlc_player_aout_Deinit (vlc_player_t *player)
 
void vlc_player_osd_Message (vlc_player_t *player, const char *fmt,...)
 
void vlc_player_osd_Icon (vlc_player_t *player, short type)
 
void vlc_player_osd_Position (vlc_player_t *player, struct vlc_player_input *input, vlc_tick_t time, double position)
 
void vlc_player_osd_Volume (vlc_player_t *player, bool mute_action)
 
int vlc_player_vout_OSDCallback (vlc_object_t *this, const char *var, vlc_value_t oldval, vlc_value_t newval, void *data)
 
void vlc_player_osd_Track (vlc_player_t *player, vlc_es_id_t *id, bool select)
 
void vlc_player_osd_Tracks (vlc_player_t *player, vlc_es_id_t *const *selected, vlc_es_id_t *unselect)
 
void vlc_player_osd_Program (vlc_player_t *player, const char *name)
 
void vlc_player_input_RestoreMlStates (struct vlc_player_input *input, bool force_pos)
 
void vlc_player_UpdateMLStates (vlc_player_t *player, struct vlc_player_input *input)
 

Macro Definition Documentation

◆ best_source

#define best_source   sources[VLC_PLAYER_TIMER_TYPE_BEST]

◆ smpte_source

#define smpte_source   sources[VLC_PLAYER_TIMER_TYPE_SMPTE]

◆ VLC_PLAYER_EOS_BURST_THRESHOLD

#define VLC_PLAYER_EOS_BURST_THRESHOLD   VLC_TICK_FROM_MS(250)

Playing a tiny stream (either empty, or with unreported errors) in a loop would cause high CPU usage.

To mitigate the problem, temporize if several EOS are received too quickly.

◆ vlc_player_SendEvent

#define vlc_player_SendEvent (   player,
  event,
  ... 
)
Value:
do { \
vlc_list_foreach(listener, &player->listeners, node) \
{ \
if (listener->cbs->event) \
listener->cbs->event(player, ##__VA_ARGS__, listener->cbs_data); \
} \
} while(0)
Definition player.h:132
const struct vlc_player_cbs * cbs
Definition player.h:133
void * cbs_data
Definition player.h:134

Enumeration Type Documentation

◆ vlc_player_timer_event

Enumerator
VLC_PLAYER_TIMER_EVENT_PLAYING 
VLC_PLAYER_TIMER_EVENT_PAUSED 
VLC_PLAYER_TIMER_EVENT_DISCONTINUITY 
VLC_PLAYER_TIMER_EVENT_STOPPING 

◆ vlc_player_timer_source_type

Enumerator
VLC_PLAYER_TIMER_TYPE_BEST 
VLC_PLAYER_TIMER_TYPE_SMPTE 
VLC_PLAYER_TIMER_TYPE_COUNT 

Function Documentation

◆ es_format_category_to_string()

static const char * es_format_category_to_string ( enum es_format_category_e  cat)
inlinestatic

◆ vlc_player_aout_Deinit()

void vlc_player_aout_Deinit ( vlc_player_t player)

◆ vlc_player_aout_Init()

◆ vlc_player_assert_locked()

◆ vlc_player_DestroyTimer()

◆ vlc_player_destructor_AddJoinableInput()

◆ vlc_player_destructor_AddStoppingInput()

◆ vlc_player_get_input_locked()

static struct vlc_player_input * vlc_player_get_input_locked ( vlc_player_t player)
inlinestatic

References vlc_player_t::input, vlc_player_input::player, and vlc_player_assert_locked().

Referenced by vlc_player_AddAssociatedMedia(), vlc_player_ChangeRate(), vlc_player_DisplayPosition(), vlc_player_GetAtoBLoop(), vlc_player_GetCapabilities(), vlc_player_GetCategoryDelay(), vlc_player_GetError(), vlc_player_GetEsIdDelay(), vlc_player_GetEsIdFromVout(), vlc_player_GetLength(), vlc_player_GetPosition(), vlc_player_GetPrivTrack(), vlc_player_GetProgram(), vlc_player_GetProgramAt(), vlc_player_GetProgramCount(), vlc_player_GetRate(), vlc_player_GetSelectedChapterIdx(), vlc_player_GetSelectedTitleIdx(), vlc_player_GetSignal(), vlc_player_GetStatistics(), vlc_player_GetTeletextPage(), vlc_player_GetTime(), vlc_player_GetTitleIdx(), vlc_player_GetTitleList(), vlc_player_GetTrackAt(), vlc_player_GetTrackCount(), vlc_player_GetV4l2Object(), vlc_player_HasTeletextMenu(), vlc_player_IsRecording(), vlc_player_IsTeletextEnabled(), vlc_player_IsTeletextTransparent(), vlc_player_Navigate(), vlc_player_NextVideoFrame(), vlc_player_RestartEsId(), vlc_player_SeekByPos(), vlc_player_SeekByTime(), vlc_player_SelectChapterIdx(), vlc_player_SelectEsId(), vlc_player_SelectEsIdList(), vlc_player_SelectNextChapter(), vlc_player_SelectNextTitle(), vlc_player_SelectPrevChapter(), vlc_player_SelectPrevTitle(), vlc_player_SelectProgram(), vlc_player_SelectTeletextPage(), vlc_player_SelectTitleIdx(), vlc_player_SelectTracksByStringIds(), vlc_player_SetAssociatedSubsFPS(), vlc_player_SetAtoBLoop(), vlc_player_SetCategoryDelay(), vlc_player_SetEsIdDelay(), vlc_player_SetPause(), vlc_player_SetRecordingEnabled(), vlc_player_SetTeletextEnabled(), vlc_player_SetTeletextTransparency(), vlc_player_SetTrackCategoryEnabled(), vlc_player_Stop(), vlc_player_UnselectEsId(), and vlc_player_UpdateViewpoint().

◆ vlc_player_GetFirstSelectedTrackId()

int vlc_player_GetFirstSelectedTrackId ( const vlc_player_track_vector tracks)

◆ vlc_player_GetObject()

vlc_object_t * vlc_player_GetObject ( vlc_player_t player)

◆ vlc_player_GetTimerPoint()

◆ vlc_player_InitTimer()

◆ vlc_player_input_Delete()

◆ vlc_player_input_FindTrackById()

◆ vlc_player_input_GetPos()

◆ vlc_player_input_GetSelectedTrackStringIds()

◆ vlc_player_input_GetTime()

◆ vlc_player_input_GetTrackVector()

◆ vlc_player_input_HandleState()

◆ vlc_player_input_New()

struct vlc_player_input * vlc_player_input_New ( vlc_player_t player,
input_item_t item 
)

References vlc_player_input::abloop_state, vlc_ml_playback_states_all::aspect_ratio, AUDIO_ES, vlc_player_t::audio_string_ids, vlc_player_input::audio_track_vector, vlc_player_input::cache, vlc_player_input::capabilities, vlc_player_input::cat_delays, vlc_input_thread_cfg::cbs, vlc_player_input::chapter_selected, vlc_ml_playback_states_all::crop, vlc_ml_playback_states_all::current_audio_track, vlc_ml_playback_states_all::current_subtitle_track, vlc_ml_playback_states_all::current_title, vlc_ml_playback_states_all::current_video_track, DATA_ES, vlc_ml_playback_states_all::deinterlace, vlc_player_input::delay_restore, vlc_player_input::error, vlc_player_input::has_audio_tracks, vlc_player_input::has_video_tracks, input_Create, input_SetEsCatDelay(), input_thread_Events(), INPUT_TYPE_PLAYBACK, vlc_player_input::length, vlc_player_input::ml, vlc_player_input::normal_time, vlc_input_thread_callbacks::on_event, vlc_player_input::pause_date, vlc_player_input::player, vlc_player_input::playing, vlc_player_input::pos, vlc_player_input::position, vlc_player_input::program_vector, vlc_player_input::rate, vlc_player_input::recording, vlc_player_t::renderer, vlc_player_t::resource, vlc_player_input::restore, vlc_player_input::restore_states, vlc_player_input::set, vlc_player_input::signal_quality, vlc_player_input::signal_strength, SPU_ES, vlc_player_input::spu_track_vector, vlc_player_input::started, vlc_player_input::state, vlc_player_input::states, vlc_player_input::stats, vlc_player_t::sub_string_ids, vlc_player_input::teletext_enabled, vlc_player_input::teletext_page, vlc_player_input::teletext_source, vlc_player_input::teletext_transparent, vlc_player_input::thread, vlc_player_input::time, vlc_player_input::title_selected, vlc_player_input::titles, vlc_input_thread_cfg::type, UNKNOWN_ES, var_InheritInteger(), VIDEO_ES, vlc_ml_playback_states_all::video_filter, vlc_player_t::video_string_ids, vlc_player_input::video_track_vector, VLC_PLAYER_ERROR_NONE, vlc_player_input_RestoreMlStates(), vlc_player_input_SelectTracksByStringIds(), vlc_player_SendEvent, VLC_PLAYER_STATE_STOPPED, vlc_player_input::VLC_RESTOREPOINT_NONE, VLC_SUCCESS, VLC_TICK_0, VLC_TICK_FROM_MS, vlc_tick_from_samples(), VLC_TICK_INVALID, and vlc_vector_init.

Referenced by vlc_player_OpenNextMedia(), and vlc_player_Start().

◆ vlc_player_input_RestoreMlStates()

◆ vlc_player_input_SeekByPos()

◆ vlc_player_input_SeekByTime()

◆ vlc_player_input_SelectTracksByStringIds()

void vlc_player_input_SelectTracksByStringIds ( struct vlc_player_input input,
enum es_format_category_e  cat,
const char *  str_ids 
)

◆ vlc_player_input_Start()

int vlc_player_input_Start ( struct vlc_player_input input)

◆ vlc_player_input_UpdateViewpoint()

◆ vlc_player_OpenNextMedia()

◆ vlc_player_osd_Icon()

void vlc_player_osd_Icon ( vlc_player_t player,
short  type 
)

◆ vlc_player_osd_Message()

void vlc_player_osd_Message ( vlc_player_t player,
const char *  fmt,
  ... 
)

◆ vlc_player_osd_Position()

◆ vlc_player_osd_Program()

void vlc_player_osd_Program ( vlc_player_t player,
const char *  name 
)

References _, name, and vlc_player_osd_Message().

Referenced by vlc_player_SelectProgram().

◆ vlc_player_osd_Track()

void vlc_player_osd_Track ( vlc_player_t player,
vlc_es_id_t id,
bool  select 
)

◆ vlc_player_osd_Tracks()

◆ vlc_player_osd_Volume()

◆ vlc_player_program_New()

◆ vlc_player_program_Update()

int vlc_player_program_Update ( struct vlc_player_program prgm,
int  id,
const char *  name 
)

◆ vlc_player_program_vector_FindById()

◆ vlc_player_RemoveTimerSource()

◆ vlc_player_ResetTimer()

◆ vlc_player_title_list_Create()

◆ vlc_player_track_priv_Delete()

◆ vlc_player_track_priv_New()

◆ vlc_player_track_priv_Update()

int vlc_player_track_priv_Update ( struct vlc_player_track_priv trackpriv,
const char *  name,
const es_format_t fmt 
)

◆ vlc_player_track_vector_FindById()

◆ vlc_player_UpdateMLStates()

void vlc_player_UpdateMLStates ( vlc_player_t player,
struct vlc_player_input input 
)

◆ vlc_player_UpdateTimer()

◆ vlc_player_UpdateTimerEvent()

◆ vlc_player_UpdateTimerSeekState()

◆ vlc_player_vout_AddCallbacks()

void vlc_player_vout_AddCallbacks ( vlc_player_t player,
vout_thread_t vout 
)

◆ vlc_player_vout_DelCallbacks()

void vlc_player_vout_DelCallbacks ( vlc_player_t player,
vout_thread_t vout 
)

◆ vlc_player_vout_OSDCallback()