VLC 4.0.0-dev
Loading...
Searching...
No Matches
randomizer.c File Reference
Include dependency graph for randomizer.c:

Macros

#define NOT_SAME_BEFORE   1
 

Functions

void randomizer_Init (struct randomizer *r)
 Initialize an empty randomizer.
 
void randomizer_Destroy (struct randomizer *r)
 Destroy a randomizer.
 
void randomizer_SetLoop (struct randomizer *r, bool loop)
 Enable or disable "loop" mode.
 
static ssize_t randomizer_IndexOf (struct randomizer *r, const vlc_playlist_item_t *item)
 
bool randomizer_Count (struct randomizer *r)
 Return the number of items in the randomizer.
 
void randomizer_Reshuffle (struct randomizer *r)
 Start a new random cycle.
 
static void swap_items (struct randomizer *r, int i, int j)
 
static void randomizer_DetermineOne_ (struct randomizer *r, size_t avoid_last_n)
 
static void randomizer_DetermineOne (struct randomizer *r)
 
static void randomizer_AutoReshuffle (struct randomizer *r)
 
bool randomizer_HasPrev (struct randomizer *r)
 Indicate whether there is a previous item.
 
bool randomizer_HasNext (struct randomizer *r)
 Indicate whether there is a next item.
 
vlc_playlist_item_trandomizer_PeekPrev (struct randomizer *r)
 Peek the previous item (without changing the current one).
 
vlc_playlist_item_trandomizer_PeekNext (struct randomizer *r)
 Peek the next item (without changing the current one).
 
vlc_playlist_item_trandomizer_Prev (struct randomizer *r)
 Go back to the previous item.
 
vlc_playlist_item_trandomizer_Next (struct randomizer *r)
 Go back to the next item.
 
bool randomizer_Add (struct randomizer *r, vlc_playlist_item_t *items[], size_t count)
 Add items to the randomizer.
 
static void randomizer_SelectIndex (struct randomizer *r, size_t index)
 
void randomizer_Select (struct randomizer *r, const vlc_playlist_item_t *item)
 Force the selection of a specific item.
 
static void randomizer_RemoveAt (struct randomizer *r, size_t index)
 
static void randomizer_RemoveOne (struct randomizer *r, const vlc_playlist_item_t *item)
 
void randomizer_Remove (struct randomizer *r, vlc_playlist_item_t *const items[], size_t count)
 Remove items from the randomizer.
 
void randomizer_Clear (struct randomizer *r)
 Clear the randomizer.
 

Macro Definition Documentation

◆ NOT_SAME_BEFORE

#define NOT_SAME_BEFORE   1

Function Documentation

◆ randomizer_AutoReshuffle()

static void randomizer_AutoReshuffle ( struct randomizer r)
static

◆ randomizer_DetermineOne()

static void randomizer_DetermineOne ( struct randomizer r)
inlinestatic

◆ randomizer_DetermineOne_()

static void randomizer_DetermineOne_ ( struct randomizer r,
size_t  avoid_last_n 
)
inlinestatic

◆ randomizer_IndexOf()

static ssize_t randomizer_IndexOf ( struct randomizer r,
const vlc_playlist_item_t item 
)
inlinestatic

◆ randomizer_RemoveAt()

static void randomizer_RemoveAt ( struct randomizer r,
size_t  index 
)
static

◆ randomizer_RemoveOne()

static void randomizer_RemoveOne ( struct randomizer r,
const vlc_playlist_item_t item 
)
static

◆ randomizer_SelectIndex()

static void randomizer_SelectIndex ( struct randomizer r,
size_t  index 
)
static

◆ swap_items()

static void swap_items ( struct randomizer r,
int  i,
int  j 
)
inlinestatic