|
VLC
2.1.0-git
|
This file defines functions, structures and enums for input objects in vlc. More...

Go to the source code of this file.
Data Structures | |
| struct | seekpoint_t |
| struct | input_title_t |
| struct | input_attachment_t |
| struct | input_thread_t |
| Main structure representing an input thread. More... | |
Macros | |
| #define | INPUT_UPDATE_NONE 0x0000 |
| #define | INPUT_UPDATE_SIZE 0x0001 |
| #define | INPUT_UPDATE_TITLE 0x0010 |
| #define | INPUT_UPDATE_SEEKPOINT 0x0020 |
| #define | INPUT_UPDATE_META 0x0040 |
| #define | INPUT_UPDATE_SIGNAL 0x0080 |
| #define | INPUT_UPDATE_TITLE_LIST 0x0100 |
| #define | INPUT_RECORD_PREFIX "vlc-record-%Y-%m-%d-%Hh%Mm%Ss-$ N-$ p" |
| Record prefix string. | |
| #define | INPUT_RATE_DEFAULT 1000 |
| Input rate. | |
| #define | INPUT_RATE_MIN 32 /* Up to 32/1 */ |
| Minimal rate value. | |
| #define | INPUT_RATE_MAX 32000 /* Up to 1/32 */ |
| Maximal rate value. | |
| #define | input_Create(a, b, c, d) input_Create(VLC_OBJECT(a),b,c,d) |
| #define | input_CreateAndStart(a, b, c) input_CreateAndStart(VLC_OBJECT(a),b,c) |
| #define | input_Read(a, b) input_Read(VLC_OBJECT(a),b) |
Typedefs | |
| typedef struct input_thread_private_t | input_thread_private_t |
| This defines private core storage for an input. | |
| 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. | |
| typedef enum input_event_type_e | input_event_type_e |
| Input events. | |
Functions | |
| static void | vlc_audio_replay_gain_MergeFromMeta (audio_replay_gain_t *p_dst, const vlc_meta_t *p_meta) |
| static seekpoint_t * | vlc_seekpoint_New (void) |
| static void | vlc_seekpoint_Delete (seekpoint_t *point) |
| static seekpoint_t * | vlc_seekpoint_Duplicate (const seekpoint_t *src) |
| static input_title_t * | vlc_input_title_New (void) |
| static void | vlc_input_title_Delete (input_title_t *t) |
| static input_title_t * | vlc_input_title_Duplicate (const input_title_t *t) |
| 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) |
| static input_attachment_t * | vlc_input_attachment_Duplicate (const input_attachment_t *a) |
| static void | vlc_input_attachment_Delete (input_attachment_t *a) |
| input_thread_t * | input_Create (vlc_object_t *p_parent, input_item_t *, const char *psz_log, input_resource_t *) |
| input_thread_t * | input_CreateAndStart (vlc_object_t *p_parent, input_item_t *, const char *psz_log) |
| int | input_Start (input_thread_t *) |
| Start a input_thread_t created by input_Create. | |
| void | input_Stop (input_thread_t *, bool b_abort) |
| Request a running input thread to stop and die. | |
| int | input_Read (vlc_object_t *, input_item_t *) |
| int | input_vaControl (input_thread_t *, int i_query, va_list) |
| int | input_Control (input_thread_t *, int i_query,...) |
| Control function for inputs. | |
| void | input_Close (input_thread_t *) |
| Close an input. | |
| void | input_Join (input_thread_t *) |
| void | input_Release (input_thread_t *) |
| input_item_t * | input_GetItem (input_thread_t *) |
| Get the input item for an input thread. | |
| static input_state_e | input_GetState (input_thread_t *p_input) |
| It will return the current state of the input. | |
| static int | input_AddSubtitle (input_thread_t *p_input, const char *psz_url, bool b_check_extension) |
| It will add a new subtitle source to the input. | |
| static vout_thread_t * | input_GetVout (input_thread_t *p_input) |
| Return one of the video output (if any). | |
| static audio_output_t * | input_GetAout (input_thread_t *p_input) |
| Return the audio output (if any) associated with an input. | |
| 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) |
| Returns the objects associated to an ES. | |
| static int | input_GetPcrSystem (input_thread_t *p_input, mtime_t *pi_system, mtime_t *pi_delay) |
| static int | input_ModifyPcrSystem (input_thread_t *p_input, bool b_absolute, mtime_t i_system) |
| decoder_t * | input_DecoderCreate (vlc_object_t *, es_format_t *, input_resource_t *) |
| Spawn a decoder thread outside of the input thread. | |
| void | input_DecoderDelete (decoder_t *) |
| Kills a decoder thread and waits until it's finished. | |
| void | input_DecoderDecode (decoder_t *, block_t *, bool b_do_pace) |
| Put a block_t in the decoder's fifo. | |
| 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. | |
| input_resource_t * | input_resource_New (vlc_object_t *) |
| It creates an empty input resource handler. | |
| void | input_resource_Release (input_resource_t *) |
| It releases an input resource. | |
| void | input_resource_TerminateVout (input_resource_t *) |
| Forcefully destroys the video output (e.g. | |
| void | input_resource_Terminate (input_resource_t *) |
| This function releases all resources (object). | |
| audio_output_t * | input_resource_HoldAout (input_resource_t *) |
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_MIN] 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_DecSynchronize(), aout_FiltersPlay(), ClockGetTsOffset(), ClockStreamToSystem(), ClockSystemToStream(), Control(), Create(), CreateDecoder(), decoder_GetDisplayRate(), decoder_SynchroChoose(), DecoderFixTs(), DecoderGetDisplayRate(), DecoderPlayAudio(), DecoderPlayVideo(), EsOutFrameNext(), EsOutGetBuffering(), Init(), input_clock_ConvertTS(), input_SendEventRate(), input_vaControl(), RateCallback(), vlm_ControlMediaInstanceGets(), and vlm_media_instance_Init().
| #define INPUT_RATE_MAX 32000 /* Up to 1/32 */ |
Maximal rate value.
Referenced by Control().
| #define INPUT_RATE_MIN 32 /* Up to 32/1 */ |
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(), and UpdateGenericFromDemux().
| #define INPUT_UPDATE_SIZE 0x0001 |
Referenced by UpdateGenericFromAccess(), and UpdateGenericFromDemux().
| #define INPUT_UPDATE_TITLE 0x0010 |
Referenced by UpdateTitleSeekpointFromAccess(), and UpdateTitleSeekpointFromDemux().
| #define INPUT_UPDATE_TITLE_LIST 0x0100 |
Referenced by MainLoopDemux().
| 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 |
|
inlinestatic |
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().
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 * | , | ||
| const char * | psz_log, | ||
| input_resource_t * | |||
| ) |
| input_thread_t* input_CreateAndStart | ( | vlc_object_t * | p_parent, |
| input_item_t * | , | ||
| const char * | psz_log | ||
| ) |
| 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(), pl_Get, 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().
|
inlinestatic |
Return the audio output (if any) associated with an input.
| p_input | an input thread |
References input_Control(), and INPUT_GET_AOUT.
|
inlinestatic |
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(), and str_format_meta().
|
inlinestatic |
References input_Control(), and INPUT_GET_PCR_SYSTEM.
|
inlinestatic |
It will return the current state of the input.
Provided for convenience.
References INIT_S, input_Control(), and INPUT_GET_STATE.
|
inlinestatic |
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().
|
inlinestatic |
References input_Control(), and INPUT_MODIFY_PCR_SYSTEM.
| int input_Read | ( | vlc_object_t * | , |
| input_item_t * | |||
| ) |
| void input_Release | ( | input_thread_t * | ) |
References vlc_object_release.
Referenced by input_Close(), vlm_ControlMediaInstanceStart(), and vlm_MediaInstanceDelete().
| audio_output_t* input_resource_HoldAout | ( | input_resource_t * | ) |
References input_resource_t::lock_hold, input_resource_t::p_aout, vlc_mutex_lock(), vlc_mutex_unlock(), and vlc_object_hold.
Referenced by input_vaControl(), and playlist_GetAout().
| 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 atomic_init, input_resource_t::lock, input_resource_t::lock_hold, input_resource_t::p_parent, input_resource_t::refs, and vlc_mutex_init().
Referenced by Create(), playlist_Create(), and vlm_MediaInstanceNew().
| void input_resource_Release | ( | input_resource_t * | ) |
It releases an input resource.
References aout_Destroy(), DestroySout(), DestroyVout(), input_resource_t::lock, input_resource_t::lock_hold, input_resource_t::p_aout, input_resource_t::refs, and vlc_mutex_destroy().
Referenced by Destructor(), playlist_Destroy(), and vlm_MediaInstanceDelete().
| void input_resource_Terminate | ( | input_resource_t * | ) |
This function releases all resources (object).
References input_resource_TerminateAout(), input_resource_TerminateSout(), and input_resource_TerminateVout().
Referenced by End(), Init(), Thread(), 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(), Thread(), 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 |
< Unspecified error
< No error
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(), VLC_EGENERIC, VLC_SUCCESS, 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 | |||
| ) |
< No error
< No error
< No error
< No error
< No error
< No error
< No error
< No error
< Unspecified error
< No error
< Unspecified error
< Unspecified error
< No error
< No error
< No error
< No error
< Unspecified error
< No error
< Unspecified error
< No error
< No error
< No error
< No error
< Unspecified error
< No error
< No error
< Unspecified error
< Unspecified error
< No error
< Unspecified error
< No error
< No error
< Unspecified error
< No error
< No error
< No error
< Unspecified error
< No error
< Unspecified error
< No error
< Unspecified error
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_NAV_ACTIVATE, 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_NAV_ACTIVATE, INPUT_NAV_DOWN, INPUT_NAV_LEFT, INPUT_NAV_RIGHT, INPUT_NAV_UP, 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, seekpoint_t::psz_name, input_attachment_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(), vlc_seekpoint_Duplicate(), and VLC_SUCCESS.
Referenced by input_Control().
|
inlinestatic |
|
inlinestatic |
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().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
References input_title_t::i_seekpoint, seekpoint_t::psz_name, input_title_t::psz_name, and input_title_t::seekpoint.
Referenced by InputSourceClean(), and UpdateTitleListfromDemux().
|
inlinestatic |
|
inlinestatic |
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().
|
inlinestatic |
References seekpoint_t::psz_name.
Referenced by Create(), and input_vaControl().
|
inlinestatic |
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().
|
inlinestatic |
References seekpoint_t::i_byte_offset, seekpoint_t::i_time_offset, and seekpoint_t::psz_name.
Referenced by Create(), and vlc_seekpoint_Duplicate().
1.8.1.2