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

Go to the source code of this file.
Data Structures | |
| struct | info_t |
| struct | info_category_t |
| struct | input_item_t |
| struct | input_item_node_t |
| struct | input_stats_t |
Macros | |
| #define | INPUT_META(name) |
| #define | input_item_SetTrackNum input_item_SetTrackNumber |
| #define | input_item_GetTrackNum input_item_GetTrackNumber |
| #define | input_item_SetArtURL input_item_SetArtworkURL |
| #define | input_item_GetArtURL input_item_GetArtworkURL |
| #define | input_item_New(a, b) input_item_NewExt( a, b, 0, NULL, 0, -1 ) |
| This function creates a new input_item_t with the provided information. | |
| #define | vlc_gc_incref(i) input_item_Hold(i) |
| #define | vlc_gc_decref(i) input_item_Release(i) |
Enumerations | |
| enum | input_item_type_e { ITEM_TYPE_UNKNOWN, ITEM_TYPE_FILE, ITEM_TYPE_DIRECTORY, ITEM_TYPE_DISC, ITEM_TYPE_CDDA, ITEM_TYPE_CARD, ITEM_TYPE_NET, ITEM_TYPE_PLAYLIST, ITEM_TYPE_NODE, ITEM_TYPE_NUMBER } |
| enum | input_item_option_e { VLC_INPUT_OPTION_TRUSTED = 0x2, VLC_INPUT_OPTION_UNIQUE = 0x100 } |
| Option flags. More... | |
Functions | |
| void | input_item_CopyOptions (input_item_t *p_parent, input_item_t *p_child) |
| void | input_item_SetName (input_item_t *p_item, const char *psz_name) |
| void | input_item_PostSubItem (input_item_t *p_parent, input_item_t *p_child) |
| Add one subitem to this item. | |
| input_item_node_t * | input_item_node_Create (input_item_t *p_input) |
| Start adding multiple subitems. | |
| input_item_node_t * | input_item_node_AppendItem (input_item_node_t *p_node, input_item_t *p_item) |
| Add a new child node to this parent node that will point to this subitem. | |
| void | input_item_node_AppendNode (input_item_node_t *p_parent, input_item_node_t *p_child) |
| Add an already created node to children of this parent node. | |
| void | input_item_node_Delete (input_item_node_t *p_node) |
| Delete a node created with input_item_node_Create() and all its children. | |
| void | input_item_node_PostAndDelete (input_item_node_t *p_node) |
| End adding multiple subitems. | |
| int | input_item_AddOption (input_item_t *, const char *, unsigned i_flags) |
| This function allows to add an option to an existing input_item_t. | |
| bool | input_item_HasErrorWhenReading (input_item_t *) |
| void | input_item_SetMeta (input_item_t *, vlc_meta_type_t meta_type, const char *psz_val) |
| bool | input_item_MetaMatch (input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz) |
| char * | input_item_GetMeta (input_item_t *p_i, vlc_meta_type_t meta_type) |
| char * | input_item_GetName (input_item_t *p_i) |
| char * | input_item_GetTitleFbName (input_item_t *p_i) |
| char * | input_item_GetURI (input_item_t *p_i) |
| void | input_item_SetURI (input_item_t *p_i, const char *psz_uri) |
| mtime_t | input_item_GetDuration (input_item_t *p_i) |
| void | input_item_SetDuration (input_item_t *p_i, mtime_t i_duration) |
| bool | input_item_IsPreparsed (input_item_t *p_i) |
| bool | input_item_IsArtFetched (input_item_t *p_i) |
| static void | input_item_SetTitle (input_item_t *p_input, const char *val) |
| static char * | input_item_GetTitle (input_item_t *p_input) |
| static void | input_item_SetArtist (input_item_t *p_input, const char *val) |
| static char * | input_item_GetArtist (input_item_t *p_input) |
| static void | input_item_SetGenre (input_item_t *p_input, const char *val) |
| static char * | input_item_GetGenre (input_item_t *p_input) |
| static void | input_item_SetCopyright (input_item_t *p_input, const char *val) |
| static char * | input_item_GetCopyright (input_item_t *p_input) |
| static void | input_item_SetAlbum (input_item_t *p_input, const char *val) |
| static char * | input_item_GetAlbum (input_item_t *p_input) |
| static void | input_item_SetTrackNumber (input_item_t *p_input, const char *val) |
| static char * | input_item_GetTrackNumber (input_item_t *p_input) |
| static void | input_item_SetDescription (input_item_t *p_input, const char *val) |
| static char * | input_item_GetDescription (input_item_t *p_input) |
| static void | input_item_SetRating (input_item_t *p_input, const char *val) |
| static char * | input_item_GetRating (input_item_t *p_input) |
| static void | input_item_SetDate (input_item_t *p_input, const char *val) |
| static char * | input_item_GetDate (input_item_t *p_input) |
| static void | input_item_SetSetting (input_item_t *p_input, const char *val) |
| static char * | input_item_GetSetting (input_item_t *p_input) |
| static void | input_item_SetURL (input_item_t *p_input, const char *val) |
| static char * | input_item_GetURL (input_item_t *p_input) |
| static void | input_item_SetLanguage (input_item_t *p_input, const char *val) |
| static char * | input_item_GetLanguage (input_item_t *p_input) |
| static void | input_item_SetNowPlaying (input_item_t *p_input, const char *val) |
| static char * | input_item_GetNowPlaying (input_item_t *p_input) |
| static void | input_item_SetPublisher (input_item_t *p_input, const char *val) |
| static char * | input_item_GetPublisher (input_item_t *p_input) |
| static void | input_item_SetEncodedBy (input_item_t *p_input, const char *val) |
| static char * | input_item_GetEncodedBy (input_item_t *p_input) |
| static void | input_item_SetArtworkURL (input_item_t *p_input, const char *val) |
| static char * | input_item_GetArtworkURL (input_item_t *p_input) |
| static void | input_item_SetTrackID (input_item_t *p_input, const char *val) |
| static char * | input_item_GetTrackID (input_item_t *p_input) |
| static void | input_item_SetTrackTotal (input_item_t *p_input, const char *val) |
| static char * | input_item_GetTrackTotal (input_item_t *p_input) |
| char * | input_item_GetInfo (input_item_t *p_i, const char *psz_cat, const char *psz_name) |
| Get a info item from a given category in a given input item. | |
| int | input_item_AddInfo (input_item_t *p_i, const char *psz_cat, const char *psz_name, const char *psz_format,...) |
| int | input_item_DelInfo (input_item_t *p_i, const char *psz_cat, const char *psz_name) |
| void | input_item_ReplaceInfos (input_item_t *, info_category_t *) |
| void | input_item_MergeInfos (input_item_t *, info_category_t *) |
| input_item_t * | input_item_NewWithType (const char *psz_uri, const char *psz_name, int i_options, const char *const *ppsz_options, unsigned i_option_flags, mtime_t i_duration, int i_type) |
| This function creates a new input_item_t with the provided information. | |
| input_item_t * | input_item_NewExt (const char *psz_uri, const char *psz_name, int i_options, const char *const *ppsz_options, unsigned i_option_flags, mtime_t i_duration) |
| This function creates a new input_item_t with the provided information. | |
| input_item_t * | input_item_Copy (input_item_t *) |
| This function creates a new input_item_t as a copy of another. | |
| input_item_t * | input_item_Hold (input_item_t *) |
| Holds an input item, i.e. | |
| void | input_item_Release (input_item_t *) |
| Releases an input item, i.e. | |
This file defines functions, structures and enums for input items in vlc.
| #define input_item_GetArtURL input_item_GetArtworkURL |
Referenced by DownloadArt(), EsOutMeta(), FindArt(), input_ExtractAttachmentAndCacheArt(), and PlayItem().
| #define input_item_GetTrackNum input_item_GetTrackNumber |
Referenced by str_format_meta().
| #define input_item_New | ( | a, | |
| b | |||
| ) | input_item_NewExt( a, b, 0, NULL, 0, -1 ) |
This function creates a new input_item_t with the provided information.
Provided for convenience.
Referenced by vlm_ControlMediaAdd(), vlm_MediaInstanceNew(), and vlm_OnMediaUpdate().
| #define input_item_SetArtURL input_item_SetArtworkURL |
Referenced by EsOutMeta(), FindArt(), playlist_FindArtInCache(), playlist_FindArtInCacheUsingItemUID(), and playlist_SaveArt().
| #define input_item_SetTrackNum input_item_SetTrackNumber |
| #define INPUT_META | ( | name | ) |
| #define vlc_gc_decref | ( | i | ) | input_item_Release(i) |
| #define vlc_gc_incref | ( | i | ) | input_item_Hold(i) |
Referenced by Create(), input_item_node_Create(), playlist_fetcher_Push(), playlist_ItemNewFromInput(), and playlist_preparser_Push().
| enum input_item_option_e |
| enum input_item_type_e |
| int input_item_AddInfo | ( | input_item_t * | p_i, |
| const char * | psz_cat, | ||
| const char * | psz_name, | ||
| const char * | psz_format, | ||
| ... | |||
| ) |
References input_item_t::event_manager, InputItemVaAddInfo(), input_item_t::lock, vlc_event_t::type, vlc_event_send(), vlc_InputItemInfoChanged, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by input_vaControl().
| int input_item_AddOption | ( | input_item_t * | , |
| const char * | , | ||
| unsigned | i_flags | ||
| ) |
This function allows to add an option to an existing input_item_t.
< No error
< Unspecified error
< Not enough memory
References input_item_t::i_options, INSERT_ELEM, input_item_t::lock, input_item_t::optflagc, input_item_t::optflagv, input_item_t::ppsz_options, strdup(), VLC_EGENERIC, VLC_ENOMEM, VLC_INPUT_OPTION_UNIQUE, vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_SUCCESS.
Referenced by input_item_Copy(), input_item_CopyOptions(), input_item_NewWithType(), UpdateBookmarksOption(), vlm_ControlMediaInstanceStart(), and vlm_OnMediaUpdate().
| input_item_t* input_item_Copy | ( | input_item_t * | ) |
This function creates a new input_item_t as a copy of another.
References input_item_t::i_duration, input_item_t::i_options, input_item_t::i_type, input_item_AddOption(), input_item_NewWithType(), input_item_t::lock, input_item_t::optflagv, input_item_t::p_meta, input_item_t::ppsz_options, input_item_t::psz_name, input_item_t::psz_uri, vlc_meta_Merge(), vlc_meta_New(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by RecursiveInsertCopy().
| void input_item_CopyOptions | ( | input_item_t * | p_parent, |
| input_item_t * | p_child | ||
| ) |
| int input_item_DelInfo | ( | input_item_t * | p_i, |
| const char * | psz_cat, | ||
| const char * | psz_name | ||
| ) |
< Unspecified error
< Unspecified error
< No error
References input_item_t::event_manager, input_item_t::i_categories, info_category_Delete(), info_category_DeleteInfo(), InputItemFindCat(), input_item_t::lock, input_item_t::pp_categories, REMOVE_ELEM, vlc_event_t::type, VLC_EGENERIC, vlc_event_send(), vlc_InputItemInfoChanged, vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_SUCCESS.
Referenced by input_item_SetEpg(), input_item_SetEpgOffline(), and input_vaControl().
|
inlinestatic |
Referenced by FindArt(), GoAndPreparse(), and str_format_meta().
|
inlinestatic |
Referenced by DisplayVoutTitle(), FindArt(), GoAndPreparse(), and str_format_meta().
|
inlinestatic |
|
inlinestatic |
Referenced by str_format_meta().
|
inlinestatic |
Referenced by str_format_meta().
|
inlinestatic |
Referenced by str_format_meta().
| mtime_t input_item_GetDuration | ( | input_item_t * | p_i | ) |
References input_item_t::i_duration, input_item_t::lock, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by Init(), playlist_GetNodeDuration(), proto_SORT_DURATION(), and str_format_meta().
|
inlinestatic |
Referenced by str_format_meta().
|
inlinestatic |
Referenced by str_format_meta().
| char* input_item_GetInfo | ( | input_item_t * | p_i, |
| const char * | psz_cat, | ||
| const char * | psz_name | ||
| ) |
Get a info item from a given category in a given input item.
| p_i | The input item to get info from |
| psz_cat | String representing the category for the info |
| psz_name | String representing the name of the desired info |
References info_category_FindInfo(), InputItemFindCat(), input_item_t::lock, info_t::psz_value, strdup(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by input_vaControl(), playlist_FindArtInCacheUsingItemUID(), and playlist_SaveArt().
|
inlinestatic |
Referenced by str_format_meta().
| char* input_item_GetMeta | ( | input_item_t * | p_i, |
| vlc_meta_type_t | meta_type | ||
| ) |
References input_item_t::lock, input_item_t::p_meta, strdup(), vlc_meta_Get(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by meta_sort().
| char* input_item_GetName | ( | input_item_t * | p_i | ) |
References input_item_t::lock, input_item_t::psz_name, psz_name, strdup(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by Create(), Destructor(), DisplayVoutTitle(), FindArt(), PlayItem(), str_format_meta(), and Thread().
|
inlinestatic |
Referenced by DisplayVoutTitle(), str_format_meta(), and vout_OSDEpg().
|
inlinestatic |
Referenced by str_format_meta().
|
inlinestatic |
Referenced by str_format_meta().
|
inlinestatic |
|
inlinestatic |
Referenced by DisplayVoutTitle(), FindArt(), and str_format_meta().
| char* input_item_GetTitleFbName | ( | input_item_t * | p_i | ) |
References EMPTY_STR, input_item_t::lock, input_item_t::p_meta, input_item_t::psz_name, strdup(), vlc_meta_Get(), vlc_meta_Title, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by meta_strcasecmp_title(), proto_SORT_TITLE_NUMERIC(), and str_format_meta().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| char* input_item_GetURI | ( | input_item_t * | p_i | ) |
References input_item_t::lock, input_item_t::psz_uri, strdup(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by input_item_WriteMeta(), PlayItem(), proto_SORT_URI(), and str_format_meta().
|
inlinestatic |
Referenced by str_format_meta().
| bool input_item_HasErrorWhenReading | ( | input_item_t * | ) |
References input_item_t::b_error_when_reading, input_item_t::lock, vlc_mutex_lock(), and vlc_mutex_unlock().
| input_item_t* input_item_Hold | ( | input_item_t * | ) |
Holds an input item, i.e.
creates a new reference.
References item_owner, and input_item_owner::refs.
| bool input_item_IsArtFetched | ( | input_item_t * | p_i | ) |
References ITEM_ART_FETCHED, input_item_t::lock, input_item_t::p_meta, vlc_meta_GetStatus(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by input_ExtractAttachmentAndCacheArt().
| bool input_item_IsPreparsed | ( | input_item_t * | p_i | ) |
References ITEM_PREPARSED, input_item_t::lock, input_item_t::p_meta, vlc_meta_GetStatus(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by GoAndPreparse(), and Preparse().
| void input_item_MergeInfos | ( | input_item_t * | , |
| info_category_t * | |||
| ) |
References input_item_t::event_manager, input_item_t::i_categories, info_category_t::i_infos, info_category_Delete(), info_category_ReplaceInfo(), InputItemFindCat(), INSERT_ELEM, input_item_t::lock, input_item_t::pp_categories, info_category_t::pp_infos, info_category_t::psz_name, TAB_CLEAN, vlc_event_t::type, vlc_event_send(), vlc_InputItemInfoChanged, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by input_vaControl().
| bool input_item_MetaMatch | ( | input_item_t * | p_i, |
| vlc_meta_type_t | meta_type, | ||
| const char * | psz | ||
| ) |
References input_item_t::lock, input_item_t::p_meta, strcasestr(), vlc_meta_Get(), vlc_mutex_lock(), and vlc_mutex_unlock().
| input_item_t* input_item_NewExt | ( | const char * | psz_uri, |
| const char * | psz_name, | ||
| int | i_options, | ||
| const char *const * | ppsz_options, | ||
| unsigned | i_option_flags, | ||
| mtime_t | i_duration | ||
| ) |
This function creates a new input_item_t with the provided information.
Provided for convenience.
References input_item_NewWithType(), and ITEM_TYPE_UNKNOWN.
Referenced by playlist_AddExt(), playlist_Import(), and playlist_MLLoad().
| input_item_t* input_item_NewWithType | ( | const char * | psz_uri, |
| const char * | psz_name, | ||
| int | i_options, | ||
| const char *const * | ppsz_options, | ||
| unsigned | i_option_flags, | ||
| mtime_t | i_duration, | ||
| int | i_type | ||
| ) |
This function creates a new input_item_t with the provided information.
XXX You may also use input_item_New or input_item_NewExt as they need less arguments.
References atomic_init, ATOMIC_VAR_INIT, input_item_t::b_error_when_reading, input_item_t::b_fixed_name, input_item_t::es, input_item_t::event_manager, input_item_t::i_categories, input_item_t::i_duration, input_item_t::i_epg, input_item_t::i_es, input_item_t::i_id, input_item_t::i_nb_played, input_item_t::i_options, input_item_t::i_type, input_item_AddOption(), input_item_SetName(), input_item_SetURI(), input_item_owner::item, ITEM_TYPE_UNKNOWN, input_item_t::lock, input_item_t::optflagc, input_item_t::optflagv, input_item_t::p_meta, input_item_t::p_stats, input_item_t::pp_categories, input_item_t::pp_epg, input_item_t::ppsz_options, input_item_t::psz_name, input_item_t::psz_uri, input_item_owner::refs, TAB_INIT, unlikely, vlc_event_manager_init(), vlc_event_manager_register_event_type(), vlc_InputItemDurationChanged, vlc_InputItemErrorWhenReadingChanged, vlc_InputItemInfoChanged, vlc_InputItemMetaChanged, vlc_InputItemNameChanged, vlc_InputItemPreparsedChanged, vlc_InputItemSubItemAdded, vlc_InputItemSubItemTreeAdded, and vlc_mutex_init().
Referenced by input_item_Copy(), input_item_NewExt(), and playlist_NodeCreate().
| input_item_node_t* input_item_node_AppendItem | ( | input_item_node_t * | p_node, |
| input_item_t * | p_item | ||
| ) |
Add a new child node to this parent node that will point to this subitem.
References input_item_node_AppendNode(), and input_item_node_Create().
Referenced by input_item_PostSubItem().
| void input_item_node_AppendNode | ( | input_item_node_t * | p_parent, |
| input_item_node_t * | p_child | ||
| ) |
Add an already created node to children of this parent node.
References input_item_node_t::i_children, INSERT_ELEM, input_item_node_t::p_parent, and input_item_node_t::pp_children.
Referenced by input_item_node_AppendItem().
| input_item_node_t* input_item_node_Create | ( | input_item_t * | p_input | ) |
Start adding multiple subitems.
Create a root node to hold a tree of subitems for given item
References input_item_node_t::i_children, input_item_node_t::p_item, input_item_node_t::p_parent, input_item_node_t::pp_children, and vlc_gc_incref.
Referenced by input_item_node_AppendItem(), and input_item_PostSubItem().
| void input_item_node_Delete | ( | input_item_node_t * | p_node | ) |
Delete a node created with input_item_node_Create() and all its children.
References input_item_node_t::i_children, input_item_node_t::p_parent, input_item_node_t::pp_children, RecursiveNodeDelete(), and REMOVE_ELEM.
Referenced by input_item_node_PostAndDelete().
| void input_item_node_PostAndDelete | ( | input_item_node_t * | p_node | ) |
End adding multiple subitems.
Sends a vlc_InputItemSubItemTreeAdded event to notify that the item pointed to by the given root node has created new subitems that are pointed to by all the children of the node.
Also sends vlc_InputItemSubItemAdded event for every child under the given root node;
In the end deletes the node and all its children nodes.
References input_item_t::event_manager, input_item_node_Delete(), input_item_node_t::p_item, post_subitems(), vlc_event_t::type, vlc_event_send(), and vlc_InputItemSubItemTreeAdded.
Referenced by input_item_PostSubItem().
| void input_item_PostSubItem | ( | input_item_t * | p_parent, |
| input_item_t * | p_child | ||
| ) |
Add one subitem to this item.
This won't hold the item, but can tell to interested third parties Like the playlist, that there is a new sub item. With this design It is not the input item's responsability to keep all the ref of the input item children.
Sends a vlc_InputItemSubItemTreeAdded and a vlc_InputItemSubItemAdded event
References input_item_node_AppendItem(), input_item_node_Create(), and input_item_node_PostAndDelete().
| void input_item_Release | ( | input_item_t * | ) |
Releases an input item, i.e.
decrements its reference counter.
References input_item_t::es, es_format_Clean(), input_item_t::event_manager, input_item_t::i_categories, input_item_t::i_epg, input_item_t::i_es, input_item_t::i_options, info_category_Delete(), item_owner, input_item_t::lock, input_stats_t::lock, input_item_t::optflagv, input_item_t::p_meta, input_item_t::p_stats, input_item_t::pp_categories, input_item_t::pp_epg, input_item_t::ppsz_options, input_item_t::psz_name, input_item_t::psz_uri, input_item_owner::refs, TAB_CLEAN, vlc_epg_Delete(), vlc_event_manager_fini(), vlc_meta_Delete(), and vlc_mutex_destroy().
| void input_item_ReplaceInfos | ( | input_item_t * | , |
| info_category_t * | |||
| ) |
References input_item_t::event_manager, input_item_t::i_categories, info_category_Delete(), InputItemFindCat(), INSERT_ELEM, input_item_t::lock, input_item_t::pp_categories, info_category_t::psz_name, vlc_event_t::type, vlc_event_send(), vlc_InputItemInfoChanged, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by input_vaControl().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| void input_item_SetDuration | ( | input_item_t * | p_i, |
| mtime_t | i_duration | ||
| ) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| void input_item_SetMeta | ( | input_item_t * | , |
| vlc_meta_type_t | meta_type, | ||
| const char * | psz_val | ||
| ) |
| void input_item_SetName | ( | input_item_t * | p_item, |
| const char * | psz_name | ||
| ) |
References input_item_t::lock, input_item_t::psz_name, strdup(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by EsOutMeta(), input_item_NewWithType(), and input_vaControl().
|
inlinestatic |
Referenced by Create(), EsOutProgramEpg(), and EsOutProgramSelect().
|
inlinestatic |
Referenced by EsOutProgramMeta(), and EsOutProgramSelect().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| void input_item_SetURI | ( | input_item_t * | p_i, |
| const char * | psz_uri | ||
| ) |
References asprintf(), decode_URI(), EnsureUTF8(), GuessType(), vlc_url_t::i_port, input_item_t::i_type, ITEM_TYPE_DIRECTORY, ITEM_TYPE_FILE, input_item_t::lock, vlc_url_t::psz_host, input_item_t::psz_name, vlc_url_t::psz_path, vlc_url_t::psz_protocol, input_item_t::psz_uri, strdup(), vlc_mutex_lock(), vlc_mutex_unlock(), vlc_UrlClean(), and vlc_UrlParse().
Referenced by input_item_NewWithType(), and vlm_ControlMediaInstanceStart().
|
inlinestatic |
1.8.1.2