VLC 4.0.0-dev
|
Go to the source code of this file.
Data Structures | |
struct | input_thread_t |
Main structure representing an input thread. More... | |
struct | vlc_input_event_state |
struct | vlc_input_event_times |
struct | vlc_input_event_output_clock |
struct | vlc_input_event_title |
struct | vlc_input_event_chapter |
struct | vlc_input_event_program |
struct | vlc_input_event_es |
struct | vlc_input_event_signal |
struct | vlc_input_event_vout |
struct | vlc_input_event |
struct | input_source_t |
union | input_control_param_t |
struct | input_control_t |
struct | input_thread_private_t |
Private input fields. More... | |
struct | input_rate_t |
struct | input_stats |
Macros | |
#define | VLC_INPUT_CAPABILITIES_SEEKABLE (1<<0) |
#define | VLC_INPUT_CAPABILITIES_PAUSEABLE (1<<1) |
#define | VLC_INPUT_CAPABILITIES_CHANGE_RATE (1<<2) |
#define | VLC_INPUT_CAPABILITIES_REWINDABLE (1<<3) |
#define | VLC_INPUT_CAPABILITIES_RECORDABLE (1<<4) |
#define | input_Create(a, b, c, d, e, f, g) input_Create(VLC_OBJECT(a),b,c,d,e,f,g) |
#define | INPUT_CONTROL_FIFO_SIZE 100 |
#define | INPUT_PTS_DELAY_MAX VLC_TICK_FROM_SEC(60) |
Typedefs | |
typedef struct input_thread_t | input_thread_t |
Main structure representing an input thread. More... | |
typedef enum input_state_e | input_state_e |
Input state. More... | |
typedef enum input_event_type_e | input_event_type_e |
Input events. More... | |
typedef void(* | input_thread_events_cb) (input_thread_t *input, const struct vlc_input_event *event, void *userdata) |
typedef struct input_thread_private_t | input_thread_private_t |
Private input fields. More... | |
typedef struct input_rate_t | input_rate_t |
#define INPUT_CONTROL_FIFO_SIZE 100 |
#define input_Create | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g | |||
) | input_Create(VLC_OBJECT(a),b,c,d,e,f,g) |
#define INPUT_PTS_DELAY_MAX VLC_TICK_FROM_SEC(60) |
#define VLC_INPUT_CAPABILITIES_CHANGE_RATE (1<<2) |
#define VLC_INPUT_CAPABILITIES_PAUSEABLE (1<<1) |
#define VLC_INPUT_CAPABILITIES_RECORDABLE (1<<4) |
#define VLC_INPUT_CAPABILITIES_REWINDABLE (1<<3) |
#define VLC_INPUT_CAPABILITIES_SEEKABLE (1<<0) |
typedef enum input_event_type_e input_event_type_e |
Input events.
You can catch input event by adding a callback on the variable "intf-event". This variable is an integer that will hold a input_event_type_e value.
typedef struct input_rate_t input_rate_t |
typedef enum input_state_e input_state_e |
Input state.
This enum is used by the variable "state"
typedef void(* input_thread_events_cb) (input_thread_t *input, const struct vlc_input_event *event, void *userdata) |
typedef struct input_thread_private_t input_thread_private_t |
Private input fields.
typedef struct input_thread_t input_thread_t |
Main structure representing an input thread.
This structure is mostly private. The only public fields are read-only and constant.
enum input_control_e |
enum input_event_type_e |
Input events.
You can catch input event by adding a callback on the variable "intf-event". This variable is an integer that will hold a input_event_type_e value.
enum input_state_e |
enum input_type |
bool input_CanPaceControl | ( | input_thread_t * | input | ) |
void input_Close | ( | input_thread_t * | p_input | ) |
Close an input.
It does not call input_Stop itself.
References Destroy(), input_priv(), thread, vlc_interrupt_deinit(), and vlc_join().
Referenced by input_item_Parse(), input_item_parser_id_Release(), RunnableRun(), and vlc_player_input_Delete().
void input_ConfigVarInit | ( | input_thread_t * | p_input | ) |
References input_priv(), INPUT_TYPE_PREPARSING, var_Create(), VLC_VAR_BOOL, VLC_VAR_DOINHERIT, VLC_VAR_FLOAT, VLC_VAR_INTEGER, and VLC_VAR_STRING.
Referenced by input_Create().
int input_ControlPush | ( | input_thread_t * | p_input, |
int | i_type, | ||
const input_control_param_t * | p_param | ||
) |
References input_thread_private_t::control, ControlGetReducedIndexLocked(), ControlRelease(), input_thread_private_t::i_control, input_control_t::i_type, i_type, INPUT_CONTROL_FIFO_SIZE, input_priv(), input_thread_private_t::is_stopped, input_thread_private_t::lock_control, msg_Dbg, msg_Err, input_control_t::param, vlc_cond_signal(), VLC_EGENERIC, vlc_mutex_lock(), vlc_mutex_unlock(), VLC_SUCCESS, and input_thread_private_t::wait_control.
Referenced by input_ControlPushEsHelper(), input_ControlPushHelper(), input_resource_RequestVout(), input_SetEsCatDelay(), input_SetEsCatIds(), input_SetPosition(), input_SetTime(), vlc_player_SeekByPos(), vlc_player_SeekByTime(), vlc_player_SelectEsIdList(), vlc_player_SelectNextChapter(), vlc_player_SelectNextTitle(), vlc_player_SelectPrevChapter(), vlc_player_SelectPrevTitle(), vlc_player_SelectTeletextPage(), vlc_player_SetEsIdDelay(), vlc_player_SetRecordingEnabled(), vlc_player_SetTeletextTransparency(), and vlc_player_UpdateViewpoint().
|
inlinestatic |
References i_type, INPUT_CONTROL_RESTART_ES, INPUT_CONTROL_SET_ES, INPUT_CONTROL_UNSET_ES, input_ControlPush(), and vlc_es_id_Hold().
Referenced by vlc_player_RestartEsId(), vlc_player_SelectEsId(), and vlc_player_UnselectEsId().
|
inlinestatic |
References i_type, input_ControlPush(), and input_control_param_t::val.
Referenced by Init(), input_SetProgramId(), MainLoopTryRepeat(), StartTitle(), TsRun(), vlc_player_AddAssociatedMedia(), vlc_player_ChangeRate(), vlc_player_Navigate(), vlc_player_NextVideoFrame(), vlc_player_SelectChapterIdx(), vlc_player_SelectTitleIdx(), vlc_player_SetAssociatedSubsFPS(), vlc_player_SetPause(), and vlc_player_SetRenderer().
input_thread_t * input_Create | ( | vlc_object_t * | p_parent, |
input_thread_events_cb | events_cb, | ||
void * | events_data, | ||
input_item_t * | p_item, | ||
enum input_type | type, | ||
input_resource_t * | p_resource, | ||
vlc_renderer_item_t * | p_renderer | ||
) |
Create a new input_thread_t.
You need to call input_Start on it when you are done adding callback on the variables/events you want to monitor.
p_parent | a vlc_object |
p_item | an input item |
p_resource | an optional input ressource |
References input_thread_private_t::attachment, input_thread_private_t::b_low_delay, input_thread_private_t::b_out_pace_control, input_item_t::b_preparse_interact, input_thread_private_t::b_recording, Destroy(), input_thread_private_t::events_cb, input_thread_private_t::events_data, input_thread_private_t::i_attachment, input_thread_private_t::i_control, input_thread_private_t::i_jitter_max, input_item_t::i_preparse_depth, input_thread_private_t::i_seekpoint_offset, input_thread_private_t::i_slave, input_thread_private_t::i_start, input_thread_private_t::i_state, input_thread_private_t::i_stop, input_thread_private_t::i_title_offset, INIT_S, input_thread_private_t::input, input_ConfigVarInit(), input_EsOutNew(), input_item_ApplyOptions(), input_item_GetName(), input_item_Hold(), input_item_SetESNowPlaying(), input_item_SetNowPlaying(), input_priv(), input_resource_Hold(), input_resource_New(), input_resource_SetInput(), input_stats_Create(), INPUT_TYPE_PREPARSING, INPUT_TYPE_THUMBNAILING, InputSourceNew(), input_thread_private_t::interrupt, input_thread_private_t::is_running, input_thread_private_t::is_stopped, input_item_t::lock, input_thread_private_t::lock_control, vlc_object_t::logger, input_thread_private_t::master, msg_Dbg, vlc_object_t::no_interact, input_thread_private_t::normal_time, input_thread_t::obj, input_thread_private_t::p_es_out, input_thread_private_t::p_es_out_display, input_thread_private_t::p_item, input_thread_private_t::p_renderer, input_thread_private_t::p_resource, input_thread_private_t::p_sout, input_item_t::p_stats, psz_name, input_thread_private_t::rate, input_thread_private_t::slave, input_thread_private_t::stats, strcasecmp(), TAB_INIT, input_thread_private_t::type, unlikely, var_InheritAddress(), var_InheritBool(), var_InheritInteger(), var_InheritString(), input_thread_private_t::viewpoint, input_thread_private_t::viewpoint_changed, vlc_cond_init(), vlc_custom_create, vlc_interrupt_init(), vlc_mutex_init(), vlc_mutex_lock(), vlc_mutex_unlock(), VLC_OBJECT, vlc_renderer_item_hold(), VLC_TICK_0, VLC_TICK_FROM_MS, vlc_viewpoint_init(), and input_thread_private_t::wait_control.
Referenced by vlc_player_input_New().
void input_ExtractAttachmentAndCacheArt | ( | input_thread_t * | p_input, |
const char * | name | ||
) |
References input_attachment_t::i_data, input_FindArtInCache(), input_GetAttachment(), input_item_IsArtFetched(), input_priv(), input_SaveArt(), likely, msg_Warn, name, input_attachment_t::p_data, input_thread_private_t::p_item, input_attachment_t::psz_mime, vlc_input_attachment_Release(), VLC_OBJECT, and VLC_SUCCESS.
Referenced by EsOutMeta().
input_attachment_t * input_GetAttachment | ( | input_thread_t * | input, |
const char * | name | ||
) |
References input_thread_private_t::attachment, input_thread_private_t::i_attachment, input_priv(), input_item_t::lock, name, input_thread_private_t::p_item, input_attachment_t::psz_name, vlc_input_attachment_Hold(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by accessNewAttachment(), and input_ExtractAttachmentAndCacheArt().
int input_GetAttachments | ( | input_thread_t * | input, |
input_attachment_t *** | attachments | ||
) |
References input_thread_private_t::attachment, input_thread_private_t::i_attachment, input_priv(), input_item_t::lock, input_thread_private_t::p_item, vlc_alloc(), vlc_input_attachment_Hold(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by decoder_get_attachments(), and spu_get_attachments().
input_item_t * input_GetItem | ( | input_thread_t * | p_input | ) |
Get the input item for an input thread.
You have to keep a reference to the input or to the input_item_t until you do not need it anymore.
Get the input item for an input thread.
if it is used after p_input is destroyed nothing prevent it from being freed.
References input_priv(), and input_thread_private_t::p_item.
Referenced by access_New(), demux_NewAdvanced(), DisplayVoutTitle(), EsOutEsUpdateFmt(), EsOutMeta(), EsOutSetRecord(), input_item_parser_InputEvent(), input_thread_Events(), stream_AccessNew(), vlc_player_input_RestoreMlStates(), and vlc_player_UpdateMLStates().
|
inlinestatic |
References container_of.
Referenced by AppendAttachment(), AStreamReadBlock(), AStreamReadStream(), Control(), ControlGetReducedIndexLocked(), ControlNav(), ControlPause(), ControlPop(), ControlSetEsList(), ControlUnpause(), decoder_on_new_audio_stats(), decoder_on_new_video_stats(), Destroy(), End(), EsOutCreateDecoder(), EsOutDeleteInfoEs(), EsOutEpgTime(), EsOutFillEsFmt(), EsOutGetWakeup(), EsOutIsGroupSticky(), EsOutMeta(), EsOutProgramAdd(), EsOutProgramEpg(), EsOutProgramEpgEvent(), EsOutProgramMeta(), EsOutProgramSelect(), EsOutProgramUpdateScrambled(), EsOutSelectEs(), EsOutSend(), EsOutSetRecord(), EsOutStopFreeVout(), EsOutTerminate(), EsOutUpdateInfo(), EsOutVaControlLocked(), EsOutVaPrivControlLocked(), Init(), InitPrograms(), InitProperties(), InitTitle(), input_CanPaceControl(), input_ChangeState(), input_Close(), input_ConfigVarInit(), input_ControlPush(), input_Create(), input_ExtractAttachmentAndCacheArt(), input_GetAttachment(), input_GetAttachments(), input_GetItem(), input_SendEvent(), input_SetEsCatDelay(), input_SetEsCatIds(), input_SetProgramId(), input_SlaveSourceAdd(), input_Start(), input_Stop(), input_Stopped(), InputDemuxNew(), InputSourceInit(), InputSourceMeta(), InputUpdateMeta(), LoadSlaves(), MainLoop(), MainLoopDemux(), MainLoopStatistics(), MainLoopTryRepeat(), RequestSubRate(), SetSubtitlesOptions(), SlaveDemux(), SlaveSeek(), StartTitle(), UpdateGenericFromDemux(), UpdatePtsDelay(), UpdateTitleListfromDemux(), UpdateTitleSeekpoint(), UpdateTitleSeekpointFromDemux(), ViewpointApply(), and vlc_player_input_HandleTitleEvent().
void input_rate_Add | ( | input_rate_t * | counter, |
uintmax_t | val | ||
) |
Update a counter element with new values.
p_counter | the counter to update |
val | the vlc_value union containing the new value to aggregate. For more information on how data is aggregated, |
References input_rate_t::date, input_rate_t::lock, input_rate_t::samples, input_rate_t::updates, input_rate_t::value, vlc_mutex_lock(), vlc_mutex_unlock(), VLC_TICK_FROM_SEC, VLC_TICK_INVALID, and vlc_tick_now().
Referenced by AStreamReadBlock(), AStreamReadStream(), and EsOutSend().
int input_SetEsCatDelay | ( | input_thread_t * | input, |
enum es_format_category_e | cat, | ||
vlc_tick_t | delay | ||
) |
Set the default delay applied to the given category.
Set the default delay for the given es_format_category_e
synchronously if the input is not running yet, otherwise push a control to signal to the input which delay should be updated.
input | Any input to change the delay for. |
cat | The ES category to apply the delay to. |
delay | The delay to apply to the category, a positive delay shifting the track to the future. |
References input_control_param_t::cat_delay, es_out_SetDelay(), INPUT_CONTROL_SET_CATEGORY_DELAY, input_ControlPush(), input_priv(), input_thread_private_t::is_running, input_thread_private_t::is_stopped, input_thread_private_t::p_es_out_display, and VLC_SUCCESS.
Referenced by vlc_player_input_New(), and vlc_player_SetCategoryDelay().
void input_SetEsCatIds | ( | input_thread_t * | input, |
enum es_format_category_e | cat, | ||
const char * | str_ids | ||
) |
Set the list of string ids to enable for a category.
cf. ES_OUT_SET_ES_CAT_IDS This function can be called before start or while started. This function is not thread-safe, the caller should handle the locking.
References input_control_param_t::cat_ids, es_out_SetEsCatIds(), INPUT_CONTROL_SET_ES_CAT_IDS, input_ControlPush(), input_priv(), input_thread_private_t::is_running, input_thread_private_t::is_stopped, input_thread_private_t::p_es_out_display, and strdup().
Referenced by vlc_player_input_SelectTracksByStringIds().
void input_SetEsIdDelay | ( | input_thread_t * | input, |
vlc_es_id_t * | es_id, | ||
vlc_tick_t | delay | ||
) |
Set the delay of an ES identifier.
void input_SetPosition | ( | input_thread_t * | p_input, |
double | f_position, | ||
bool | b_fast | ||
) |
void input_SetProgramId | ( | input_thread_t * | input, |
int | group_id | ||
) |
Set the program id.
cf. ES_OUT_SET_GROUP This function can be called before start or while started. This function is not thread-safe, the caller should handle the locking.
References es_out_Control(), ES_OUT_SET_GROUP, INPUT_CONTROL_SET_PROGRAM, input_ControlPushHelper(), input_priv(), input_thread_private_t::is_running, input_thread_private_t::is_stopped, and input_thread_private_t::p_es_out_display.
Referenced by vlc_player_SelectProgram().
void input_SetTime | ( | input_thread_t * | p_input, |
vlc_tick_t | i_time, | ||
bool | b_fast | ||
) |
References input_control_param_t::b_fast_seek, input_control_param_t::i_val, INPUT_CONTROL_SET_TIME, input_ControlPush(), and input_control_param_t::time.
Referenced by MainLoopTryRepeat(), RunnableRun(), and StartTitle().
int input_source_GetNewAutoId | ( | input_source_t * | in | ) |
Get a new fmt.i_id from the input source.
This auto id will be relative to this input source. It allows to have stable ids across different playback instances, by not relying on the input source addition order.
References input_source_t::auto_id.
Referenced by EsOutAddLocked().
const char * input_source_GetStrId | ( | input_source_t * | in | ) |
Returns the string identifying this input source.
References input_source_t::str_id.
Referenced by EsOutAddLocked().
input_source_t * input_source_Hold | ( | input_source_t * | in | ) |
Hold the input_source_t.
References input_source_t::rc, and vlc_atomic_rc_inc().
Referenced by CmdInitAdd(), CmdInitControl(), EsOutAddLocked(), and EsOutProgramAdd().
bool input_source_IsAutoSelected | ( | input_source_t * | in | ) |
Returns true if a given source should be auto-selected.
References input_source_t::autoselected.
Referenced by EsOutSelect().
void input_source_Release | ( | input_source_t * | in | ) |
Release the input_source_t.
References input_source_t::rc, input_source_t::str_id, and vlc_atomic_rc_dec().
Referenced by CmdCleanAdd(), CmdCleanControl(), Destroy(), End(), EsOutAddLocked(), EsRelease(), input_SlaveSourceAdd(), and ProgramDelete().
int input_Start | ( | input_thread_t * | p_input | ) |
Start a input_thread_t created by input_Create.
You must not start an already running input_thread_t.
the | input thread to start |
References input_priv(), INPUT_TYPE_PREPARSING, input_thread_private_t::is_running, msg_Err, Preparse(), Run(), input_thread_private_t::thread, input_thread_private_t::type, vlc_clone(), VLC_EGENERIC, and VLC_SUCCESS.
Referenced by input_item_Parse(), RunnableRun(), and vlc_player_input_Start().
void input_stats_Compute | ( | struct input_stats * | stats, |
input_stats_t * | st | ||
) |
References input_stats::decoded_audio, input_stats::decoded_video, input_stats::demux_bitrate, input_stats::demux_corrupted, input_stats::demux_discontinuity, input_stats::displayed_pictures, input_stats_t::f_demux_bitrate, input_stats_t::f_input_bitrate, input_stats_t::i_decoded_audio, input_stats_t::i_decoded_video, input_stats_t::i_demux_corrupted, input_stats_t::i_demux_discontinuity, input_stats_t::i_demux_read_bytes, input_stats_t::i_displayed_pictures, input_stats_t::i_late_pictures, input_stats_t::i_lost_abuffers, input_stats_t::i_lost_pictures, input_stats_t::i_played_abuffers, input_stats_t::i_read_bytes, input_stats_t::i_read_packets, input_stats::input_bitrate, input_stats::late_pictures, input_rate_t::lock, input_stats::lost_abuffers, input_stats::lost_pictures, input_stats::played_abuffers, stats_GetRate(), input_rate_t::updates, input_rate_t::value, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by End(), and MainLoopStatistics().
struct input_stats * input_stats_Create | ( | void | ) |
References input_stats::decoded_audio, input_stats::decoded_video, input_stats::demux_bitrate, input_stats::demux_corrupted, input_stats::demux_discontinuity, input_stats::displayed_pictures, input_stats::input_bitrate, input_rate_Init(), input_stats::late_pictures, input_stats::lost_abuffers, input_stats::lost_pictures, input_stats::played_abuffers, and unlikely.
Referenced by input_Create().
void input_stats_Destroy | ( | struct input_stats * | stats | ) |
Referenced by Destroy().
void input_Stop | ( | input_thread_t * | p_input | ) |
Request a running input thread to stop and die.
p_input | the input thread to stop |
References input_thread_private_t::control, ControlRelease(), input_thread_private_t::i_control, input_control_t::i_type, input_priv(), input_thread_private_t::interrupt, input_thread_private_t::is_stopped, input_thread_private_t::lock_control, input_control_t::param, vlc_cond_signal(), vlc_interrupt_kill(), vlc_mutex_lock(), vlc_mutex_unlock(), and input_thread_private_t::wait_control.
Referenced by input_item_parser_id_Interrupt(), RunnableRun(), and vlc_player_destructor_Thread().
bool input_Stopped | ( | input_thread_t * | input | ) |
References input_priv(), input_thread_private_t::is_stopped, input_thread_private_t::lock_control, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by EsOutDrainDecoder(), InputSourceInit(), and MainLoop().
int subtitles_Detect | ( | input_thread_t * | p_this, |
char * | psz_path, | ||
const char * | psz_name_org, | ||
input_item_slave_t *** | ppp_slaves, | ||
int * | p_slaves | ||
) |
Detect subtitle files.
When called this function will split up the psz_name string into a directory, filename and extension. It then opens the directory in which the file resides and tries to find possible matches of subtitles files.
p_this | the calling input_thread_t |
psz_path | a list of subdirectories (separated by a ',') to look in. |
psz_name_org | the complete filename to base the search on. |
pp_slaves | an initialized input item slave list to append detected subtitles to |
p_slaves | pointer to the size of the slave list |
References asprintf(), input_item_slave::b_forced, DIR_SEP, DIR_SEP_CHAR, filename_strip_ext_inplace(), filename_trim_inplace(), input_item_slave::i_priority, input_item_slave_Delete, input_item_slave_New(), msg_Dbg, paths_to_list(), psz_ext, psz_name, input_item_slave::psz_uri, SLAVE_PRIORITY_MATCH_ALL, SLAVE_PRIORITY_MATCH_LEFT, SLAVE_PRIORITY_MATCH_NONE, SLAVE_PRIORITY_MATCH_RIGHT, slave_strcmp(), SLAVE_TYPE_SPU, strcasecmp(), strdup(), subtitles_Filter(), TAB_APPEND, var_GetInteger(), vlc_closedir(), VLC_EGENERIC, VLC_ENOMEM, vlc_opendir(), vlc_path2uri(), vlc_readdir(), vlc_stat(), VLC_SUCCESS, vlc_uri2path(), and whiteonly().
Referenced by LoadSlaves().
int subtitles_Filter | ( | const char * | psz_dir_content | ) |
References strcasecmp(), and sub_exts.
Referenced by subtitles_Detect(), and vlc_player_AddAssociatedMedia().
void vlc_audio_replay_gain_MergeFromMeta | ( | audio_replay_gain_t * | p_dst, |
const vlc_meta_t * | p_meta | ||
) |