This file defines functions, structures and enums for input objects in vlc. More...

Go to the source code of this file.
This file defines functions, structures and enums for input objects in vlc.
| #define input_Create | ( | a, | ||
| b, | ||||
| c, | ||||
| d | ||||
| ) | input_Create(VLC_OBJECT(a),b,c,d) |
Referenced by input_CreateAndStart(), PlayItem(), vlm_ControlMediaInstanceStart(), and vlm_OnMediaUpdate().
| #define input_CreateAndStart | ( | a, | ||
| b, | ||||
| c | ||||
| ) | input_CreateAndStart(VLC_OBJECT(a),b,c) |
| #define INPUT_RATE_DEFAULT 1000 |
Input rate.
It is an float used by the variable "rate" in the range [INPUT_RATE_DEFAULT/INPUT_RATE_MAX, INPUT_RATE_DEFAULT/INPUT_RATE_MAX] the default value being 1. It represents the ratio of playback speed to nominal speed (bigger is faster).
Internally, the rate is stored as a value in the range [INPUT_RATE_MIN, INPUT_RATE_MAX]. internal rate = INPUT_RATE_DEFAULT / rate variable Default rate value
Referenced by aout_DecPlay(), aout_InputPlay(), ClockGetTsOffset(), ClockStreamToSystem(), ClockSystemToStream(), Control(), DecoderFixTs(), DecoderPlayAudio(), EsOutFrameNext(), EsOutGetBuffering(), Init(), input_SendEventRate(), input_vaControl(), inputResamplingStop(), RateCallback(), and vlm_ControlMediaInstanceGets().
| #define INPUT_RATE_MAX 32000 |
Maximal rate value.
Referenced by Control().
| #define INPUT_RATE_MIN 32 |
Minimal rate value.
Referenced by Control().
| #define input_Read | ( | a, | ||
| b | ||||
| ) | input_Read(VLC_OBJECT(a),b) |
Referenced by playlist_Import(), and playlist_MLLoad().
| #define INPUT_RECORD_PREFIX "vlc-record-%Y-%m-%d-%Hh%Mm%Ss-$ N-$ p" |
| #define INPUT_UPDATE_META 0x0040 |
Referenced by UpdateGenericFromAccess(), and UpdateGenericFromDemux().
| #define INPUT_UPDATE_NONE 0x0000 |
| #define INPUT_UPDATE_SEEKPOINT 0x0020 |
Referenced by UpdateTitleSeekpointFromAccess(), and UpdateTitleSeekpointFromDemux().
| #define INPUT_UPDATE_SIGNAL 0x0080 |
Referenced by UpdateGenericFromAccess().
| #define INPUT_UPDATE_SIZE 0x0001 |
| #define INPUT_UPDATE_TITLE 0x0010 |
Referenced by UpdateTitleSeekpointFromAccess(), and UpdateTitleSeekpointFromDemux().
| 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_resource_t input_resource_t |
This defines an opaque input resource handler.
| 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 |
This defines private core storage for an input.
| 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_query_e |
Input queries.
| enum input_state_e |
| static int input_AddSubtitle | ( | input_thread_t * | p_input, | |
| const char * | psz_url, | |||
| bool | b_check_extension | |||
| ) | [inline, static] |
It will add a new subtitle source to the input.
Provided for convenience.
References INPUT_ADD_SUBTITLE, and input_Control().
| void input_Close | ( | input_thread_t * | p_input | ) |
Close an input.
It does not call input_Stop itself.
References input_Join(), and input_Release().
Referenced by LoopInput(), and vlm_OnMediaUpdate().
| int input_Control | ( | input_thread_t * | p_input, | |
| int | i_query, | |||
| ... | ||||
| ) |
Control function for inputs.
| p_input | input handle | |
| i_query | query type |
References input_vaControl(), va_end(), and va_start().
Referenced by Create(), DecoderGetInputAttachments(), EsOutProgramEpg(), EsOutProgramMeta(), EsOutProgramUpdateScrambled(), EsOutUpdateInfo(), input_AddSubtitle(), input_GetAout(), input_GetEsObjects(), input_GetPcrSystem(), input_GetState(), input_GetVout(), input_ModifyPcrSystem(), spu_get_attachments(), and VideoSplitterCallback().
| input_thread_t* input_Create | ( | vlc_object_t * | p_parent, | |
| input_item_t * | p_item, | |||
| const char * | psz_log, | |||
| input_resource_t * | p_resource | |||
| ) |
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 | |
| psz_log | an optional prefix for this input logs | |
| p_resource | an optional input ressource |
References Create().
| input_thread_t* input_CreateAndStart | ( | vlc_object_t * | p_parent, | |
| input_item_t * | p_item, | |||
| const char * | psz_log | |||
| ) |
Create a new input_thread_t and start it.
Provided for convenience.
References input_Create, input_Start(), and vlc_object_release.
| char* input_CreateFilename | ( | vlc_object_t * | , | |
| const char * | psz_path, | |||
| const char * | psz_prefix, | |||
| const char * | psz_extension | |||
| ) |
This function creates a sane filename path.
References asprintf(), DIR_SEP, filename_sanitize(), path_sanitize(), str_format, and vlc_opendir().
Referenced by EsOutSetRecord().
| decoder_t* input_DecoderCreate | ( | vlc_object_t * | , | |
| es_format_t * | , | |||
| input_resource_t * | ||||
| ) |
Spawn a decoder thread outside of the input thread.
References decoder_New().
Put a block_t in the decoder's fifo.
Thread-safe w.r.t. the decoder. May be a cancellation point.
| p_dec | the decoder object | |
| p_block | the data block |
References decoder_owner_sys_t::b_buffering, block_FifoEmpty(), block_FifoPace(), block_FifoPut(), block_FifoSize(), msg_Warn, decoder_owner_sys_t::p_fifo, and decoder_t::p_owner.
Referenced by DecoderFlush(), EsOutControlLocked(), and EsOutSend().
| void input_DecoderDelete | ( | decoder_t * | p_dec | ) |
Kills a decoder thread and waits until it's finished.
| p_input | the input thread | |
| p_es | the es descriptor |
References decoder_owner_sys_t::b_buffering, decoder_owner_sys_t::b_exit, decoder_owner_sys_t::b_flushing, decoder_owner_sys_t::b_paused, decoder_owner_sys_t::b_supported, decoder_owner_sys_t::cc, DeleteDecoder(), input_DecoderSetCcState(), decoder_owner_sys_t::lock, module_unneed, decoder_t::p_module, decoder_t::p_owner, decoder_owner_sys_t::thread, vlc_cancel(), vlc_cond_signal(), vlc_join(), vlc_mutex_lock(), vlc_mutex_unlock(), and decoder_owner_sys_t::wait_request.
Referenced by EsDestroyDecoder(), EsOutSetRecord(), and EsOutTerminate().
| static audio_output_t* input_GetAout | ( | input_thread_t * | p_input | ) | [inline, static] |
Return the audio output (if any) associated with an input.
| p_input | an input thread |
References input_Control(), and INPUT_GET_AOUT.
Referenced by findAout().
| static int input_GetEsObjects | ( | input_thread_t * | p_input, | |
| int | i_id, | |||
| vlc_object_t ** | pp_decoder, | |||
| vout_thread_t ** | pp_vout, | |||
| audio_output_t ** | pp_aout | |||
| ) | [inline, static] |
Returns the objects associated to an ES.
You must release all non NULL object using vlc_object_release. You may set pointer of pointer to NULL to avoid retreiving it.
References input_Control(), and INPUT_GET_ES_OBJECTS.
| 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_thread_t::p, and input_thread_private_t::p_item.
Referenced by DisplayVoutTitle(), EsOutMeta(), EsOutUpdateInfo(), str_format_meta(), and WaitPreparsed().
| static int input_GetPcrSystem | ( | input_thread_t * | p_input, | |
| mtime_t * | pi_system, | |||
| mtime_t * | pi_delay | |||
| ) | [inline, static] |
References input_Control(), and INPUT_GET_PCR_SYSTEM.
| static input_state_e input_GetState | ( | input_thread_t * | p_input | ) | [inline, static] |
It will return the current state of the input.
Provided for convenience.
References input_Control(), and INPUT_GET_STATE.
| static vout_thread_t* input_GetVout | ( | input_thread_t * | p_input | ) | [inline, static] |
Return one of the video output (if any).
If possible, you should use INPUT_GET_VOUTS directly and process _all_ video outputs instead.
| p_input | an input thread from which to get a video output |
References input_Control(), INPUT_GET_VOUTS, and vlc_object_release.
| void input_Join | ( | input_thread_t * | ) |
References input_thread_private_t::is_running, input_thread_t::p, input_thread_private_t::thread, and vlc_join().
Referenced by input_Close(), vlm_ControlMediaInstanceStart(), and vlm_MediaInstanceDelete().
| static int input_ModifyPcrSystem | ( | input_thread_t * | p_input, | |
| bool | b_absolute, | |||
| mtime_t | i_system | |||
| ) | [inline, static] |
References input_Control(), and INPUT_MODIFY_PCR_SYSTEM.
| int input_Read | ( | vlc_object_t * | p_parent, | |
| input_item_t * | p_item | |||
| ) |
Initialize an input thread and run it until it stops by itself.
| p_parent | a vlc_object | |
| p_item | an input item |
References Create(), End(), Init(), MainLoop(), and vlc_object_release.
| void input_Release | ( | input_thread_t * | ) |
References vlc_object_release.
Referenced by input_Close(), vlm_ControlMediaInstanceStart(), and vlm_MediaInstanceDelete().
| input_resource_t* input_resource_New | ( | vlc_object_t * | ) |
It creates an empty input resource handler.
The given object MUST stay alive as long as the input_resource_t is not deleted.
References Destructor(), input_resource_t::lock, input_resource_t::lock_hold, input_resource_t::p_parent, vlc_gc_init, and vlc_mutex_init().
Referenced by Create(), PlayItem(), and vlm_ControlMediaInstanceStart().
| void input_resource_Release | ( | input_resource_t * | ) |
It releases an input resource.
References vlc_gc_decref.
Referenced by Destructor(), playlist_Deactivate(), and vlm_MediaInstanceDelete().
| void input_resource_Terminate | ( | input_resource_t * | ) |
This function releases all resources (object).
References input_resource_TerminateSout(), input_resource_TerminateVout(), input_resource_t::lock, TerminateAout(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by End(), Init(), playlist_Deactivate(), and vlm_MediaInstanceDelete().
| void input_resource_TerminateVout | ( | input_resource_t * | ) |
Forcefully destroys the video output (e.g.
when the playlist is stopped).
References input_resource_RequestVout().
Referenced by EsOutControlLocked(), EsOutDecodersStopBuffering(), input_resource_Terminate(), LoopRequest(), and vlm_ControlMediaInstanceStart().
| 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 ERROR_S, input_ChangeState(), input_thread_private_t::is_running, msg_Err, input_thread_t::p, Run(), input_thread_private_t::thread, vlc_clone(), and VLC_THREAD_PRIORITY_INPUT.
Referenced by input_CreateAndStart(), PlayItem(), vlm_ControlMediaInstanceStart(), and vlm_OnMediaUpdate().
| void input_Stop | ( | input_thread_t * | p_input, | |
| bool | b_abort | |||
| ) |
Request a running input thread to stop and die.
b_abort must be true when a user stop is requested and not because you have detected an error or an eof. It will be used to properly send the INPUT_EVENT_ABORT event.
| p_input | the input thread to stop | |
| b_abort | true if the input has been aborted by a user request |
References input_thread_private_t::b_abort, INPUT_CONTROL_SET_DIE, input_ControlPush(), input_thread_private_t::lock_control, ObjectKillChildrens(), input_thread_t::p, vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_OBJECT.
Referenced by GoAndPreparse(), LoopInput(), vlm_ControlMediaInstanceStart(), vlm_MediaInstanceDelete(), and vlm_OnMediaUpdate().
| int input_vaControl | ( | input_thread_t * | , | |
| int | i_query, | |||
| va_list | ||||
| ) |
References _, asprintf(), input_thread_private_t::attachment, input_thread_t::b_preparsing, input_thread_private_t::bookmark, es_out_Control(), es_out_ControlGetPcrSystem(), es_out_ControlModifyPcrSystem(), ES_OUT_GET_ES_OBJECTS_BY_ID, input_thread_private_t::f_fps, input_thread_private_t::i_attachment, input_thread_private_t::i_bookmark, vlc_value_t::i_int, input_thread_private_t::i_title, INPUT_ADD_BOOKMARK, INPUT_ADD_INFO, INPUT_ADD_SLAVE, INPUT_ADD_SUBTITLE, INPUT_CHANGE_BOOKMARK, INPUT_CLEAR_BOOKMARKS, INPUT_CONTROL_ADD_SLAVE, INPUT_CONTROL_ADD_SUBTITLE, INPUT_CONTROL_RESTART_ES, INPUT_CONTROL_SET_BOOKMARK, input_ControlPush(), INPUT_DEL_BOOKMARK, INPUT_DEL_INFO, INPUT_GET_AOUT, INPUT_GET_ATTACHMENT, INPUT_GET_ATTACHMENTS, INPUT_GET_AUDIO_DELAY, INPUT_GET_BOOKMARK, INPUT_GET_BOOKMARKS, INPUT_GET_ES_OBJECTS, INPUT_GET_INFO, INPUT_GET_LENGTH, INPUT_GET_PCR_SYSTEM, INPUT_GET_POSITION, INPUT_GET_RATE, INPUT_GET_RECORD_STATE, INPUT_GET_SPU_DELAY, INPUT_GET_STATE, INPUT_GET_TIME, INPUT_GET_TITLE_INFO, INPUT_GET_VIDEO_FPS, INPUT_GET_VOUTS, input_item_AddInfo(), input_item_DelInfo(), input_item_GetInfo(), input_item_MergeInfos(), input_item_ReplaceInfos(), input_item_SetName(), INPUT_MERGE_INFOS, INPUT_MODIFY_PCR_SYSTEM, INPUT_RATE_DEFAULT, INPUT_REPLACE_INFOS, input_resource_HoldAout(), input_resource_HoldVouts(), INPUT_RESTART_ES, input_SendEventMetaInfo(), input_SendEventMetaName(), INPUT_SET_AUDIO_DELAY, INPUT_SET_BOOKMARK, INPUT_SET_NAME, INPUT_SET_POSITION, INPUT_SET_RATE, INPUT_SET_RECORD_STATE, INPUT_SET_SPU_DELAY, INPUT_SET_STATE, INPUT_SET_TIME, input_item_t::lock, msg_Err, input_thread_t::p, input_thread_private_t::p_es_out_display, input_thread_private_t::p_item, input_thread_private_t::p_resource, input_thread_private_t::pp_bookmark, input_attachment_t::psz_name, seekpoint_t::psz_name, psz_name, vlc_value_t::psz_string, psz_value, strdup(), subtitles_Filter(), TAB_APPEND, TAB_REMOVE, input_thread_private_t::title, UpdateBookmarksOption(), var_GetBool, var_GetFloat, var_GetInteger, var_GetTime, var_SetBool, var_SetFloat, var_SetInteger, var_SetTime, vasprintf(), VLC_EGENERIC, vlc_input_attachment_Duplicate(), vlc_input_title_Duplicate(), vlc_mutex_lock(), vlc_mutex_unlock(), vlc_seekpoint_Delete(), and vlc_seekpoint_Duplicate().
Referenced by input_Control().
| static void vlc_audio_replay_gain_MergeFromMeta | ( | audio_replay_gain_t * | p_dst, | |
| const vlc_meta_t * | p_meta | |||
| ) | [inline, static] |
References atof(), audio_replay_gain_t::pb_gain, audio_replay_gain_t::pb_peak, audio_replay_gain_t::pf_gain, audio_replay_gain_t::pf_peak, psz_value, and vlc_meta_GetExtra().
Referenced by EsOutAdd().
| static void vlc_input_attachment_Delete | ( | input_attachment_t * | a | ) | [inline, static] |
References input_attachment_t::p_data, input_attachment_t::psz_description, input_attachment_t::psz_mime, and input_attachment_t::psz_name.
Referenced by End(), input_ExtractAttachmentAndCacheArt(), and LoadSubtitles().
| static input_attachment_t* vlc_input_attachment_Duplicate | ( | const input_attachment_t * | a | ) | [inline, static] |
| static input_attachment_t* vlc_input_attachment_New | ( | const char * | psz_name, | |
| const char * | psz_mime, | |||
| const char * | psz_description, | |||
| const void * | p_data, | |||
| int | i_data | |||
| ) | [inline, static] |
| static void vlc_input_title_Delete | ( | input_title_t * | t | ) | [inline, static] |
References input_title_t::i_seekpoint, seekpoint_t::psz_name, input_title_t::psz_name, and input_title_t::seekpoint.
Referenced by InputSourceClean().
| static input_title_t* vlc_input_title_Duplicate | ( | const input_title_t * | t | ) | [inline, static] |
| static input_title_t* vlc_input_title_New | ( | void | ) | [inline, static] |
References input_title_t::b_menu, input_title_t::i_length, input_title_t::i_seekpoint, input_title_t::i_size, input_title_t::psz_name, and input_title_t::seekpoint.
Referenced by vlc_input_title_Duplicate().
| static void vlc_seekpoint_Delete | ( | seekpoint_t * | point | ) | [inline, static] |
References seekpoint_t::psz_name.
Referenced by Create(), and input_vaControl().
| static seekpoint_t* vlc_seekpoint_Duplicate | ( | const seekpoint_t * | src | ) | [inline, static] |
References seekpoint_t::i_byte_offset, seekpoint_t::i_time_offset, seekpoint_t::psz_name, strdup(), and vlc_seekpoint_New().
Referenced by input_vaControl(), and vlc_input_title_Duplicate().
| static seekpoint_t* vlc_seekpoint_New | ( | void | ) | [inline, static] |
References seekpoint_t::i_byte_offset, seekpoint_t::i_time_offset, and seekpoint_t::psz_name.
Referenced by Create(), and vlc_seekpoint_Duplicate().
1.7.1