libgpac
Documentation of the core library of GPAC
list.c File Reference
#include <gpac/list.h>
+ Include dependency graph for list.c:

Data Structures

struct  GF_List
 

Macros

#define GF_LIST_ARRAY_GROW
 
#define GF_LIST_REALLOC(a)   (a = a ? (3*a/2) : 10)
 

Functions

GF_EXPORT GF_List * gf_list_new ()
 list constructor More...
 
GF_List * gf_list_new_prealloc (u32 nb_prealloc)
 
GF_EXPORT void gf_list_del (GF_List *ptr)
 list destructor More...
 
static void realloc_chain (GF_List *ptr)
 
GF_EXPORT GF_Err gf_list_add (GF_List *ptr, void *item)
 add item More...
 
GF_EXPORT u32 gf_list_count (const GF_List *ptr)
 get count More...
 
GF_EXPORT void * gf_list_get (GF_List *ptr, u32 itemNumber)
 gets item More...
 
GF_EXPORT void * gf_list_last (GF_List *ptr)
 gets last item More...
 
GF_EXPORT GF_Err gf_list_rem (GF_List *ptr, u32 itemNumber)
 removes item More...
 
GF_EXPORT GF_Err gf_list_rem_last (GF_List *ptr)
 removes last item More...
 
GF_EXPORT GF_Err gf_list_insert (GF_List *ptr, void *item, u32 position)
 inserts item More...
 
GF_EXPORT void gf_list_reset (GF_List *ptr)
 resets list More...
 
GF_EXPORT s32 gf_list_find (GF_List *ptr, void *item)
 finds item More...
 
GF_EXPORT s32 gf_list_del_item (GF_List *ptr, void *item)
 deletes item More...
 
GF_EXPORT void * gf_list_enum (GF_List *ptr, u32 *pos)
 list enumerator More...
 
GF_EXPORT GF_Err gf_list_swap (GF_List *l1, GF_List *l2)
 list swap More...
 
GF_EXPORT GF_Err gf_list_transfer (GF_List *dst, GF_List *src)
 list transfer More...
 
GF_EXPORT GF_List * gf_list_clone (GF_List *ptr)
 clone list More...
 
GF_EXPORT void * gf_list_pop_front (GF_List *ptr)
 Pop the first element in the list. More...
 
GF_EXPORT void * gf_list_pop_back (GF_List *ptr)
 Pop the last element in the list. More...
 

Data Structure Documentation

◆ _tag_array

struct _tag_array

list object

Data Fields
void ** slots
u32 entryCount
u32 allocSize

Macro Definition Documentation

◆ GF_LIST_ARRAY_GROW

#define GF_LIST_ARRAY_GROW

◆ GF_LIST_REALLOC

#define GF_LIST_REALLOC (   a)    (a = a ? (3*a/2) : 10)

Function Documentation

◆ gf_list_new_prealloc()

GF_List* gf_list_new_prealloc ( u32  nb_prealloc)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ realloc_chain()

static void realloc_chain ( GF_List *  ptr)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function: