VLC  4.0.0-dev
Data Structures | Functions
sort.c File Reference
Include dependency graph for sort.c:

Data Structures

struct  vlc_playlist_item_meta
 Struct containing a copy of (parsed) media metadata, used for sorting without locking all the items. More...
 
struct  sort_request
 

Functions

static int vlc_playlist_item_meta_CopyString (const char **to, const char *from)
 
static int vlc_playlist_item_meta_InitField (struct vlc_playlist_item_meta *meta, enum vlc_playlist_sort_key key)
 
static void vlc_playlist_item_meta_DestroyFields (struct vlc_playlist_item_meta *meta)
 
static int vlc_playlist_item_meta_InitFields (struct vlc_playlist_item_meta *meta, const struct vlc_playlist_sort_criterion criteria[], size_t count)
 
static struct vlc_playlist_item_metavlc_playlist_item_meta_New (vlc_playlist_item_t *item, const struct vlc_playlist_sort_criterion criteria[], size_t count)
 
static void vlc_playlist_item_meta_Delete (struct vlc_playlist_item_meta *meta)
 
static int CompareStrings (const char *a, const char *b)
 
static int CompareFilenameStrings (const char *a, const char *b)
 
static int CompareVersionStrings (const char *a, const char *b)
 
static int CompareIntegers (int64_t a, int64_t b)
 
static int CompareOptionalIntegers (bool has_a, int64_t a, bool has_b, int64_t b)
 
static int CompareMetaByKey (const struct vlc_playlist_item_meta *a, const struct vlc_playlist_item_meta *b, enum vlc_playlist_sort_key key)
 
static int compare_meta (const void *lhs, const void *rhs, void *userdata)
 
static void vlc_playlist_DeleteMetaArray (struct vlc_playlist_item_meta *array[], size_t count)
 
static struct vlc_playlist_item_meta ** vlc_playlist_NewMetaArray (vlc_playlist_t *playlist, const struct vlc_playlist_sort_criterion criteria[], size_t count)
 
int vlc_playlist_Sort (vlc_playlist_t *playlist, const struct vlc_playlist_sort_criterion criteria[], size_t count)
 Sort the playlist by a list of criteria. More...
 

Function Documentation

◆ compare_meta()

static int compare_meta ( const void *  lhs,
const void *  rhs,
void *  userdata 
)
static

◆ CompareFilenameStrings()

static int CompareFilenameStrings ( const char *  a,
const char *  b 
)
inlinestatic

References vlc_filenamecmp().

Referenced by CompareMetaByKey().

◆ CompareIntegers()

static int CompareIntegers ( int64_t  a,
int64_t  b 
)
inlinestatic

◆ CompareMetaByKey()

static int CompareMetaByKey ( const struct vlc_playlist_item_meta a,
const struct vlc_playlist_item_meta b,
enum vlc_playlist_sort_key  key 
)
inlinestatic

◆ CompareOptionalIntegers()

static int CompareOptionalIntegers ( bool  has_a,
int64_t  a,
bool  has_b,
int64_t  b 
)
inlinestatic

References CompareIntegers().

Referenced by CompareMetaByKey().

◆ CompareStrings()

static int CompareStrings ( const char *  a,
const char *  b 
)
inlinestatic

References strcasecmp().

Referenced by CompareMetaByKey().

◆ CompareVersionStrings()

static int CompareVersionStrings ( const char *  a,
const char *  b 
)
inlinestatic

References strverscmp().

Referenced by CompareMetaByKey().

◆ vlc_playlist_DeleteMetaArray()

static void vlc_playlist_DeleteMetaArray ( struct vlc_playlist_item_meta array[],
size_t  count 
)
static

◆ vlc_playlist_item_meta_CopyString()

static int vlc_playlist_item_meta_CopyString ( const char **  to,
const char *  from 
)
static

◆ vlc_playlist_item_meta_Delete()

static void vlc_playlist_item_meta_Delete ( struct vlc_playlist_item_meta meta)
static

◆ vlc_playlist_item_meta_DestroyFields()

static void vlc_playlist_item_meta_DestroyFields ( struct vlc_playlist_item_meta meta)
static

◆ vlc_playlist_item_meta_InitField()

static int vlc_playlist_item_meta_InitField ( struct vlc_playlist_item_meta meta,
enum vlc_playlist_sort_key  key 
)
static

◆ vlc_playlist_item_meta_InitFields()

static int vlc_playlist_item_meta_InitFields ( struct vlc_playlist_item_meta meta,
const struct vlc_playlist_sort_criterion  criteria[],
size_t  count 
)
static

◆ vlc_playlist_item_meta_New()

static struct vlc_playlist_item_meta* vlc_playlist_item_meta_New ( vlc_playlist_item_t item,
const struct vlc_playlist_sort_criterion  criteria[],
size_t  count 
)
static

◆ vlc_playlist_NewMetaArray()

static struct vlc_playlist_item_meta** vlc_playlist_NewMetaArray ( vlc_playlist_t playlist,
const struct vlc_playlist_sort_criterion  criteria[],
size_t  count 
)
static