|
VLC
2.1.0-git
|
This file defines functions, structures and macros for handling arrays in vlc. More...

Go to the source code of this file.
Data Structures | |
| struct | vlc_array_t |
| struct | vlc_dictionary_entry_t |
| struct | vlc_dictionary_t |
Macros | |
| #define | INSERT_ELEM(p_ar, i_oldsize, i_pos, elem) |
| Simple dynamic array handling. | |
| #define | REMOVE_ELEM(p_ar, i_size, i_pos) |
| #define | TAB_INIT(count, tab) |
| #define | TAB_CLEAN(count, tab) |
| #define | TAB_APPEND_CAST(cast, count, tab, p) |
| #define | TAB_APPEND(count, tab, p) TAB_APPEND_CAST( , count, tab, p ) |
| #define | TAB_FIND(count, tab, p, idx) |
| #define | TAB_REMOVE(count, tab, p) |
| #define | TAB_INSERT_CAST(cast, count, tab, p, index) |
| #define | TAB_INSERT(count, tab, p, index) TAB_INSERT_CAST( , count, tab, p, index ) |
| #define | BSEARCH(entries, count, elem, zetype, key, answer) |
| Binary search in a sorted array. | |
| #define | _ARRAY_ALLOC(array, newsize) |
| #define | _ARRAY_GROW1(array) |
| #define | ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
| #define | DECL_ARRAY(type) |
| #define | TYPEDEF_ARRAY(type, name) typedef DECL_ARRAY(type) name; |
| #define | ARRAY_INIT(array) |
| #define | ARRAY_RESET(array) |
| #define | ARRAY_APPEND(array, elem) |
| #define | ARRAY_INSERT(array, elem, pos) |
| #define | _ARRAY_SHRINK(array) |
| #define | ARRAY_REMOVE(array, pos) |
| #define | ARRAY_VAL(array, pos) array.p_elems[pos] |
| #define | ARRAY_BSEARCH(array, elem, zetype, key, answer) BSEARCH( (array).p_elems, (array).i_size, elem, zetype, key, answer) |
| #define | FOREACH_ARRAY(item, array) |
| #define | FOREACH_END() } } |
Typedefs | |
| typedef struct vlc_array_t | vlc_array_t |
| typedef struct vlc_dictionary_entry_t | vlc_dictionary_entry_t |
| typedef struct vlc_dictionary_t | vlc_dictionary_t |
Functions | |
| static void * | realloc_down (void *ptr, size_t size) |
| static void | vlc_array_init (vlc_array_t *p_array) |
| static void | vlc_array_clear (vlc_array_t *p_array) |
| static vlc_array_t * | vlc_array_new (void) |
| static void | vlc_array_destroy (vlc_array_t *p_array) |
| static int | vlc_array_count (vlc_array_t *p_array) |
| static void * | vlc_array_item_at_index (vlc_array_t *p_array, int i_index) |
| static int | vlc_array_index_of_item (vlc_array_t *p_array, void *item) |
| static void | vlc_array_insert (vlc_array_t *p_array, void *p_elem, int i_index) |
| static void | vlc_array_append (vlc_array_t *p_array, void *p_elem) |
| static void | vlc_array_remove (vlc_array_t *p_array, int i_index) |
| static uint64_t | DictHash (const char *psz_string, int hashsize) |
| static void | vlc_dictionary_init (vlc_dictionary_t *p_dict, int i_size) |
| static void | vlc_dictionary_clear (vlc_dictionary_t *p_dict, void(*pf_free)(void *p_data, void *p_obj), void *p_obj) |
| static int | vlc_dictionary_has_key (const vlc_dictionary_t *p_dict, const char *psz_key) |
| static void * | vlc_dictionary_value_for_key (const vlc_dictionary_t *p_dict, const char *psz_key) |
| static int | vlc_dictionary_keys_count (const vlc_dictionary_t *p_dict) |
| static char ** | vlc_dictionary_all_keys (const vlc_dictionary_t *p_dict) |
| static void | __vlc_dictionary_insert (vlc_dictionary_t *p_dict, const char *psz_key, void *p_value, bool rebuild) |
| static void | vlc_dictionary_insert (vlc_dictionary_t *p_dict, const char *psz_key, void *p_value) |
| static void | vlc_dictionary_remove_value_for_key (const vlc_dictionary_t *p_dict, const char *psz_key, void(*pf_free)(void *p_data, void *p_obj), void *p_obj) |
Variables | |
| static void *const | kVLCDictionaryNotFound = NULL |
This file defines functions, structures and macros for handling arrays in vlc.
| #define _ARRAY_ALLOC | ( | array, | |
| newsize | |||
| ) |
| #define _ARRAY_GROW1 | ( | array | ) |
| #define _ARRAY_SHRINK | ( | array | ) |
| #define ARRAY_APPEND | ( | array, | |
| elem | |||
| ) |
Referenced by AddItem(), FindArt(), playlist_ItemRelease(), playlist_NodeCreate(), ResetCurrentlyPlaying(), vlc_event_attach(), vlc_event_manager_register_event_type(), and vout_control_Push().
| #define ARRAY_BSEARCH | ( | array, | |
| elem, | |||
| zetype, | |||
| key, | |||
| answer | |||
| ) | BSEARCH( (array).p_elems, (array).i_size, elem, zetype, key, answer) |
Referenced by ChangeToNode(), playlist_ItemGetById(), and playlist_NodeDelete().
| #define ARRAY_INIT | ( | array | ) |
Referenced by playlist_Create(), playlist_fetcher_New(), vlc_event_manager_init(), vlc_event_manager_register_event_type(), and vout_control_Init().
| #define ARRAY_INSERT | ( | array, | |
| elem, | |||
| pos | |||
| ) |
| #define ARRAY_REMOVE | ( | array, | |
| pos | |||
| ) |
Referenced by ChangeToNode(), playlist_NodeDelete(), vlc_event_detach(), and vout_control_Pop().
| #define ARRAY_RESET | ( | array | ) |
Referenced by playlist_Destroy(), ResetCurrentlyPlaying(), vlc_event_manager_fini(), and vout_control_Clean().
| #define ARRAY_SIZE | ( | x | ) | (sizeof(x) / sizeof((x)[0])) |
Referenced by DeinterlaceIsModeValid(), FilterOrder(), image_Type2Fourcc(), and vout_IntfInit().
| #define ARRAY_VAL | ( | array, | |
| pos | |||
| ) | array.p_elems[pos] |
| #define BSEARCH | ( | entries, | |
| count, | |||
| elem, | |||
| zetype, | |||
| key, | |||
| answer | |||
| ) |
Binary search in a sorted array.
The key must be comparable by < and >
| entries | array of entries |
| count | number of entries |
| elem | key to check within an entry (like .id, or ->i_id) |
| zetype | type of the key |
| key | value of the key |
| answer | index of answer within the array. -1 if not found |
| #define DECL_ARRAY | ( | type | ) |
| #define FOREACH_ARRAY | ( | item, | |
| array | |||
| ) |
Referenced by FindArt(), group_contains_listener(), playlist_Destroy(), vlc_event_attach(), vlc_event_detach(), vlc_event_manager_fini(), and vlc_event_send().
| #define FOREACH_END | ( | ) | } } |
| #define INSERT_ELEM | ( | p_ar, | |
| i_oldsize, | |||
| i_pos, | |||
| elem | |||
| ) |
Simple dynamic array handling.
Array is realloced at each insert/removal
Referenced by info_category_ReplaceInfo(), info_category_VaAddInfo(), InitPrograms(), input_item_AddOption(), input_item_MergeInfos(), input_item_node_AppendNode(), input_item_ReplaceInfos(), InputItemVaAddInfo(), playlist_fetcher_Push(), playlist_NodeInsert(), playlist_preparser_Push(), playlist_TreeMove(), playlist_TreeMoveMany(), stats_Update(), var_AddCallback(), var_Change(), and var_Create().
| #define REMOVE_ELEM | ( | p_ar, | |
| i_size, | |||
| i_pos | |||
| ) |
Referenced by info_category_DeleteInfo(), input_item_DelInfo(), input_item_node_Delete(), playlist_fetcher_Delete(), playlist_NodeRemoveItem(), playlist_preparser_Delete(), playlist_ServicesDiscoveryRemove(), playlist_TreeMove(), playlist_TreeMoveMany(), stats_CounterClean(), stats_Update(), Thread(), var_Change(), and var_DelCallback().
| #define TAB_APPEND | ( | count, | |
| tab, | |||
| p | |||
| ) | TAB_APPEND_CAST( , count, tab, p ) |
Referenced by Add(), Control(), EsOutAdd(), EsOutProgramAdd(), httpd_ClientRecv(), httpd_HostCreate(), httpd_HostThread(), httpd_MsgAdd(), httpd_UrlNew(), input_item_SetEpg(), input_item_UpdateTracksInfo(), input_vaControl(), InputGetExtraFilesPattern(), InputSourceInit(), LanguageSplit(), LoadSlaves(), LoadSubtitles(), Manage(), playlist_ServicesDiscoveryAdd(), RequestVout(), sout_MuxAddStream(), stream_AccessNew(), SubtitleAdd(), vlc_epg_AddEvent(), vlm_ControlMediaAdd(), vlm_ControlMediaGets(), vlm_ControlMediaInstanceGets(), vlm_ControlMediaInstanceStart(), and vout_NewSplitter().
| #define TAB_APPEND_CAST | ( | cast, | |
| count, | |||
| tab, | |||
| p | |||
| ) |
Referenced by vlm_media_Copy().
| #define TAB_CLEAN | ( | count, | |
| tab | |||
| ) |
| #define TAB_FIND | ( | count, | |
| tab, | |||
| p, | |||
| idx | |||
| ) |
Referenced by sout_MuxDeleteStream().
| #define TAB_INIT | ( | count, | |
| tab | |||
| ) |
Referenced by Create(), InitPrograms(), input_EsOutNew(), input_EsOutTimeshiftNew(), input_item_NewWithType(), InputGetExtraFiles(), InputGetExtraFilesPattern(), InputSourceInit(), playlist_Create(), stream_AccessNew(), UpdateTitleListfromDemux(), vlc_epg_Init(), vlm_ControlMediaAdd(), vlm_ControlMediaGets(), vlm_ControlMediaInstanceGets(), vlm_media_Init(), vlm_New(), vlm_OnMediaUpdate(), and vout_NewSplitter().
| #define TAB_INSERT | ( | count, | |
| tab, | |||
| p, | |||
| index | |||
| ) | TAB_INSERT_CAST( , count, tab, p, index ) |
Referenced by vlc_epg_Merge().
| #define TAB_INSERT_CAST | ( | cast, | |
| count, | |||
| tab, | |||
| p, | |||
| index | |||
| ) |
Referenced by vlc_array_insert().
| #define TAB_REMOVE | ( | count, | |
| tab, | |||
| p | |||
| ) |
Referenced by Del(), EsOutDel(), EsOutProgramDel(), httpd_HostDelete(), httpd_HostThread(), httpd_UrlDelete(), input_vaControl(), Manage(), RequestVout(), sout_MuxAddStream(), sout_MuxDeleteStream(), vlc_epg_Merge(), vlm_ControlMediaDel(), and vlm_MediaInstanceDelete().
| #define TYPEDEF_ARRAY | ( | type, | |
| name | |||
| ) | typedef DECL_ARRAY(type) name; |
| typedef struct vlc_array_t vlc_array_t |
| typedef struct vlc_dictionary_entry_t vlc_dictionary_entry_t |
| typedef struct vlc_dictionary_t vlc_dictionary_t |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
References vlc_array_t::i_count, and vlc_array_insert().
Referenced by ml_DeleteSimple(), sout_StreamChainNew(), and ThreadChangeFilters().
|
inlinestatic |
References vlc_array_t::pp_elems.
Referenced by sout_StreamChainNew(), ThreadChangeFilters(), and vlc_array_destroy().
|
inlinestatic |
References vlc_array_t::i_count.
Referenced by __ml_GetValue(), ml_DestroyResultArray(), sout_StreamChainNew(), and ThreadChangeFilters().
|
inlinestatic |
References vlc_array_clear().
Referenced by __ml_GetValue(), and ml_DeleteSimple().
|
inlinestatic |
References vlc_array_t::i_count, and vlc_array_t::pp_elems.
|
inlinestatic |
Referenced by sout_StreamChainNew(), ThreadChangeFilters(), and vlc_array_new().
|
inlinestatic |
References vlc_array_t::i_count, vlc_array_t::pp_elems, and TAB_INSERT_CAST.
Referenced by vlc_array_append().
|
inlinestatic |
References vlc_array_t::pp_elems.
Referenced by __ml_GetValue(), ml_DestroyResultArray(), sout_StreamChainNew(), and ThreadChangeFilters().
|
inlinestatic |
References vlc_array_init().
Referenced by __ml_GetValue(), and ml_DeleteSimple().
|
inlinestatic |
References vlc_array_t::i_count, and vlc_array_t::pp_elems.
|
inlinestatic |
|
inlinestatic |
References vlc_dictionary_t::i_size, vlc_dictionary_t::p_entries, vlc_dictionary_entry_t::p_next, vlc_dictionary_entry_t::p_value, and vlc_dictionary_entry_t::psz_key.
Referenced by __vlc_dictionary_insert(), main(), and vlc_meta_Delete().
|
inlinestatic |
References DictHash(), vlc_dictionary_t::i_size, and vlc_dictionary_t::p_entries.
|
inlinestatic |
References vlc_dictionary_t::i_size, and vlc_dictionary_t::p_entries.
Referenced by __vlc_dictionary_insert(), main(), and vlc_meta_New().
|
inlinestatic |
References __vlc_dictionary_insert().
Referenced by main(), vlc_meta_AddExtra(), and vlc_meta_Merge().
|
inlinestatic |
References count, vlc_dictionary_t::i_size, vlc_dictionary_t::p_entries, and vlc_dictionary_entry_t::p_next.
Referenced by main(), vlc_dictionary_all_keys(), and vlc_meta_GetExtraCount().
|
inlinestatic |
References DictHash(), vlc_dictionary_t::i_size, vlc_dictionary_t::p_entries, vlc_dictionary_entry_t::p_next, vlc_dictionary_entry_t::p_value, and vlc_dictionary_entry_t::psz_key.
Referenced by main(), vlc_meta_AddExtra(), and vlc_meta_Merge().
|
inlinestatic |
References DictHash(), vlc_dictionary_t::i_size, kVLCDictionaryNotFound, vlc_dictionary_t::p_entries, vlc_dictionary_entry_t::p_next, vlc_dictionary_entry_t::p_value, and vlc_dictionary_entry_t::psz_key.
Referenced by test_dictionary_validity(), vlc_meta_AddExtra(), vlc_meta_GetExtra(), and vlc_meta_Merge().
|
static |
Referenced by vlc_dictionary_value_for_key(), and vlc_meta_AddExtra().
1.8.1.2