VLC 4.0.0-dev
request.c File Reference
Include dependency graph for request.c:

Data Structures

struct  size_vector
 

Functions

int vlc_playlist_RequestInsert (vlc_playlist_t *playlist, size_t index, input_item_t *const media[], size_t count)
 Insert a list of media at a given index (if in range), or append. More...
 
static ssize_t vlc_playlist_FindRealIndex (vlc_playlist_t *playlist, vlc_playlist_item_t *item, ssize_t index_hint)
 
static void vlc_playlist_FindIndices (vlc_playlist_t *playlist, vlc_playlist_item_t *const items[], size_t count, ssize_t index_hint, struct size_vector *out)
 
static void vlc_playlist_RemoveBySlices (vlc_playlist_t *playlist, size_t sorted_indices[], size_t count)
 
static size_t vlc_playlist_Regroup (vlc_playlist_t *playlist, size_t indices[], size_t head_index)
 Move all items specified by their indices to form a contiguous slice, in order. More...
 
static void vlc_playlist_MoveBySlices (vlc_playlist_t *playlist, size_t indices[], size_t count, size_t target)
 
static int cmp_size (const void *lhs, const void *rhs)
 
int vlc_playlist_RequestMove (vlc_playlist_t *playlist, vlc_playlist_item_t *const items[], size_t count, size_t target, ssize_t index_hint)
 Move a slice of items by value. More...
 
int vlc_playlist_RequestRemove (vlc_playlist_t *playlist, vlc_playlist_item_t *const items[], size_t count, ssize_t index_hint)
 Remove a slice of items by value. More...
 
int vlc_playlist_RequestGoTo (vlc_playlist_t *playlist, vlc_playlist_item_t *item, ssize_t index_hint)
 Go to a given item. More...
 

Function Documentation

◆ cmp_size()

static int cmp_size ( const void *  lhs,
const void *  rhs 
)
static

◆ vlc_playlist_FindIndices()

static void vlc_playlist_FindIndices ( vlc_playlist_t playlist,
vlc_playlist_item_t *const  items[],
size_t  count,
ssize_t  index_hint,
struct size_vector out 
)
static

◆ vlc_playlist_FindRealIndex()

static ssize_t vlc_playlist_FindRealIndex ( vlc_playlist_t playlist,
vlc_playlist_item_t item,
ssize_t  index_hint 
)
static

◆ vlc_playlist_MoveBySlices()

static void vlc_playlist_MoveBySlices ( vlc_playlist_t playlist,
size_t  indices[],
size_t  count,
size_t  target 
)
static

◆ vlc_playlist_Regroup()

static size_t vlc_playlist_Regroup ( vlc_playlist_t playlist,
size_t  indices[],
size_t  head_index 
)
static

Move all items specified by their indices to form a contiguous slice, in order.

Parameters
playlistthe playlist
indicesthe indices of the items to regroup
head_indexthe index where to prepend the group
Returns
the start index of the resulting slice

References vlc_playlist_Move().

Referenced by vlc_playlist_MoveBySlices().

◆ vlc_playlist_RemoveBySlices()

static void vlc_playlist_RemoveBySlices ( vlc_playlist_t playlist,
size_t  sorted_indices[],
size_t  count 
)
static

References count, and vlc_playlist_Remove().

Referenced by vlc_playlist_RequestRemove().