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_attachments |
struct | vlc_input_event_mouse |
struct | vlc_input_event |
struct | vlc_input_thread_callbacks |
struct | vlc_input_thread_cfg |
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 | input_Create(a, b, c) input_Create(VLC_OBJECT(a),b,c) |
#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. | |
typedef enum input_state_e | input_state_e |
Input state. | |
typedef enum input_event_type_e | input_event_type_e |
Input events. | |
typedef struct input_thread_private_t | input_thread_private_t |
Private input fields. | |
typedef struct input_rate_t | input_rate_t |
#define INPUT_CONTROL_FIFO_SIZE 100 |
#define input_Create | ( | a, | |
b, | |||
c | |||
) | input_Create(VLC_OBJECT(a),b,c) |
#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_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 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(), ThumbnailerRun(), 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_input_SeekByPos(), vlc_player_input_SeekByTime(), vlc_player_input_UpdateViewpoint(), vlc_player_SelectEsIdList(), vlc_player_SelectNextChapter(), vlc_player_SelectNextTitle(), vlc_player_SelectPrevChapter(), vlc_player_SelectPrevTitle(), vlc_player_SelectTeletextPage(), vlc_player_SetEsIdDelay(), vlc_player_SetRecordingEnabled(), and vlc_player_SetTeletextTransparency().
|
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_item_t * | item, | ||
const struct vlc_input_thread_cfg * | cfg | ||
) |
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 |
cfg | pointer to a configuration struct, mandatory |
References input_thread_private_t::attachment, input_thread_private_t::b_low_delay, input_thread_private_t::b_out_pace_control, input_thread_private_t::b_recording, vlc_input_thread_cfg::cbs, input_thread_private_t::cbs, vlc_input_thread_cfg::cbs_data, input_thread_private_t::cbs_data, Destroy(), vlc_input_thread_cfg::hw_dec, input_thread_private_t::hw_dec, input_thread_private_t::i_attachment, input_thread_private_t::i_control, input_thread_private_t::i_jitter_max, 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_PLAYBACK, INPUT_TYPE_PREPARSING, INPUT_TYPE_THUMBNAILING, InputSourceNew(), vlc_input_thread_cfg::interact, 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_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, input_thread_private_t::preparse_subitems, vlc_input_thread_cfg::preparsing, psz_name, input_thread_private_t::rate, vlc_input_thread_cfg::renderer, vlc_input_thread_cfg::resource, input_thread_private_t::slave, input_thread_private_t::stats, vlc_input_thread_cfg::subitems, TAB_INIT, vlc_input_thread_cfg::type, input_thread_private_t::type, unlikely, var_InheritAddress(), var_InheritBool(), var_InheritInteger(), input_thread_private_t::viewpoint, input_thread_private_t::viewpoint_changed, vlc_assert_unreachable, 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_FROM_MS, vlc_viewpoint_init(), and input_thread_private_t::wait_control.
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(), EsOutMeta(), EsOutSetRecord(), input_item_parser_InputEvent(), input_thread_Events(), stream_AccessNew(), vlc_player_destructor_Thread(), vlc_player_input_RestoreMlStates(), and vlc_player_UpdateMLStates().
vlc_tick_t input_GetItemDuration | ( | input_thread_t * | input, |
vlc_tick_t | duration | ||
) |
Calculates the duration of the item in an input thread.
This function determines the duration of a track item based on the start and stop times stored in the input thread's private data. If the stop time is not set (i.e., equals zero), the function considers the given duration
as the stop time and calculates the effective duration based on the start time. Otherwise, it calculates the duration using the set start and stop times.
input | Pointer to the input_thread_t object. |
duration | The initial duration value, used if the stop time is not set. |
References input_thread_private_t::i_start, input_thread_private_t::i_stop, and input_priv().
Referenced by input_item_parser_InputEvent(), and input_thread_Events().
|
inlinestatic |
References container_of.
Referenced by AppendAttachment(), AStreamReadBlock(), AStreamReadStream(), Control(), ControlGetReducedIndexLocked(), ControlInsertDemuxFilter(), ControlNav(), ControlPause(), ControlPop(), ControlPopEarly(), ControlSetEsList(), ControlUnpause(), ControlUpdateRenderer(), 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(), FillFileStatsIfAny(), Init(), InitPrograms(), InitProperties(), InitSout(), InitTitle(), input_CanPaceControl(), input_ChangeState(), input_Close(), input_ConfigVarInit(), input_ControlPush(), input_Create(), input_ExtractAttachmentAndCacheArt(), input_GetAttachment(), input_GetAttachments(), input_GetItem(), input_GetItemDuration(), input_SendEvent(), input_SlaveSourceAdd(), input_Start(), input_Stop(), input_Stopped(), input_thread_Events(), InputDemuxNew(), InputSourceInit(), InputSourceMeta(), InputUpdateMeta(), LoadSlaves(), MainLoop(), MainLoopDemux(), MainLoopStatistics(), MainLoopTryRepeat(), RequestSubRate(), SetStopStart(), 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.
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, INPUT_CONTROL_SET_CATEGORY_DELAY, and input_ControlPush().
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, INPUT_CONTROL_SET_ES_CAT_IDS, input_ControlPush(), 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 INPUT_CONTROL_SET_PROGRAM, and input_ControlPushHelper().
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(), SetStopStart(), and ThumbnailerRun().
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.
p_input | 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(), ThumbnailerRun(), 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(), ThumbnailerRun(), 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(), MainLoop(), and MainLoopDemux().
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. |
ppp_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 | ||
) |