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) input_Create(VLC_OBJECT(a),b,c,d,e,f) |
#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 |
Referenced by input_ControlPush().
#define input_Create | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f | |||
) | input_Create(VLC_OBJECT(a),b,c,d,e,f) |
#define INPUT_PTS_DELAY_MAX VLC_TICK_FROM_SEC(60) |
Referenced by EsOutVaControlLocked(), and InputSourceNew().
#define VLC_INPUT_CAPABILITIES_CHANGE_RATE (1<<2) |
Referenced by InputSourceNew().
#define VLC_INPUT_CAPABILITIES_PAUSEABLE (1<<1) |
Referenced by InputSourceNew().
#define VLC_INPUT_CAPABILITIES_RECORDABLE (1<<4) |
Referenced by InputSourceNew().
#define VLC_INPUT_CAPABILITIES_REWINDABLE (1<<3) |
Referenced by InputSourceNew().
#define VLC_INPUT_CAPABILITIES_SEEKABLE (1<<0) |
Referenced by InputSourceNew().
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 |
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(), thumbnailer_request_Release(), and vlc_player_input_Delete().
void input_ConfigVarInit | ( | input_thread_t * | ) |
References input_priv(), var_Create(), VLC_VAR_BOOL, VLC_VAR_DOINHERIT, VLC_VAR_FLOAT, VLC_VAR_INTEGER, and VLC_VAR_STRING.
Referenced by Create().
int input_ControlPush | ( | input_thread_t * | , |
int | , | ||
const input_control_param_t * | |||
) |
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_StartVout(), input_SetPosition(), input_SetTime(), vlc_player_input_New(), 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_SetCategoryDelay(), vlc_player_SetEsIdDelay(), vlc_player_SetTeletextTransparency(), and vlc_player_UpdateViewpoint().
|
inlinestatic |
References INPUT_CONTROL_RESTART_ES, INPUT_CONTROL_SET_ES, INPUT_CONTROL_UNSET_ES, input_ControlPush(), input_ControlSync(), input_GetAttachment(), input_GetAttachments(), input_Stopped(), name, and vlc_es_id_Hold().
Referenced by vlc_player_RestartEsId(), vlc_player_SelectEsId(), and vlc_player_UnselectEsId().
|
inlinestatic |
References input_ControlPush(), and input_control_param_t::val.
Referenced by Init(), MainLoopTryRepeat(), StartTitle(), TsRun(), vlc_player_AddAssociatedMedia(), vlc_player_ChangeRate(), vlc_player_Navigate(), vlc_player_NextVideoFrame(), vlc_player_SelectChapterIdx(), vlc_player_SelectProgram(), vlc_player_SelectTitleIdx(), vlc_player_SetAssociatedSubsFPS(), vlc_player_SetPause(), vlc_player_SetRecordingEnabled(), and vlc_player_SetRenderer().
void input_ControlSync | ( | input_thread_t * | , |
int | , | ||
const input_control_param_t * | |||
) |
Synchronously execute a control sequence.
This MUST only be used before the input is started
References Control(), and input_priv().
Referenced by input_ControlPushEsHelper(), and vlc_player_input_RestoreMlStates().
input_thread_t* input_Create | ( | vlc_object_t * | p_parent, |
input_thread_events_cb | events_cb, | ||
void * | events_data, | ||
input_item_t * | p_item, | ||
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 Create(), and INPUT_CREATE_OPTION_NONE.
Referenced by vlc_player_input_New().
input_thread_t* input_CreatePreparser | ( | vlc_object_t * | obj, |
input_thread_events_cb | events_cb, | ||
void * | events_data, | ||
input_item_t * | item | ||
) |
Creates an item preparser.
Creates an input thread to preparse an item. The input needs to be started with input_Start() afterwards.
obj | parent object |
item | input item to preparse |
References Create(), and INPUT_CREATE_OPTION_PREPARSING.
Referenced by input_item_Parse().
input_thread_t* input_CreateThumbnailer | ( | vlc_object_t * | obj, |
input_thread_events_cb | events_cb, | ||
void * | events_data, | ||
input_item_t * | item | ||
) |
References Create(), and INPUT_CREATE_OPTION_THUMBNAILING.
Referenced by thumbnailer_request_Start().
void input_ExtractAttachmentAndCacheArt | ( | input_thread_t * | , |
const char * | name | ||
) |
References input_attachment_t::i_data, input_FindArtInCache(), input_GetAttachment(), input_item_IsArtFetched(), input_priv(), input_SaveArt(), likely, msg_Warn, input_attachment_t::p_data, input_thread_private_t::p_item, input_attachment_t::psz_mime, vlc_input_attachment_Delete(), 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, input_thread_private_t::p_item, input_attachment_t::psz_name, vlc_input_attachment_Duplicate(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by accessNewAttachment(), input_ControlPushEsHelper(), 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_Duplicate(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by decoder_get_attachments(), input_ControlPushEsHelper(), 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(), and vlc_player_UpdateMLStates().
|
inlinestatic |
References container_of.
Referenced by AStreamReadBlock(), AStreamReadStream(), Control(), ControlGetReducedIndexLocked(), ControlInsertDemuxFilter(), ControlLockedGetWakeup(), ControlLockedSetPauseState(), ControlLockedSetRate(), ControlNav(), ControlPause(), ControlPop(), ControlUnpause(), Create(), decoder_on_new_audio_stats(), decoder_on_new_video_stats(), Destroy(), End(), EsOutCreateDecoder(), EsOutDeleteInfoEs(), EsOutEpgTime(), EsOutFillEsFmt(), EsOutGetWakeup(), EsOutMeta(), EsOutProgramEpg(), EsOutProgramEpgEvent(), EsOutProgramMeta(), EsOutProgramSelect(), EsOutProgramUpdateScrambled(), EsOutPropsInit(), EsOutSelectEs(), EsOutSend(), EsOutSendEsEvent(), EsOutSetRecord(), EsOutStopFreeVout(), EsOutTerminate(), EsOutUpdateInfo(), EsOutVaControlLocked(), Init(), InitPrograms(), InitTitle(), input_ChangeState(), input_Close(), input_ConfigVarInit(), input_ControlPush(), input_ControlSync(), input_ExtractAttachmentAndCacheArt(), input_GetAttachment(), input_GetAttachments(), input_GetItem(), input_SendEvent(), input_SlaveSourceAdd(), input_Start(), input_Stop(), input_Stopped(), InputDemuxNew(), InputSourceMeta(), InputSourceNew(), 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().
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 * | , |
float | f_position, | ||
bool | b_fast | ||
) |
void input_SetTime | ( | input_thread_t * | , |
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(), StartTitle(), and thumbnailer_request_Start().
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_thread_private_t::b_preparsing, input_priv(), input_thread_private_t::is_running, msg_Err, Preparse(), Run(), input_thread_private_t::thread, vlc_clone(), VLC_EGENERIC, VLC_SUCCESS, and VLC_THREAD_PRIORITY_INPUT.
Referenced by input_item_Parse(), thumbnailer_request_Start(), and vlc_player_input_Start().
void input_stats_Compute | ( | struct input_stats * | , |
input_stats_t * | |||
) |
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_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_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::lost_abuffers, input_stats::lost_pictures, input_stats::played_abuffers, and unlikely.
Referenced by Create().
void input_stats_Destroy | ( | struct input_stats * | ) |
References input_stats::demux_bitrate, input_stats::input_bitrate, input_rate_t::lock, and vlc_mutex_destroy().
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(), on_thumbnailer_input_event(), thumbnailer_request_Stop(), and vlc_player_destructor_Thread().
bool input_Stopped | ( | input_thread_t * | ) |
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(), input_ControlPushEsHelper(), InputSourceNew(), 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 ARRAY_SIZE, asprintf(), input_item_slave::b_forced, DIR_SEP, DIR_SEP_CHAR, input_item_slave::i_priority, input_item_slave_Delete, input_item_slave_New(), msg_Dbg, noslave_exts, 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(), strcpy_get_ext(), strcpy_strip_ext(), strcpy_trim(), strdup(), subtitles_Filter(), TAB_APPEND, var_GetInteger(), 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 * | ) |
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 | ||
) |