21#ifndef VLC_PLAYLIST_NEW_H
22#define VLC_PLAYLIST_NEW_H
194 size_t count,
void *userdata);
221 size_t target,
void *userdata);
310 bool has_next,
void *userdata);
420 void *userdata,
bool notify_current_state);
637 size_t target, ssize_t index_hint);
908 bool parse_subitems);
size_t count
Definition core.c:403
#define VLC_USED
Definition fourcc_gen.c:32
#define VLC_API
Definition fourcc_gen.c:31
#define VLC_SUCCESS
No error.
Definition vlc_common.h:478
int vlc_playlist_Next(vlc_playlist_t *playlist)
Go to the next item.
Definition control.c:376
void vlc_playlist_SetMediaStoppedAction(vlc_playlist_t *playlist, enum vlc_playlist_media_stopped_action action)
Setup an action when a media is stopped.
Definition player.c:203
ssize_t vlc_playlist_IndexOfMedia(vlc_playlist_t *playlist, const input_item_t *media)
Return the index of a given media.
Definition content.c:208
vlc_playlist_t * vlc_playlist_New(vlc_object_t *parent)
Create a new playlist.
Definition playlist.c:34
bool vlc_playlist_HasPrev(vlc_playlist_t *playlist)
Indicate whether a previous item is available.
Definition control.c:334
ssize_t vlc_playlist_IndexOf(vlc_playlist_t *playlist, const vlc_playlist_item_t *item)
Return the index of a given item.
Definition content.c:198
static int vlc_playlist_AppendOne(vlc_playlist_t *playlist, input_item_t *media)
Add a media at the end of the playlist.
Definition vlc_playlist.h:528
vlc_playlist_sort_key
Definition vlc_playlist.h:130
void vlc_playlist_SetPlaybackOrder(vlc_playlist_t *playlist, enum vlc_playlist_playback_order order)
Change the playback order.
Definition control.c:140
vlc_playlist_item_t * vlc_playlist_Get(vlc_playlist_t *playlist, size_t index)
Return the item at a given index.
Definition content.c:191
int vlc_playlist_Start(vlc_playlist_t *playlist)
Start the player.
Definition player.c:179
static int vlc_playlist_InsertOne(vlc_playlist_t *playlist, size_t index, input_item_t *media)
Insert a media at a given index.
Definition vlc_playlist.h:498
void vlc_playlist_Lock(vlc_playlist_t *)
Lock the playlist/player.
Definition playlist.c:92
void vlc_playlist_Delete(vlc_playlist_t *)
Delete a playlist.
Definition playlist.c:81
void vlc_playlist_Resume(vlc_playlist_t *playlist)
Resume the player.
Definition player.c:197
vlc_player_t * vlc_playlist_GetPlayer(vlc_playlist_t *playlist)
Return the player owned by the playlist.
Definition player.c:173
void vlc_playlist_Shuffle(vlc_playlist_t *playlist)
Shuffle the playlist.
Definition shuffle.c:33
vlc_playlist_media_stopped_action
Action when a media is stopped.
Definition vlc_playlist.h:163
ssize_t vlc_playlist_IndexOfId(vlc_playlist_t *playlist, uint64_t id)
Return the index of a given item id.
Definition content.c:220
enum vlc_playlist_playback_order vlc_playlist_GetPlaybackOrder(vlc_playlist_t *playlist)
Return the playback order.
Definition control.c:120
enum vlc_playlist_playback_repeat vlc_playlist_GetPlaybackRepeat(vlc_playlist_t *playlist)
Return the playback "repeat" mode.
Definition control.c:113
ssize_t vlc_playlist_GetCurrentIndex(vlc_playlist_t *playlist)
Return the index of the current item.
Definition control.c:314
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.
Definition request.c:31
static int vlc_playlist_PlayAt(vlc_playlist_t *playlist, size_t index)
Go to the given index and plays the corresponding item.
Definition vlc_playlist.h:892
vlc_playlist_listener_id * vlc_playlist_AddListener(vlc_playlist_t *playlist, const struct vlc_playlist_callbacks *cbs, void *userdata, bool notify_current_state)
Add a playlist listener.
Definition notify.c:51
void vlc_playlist_item_Release(vlc_playlist_item_t *)
Release a playlist item.
Definition item.c:51
void vlc_playlist_Stop(vlc_playlist_t *playlist)
Stop the player.
Definition player.c:185
bool vlc_playlist_HasNext(vlc_playlist_t *playlist)
Indicate whether a next item is available.
Definition control.c:341
int vlc_playlist_GoTo(vlc_playlist_t *playlist, ssize_t index)
Go to a given index.
Definition control.c:402
void vlc_playlist_Unlock(vlc_playlist_t *)
Unlock the playlist/player.
Definition playlist.c:98
int vlc_playlist_Export(vlc_playlist_t *playlist, const char *filename, const char *type)
Export the playlist to a file.
Definition export.c:55
vlc_playlist_playback_repeat
Definition vlc_playlist.h:117
void vlc_playlist_Move(vlc_playlist_t *playlist, size_t index, size_t count, size_t target)
Move a slice of items to a given target index.
Definition content.c:294
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.
Definition request.c:205
void vlc_playlist_Preparse(vlc_playlist_t *playlist, input_item_t *media, bool parse_subitems)
Preparse a media, and expand it in the playlist on subitems added.
Definition preparse.c:115
int vlc_playlist_Insert(vlc_playlist_t *playlist, size_t index, input_item_t *const media[], size_t count)
Insert a list of media at a given index.
Definition content.c:267
void vlc_playlist_Clear(vlc_playlist_t *playlist)
Clear the playlist.
Definition content.c:232
static void vlc_playlist_RemoveOne(vlc_playlist_t *playlist, size_t index)
Remove an item at a given index.
Definition vlc_playlist.h:586
int vlc_playlist_Prev(vlc_playlist_t *playlist)
Go to the previous item.
Definition control.c:348
input_item_t * vlc_playlist_item_GetMedia(vlc_playlist_item_t *)
Return the media associated to the playlist item.
Definition item.c:61
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.
Definition sort.c:445
void vlc_playlist_RemoveListener(vlc_playlist_t *playlist, vlc_playlist_listener_id *id)
Remove a player listener.
Definition notify.c:72
void vlc_playlist_Remove(vlc_playlist_t *playlist, size_t index, size_t count)
Remove a slice of items at a given index.
Definition content.c:308
uint64_t vlc_playlist_item_GetId(vlc_playlist_item_t *)
Return a unique id for the playlist item instance.
Definition item.c:67
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.
Definition request.c:235
vlc_playlist_playback_order
Definition vlc_playlist.h:124
void vlc_playlist_item_Hold(vlc_playlist_item_t *)
Hold a playlist item.
Definition item.c:45
int vlc_playlist_RequestGoTo(vlc_playlist_t *playlist, vlc_playlist_item_t *item, ssize_t index_hint)
Go to a given item.
Definition request.c:260
vlc_playlist_sort_order
Definition vlc_playlist.h:147
static int vlc_playlist_Append(vlc_playlist_t *playlist, input_item_t *const media[], size_t count)
Add a list of media at the end of the playlist.
Definition vlc_playlist.h:513
void vlc_playlist_SetPlaybackRepeat(vlc_playlist_t *playlist, enum vlc_playlist_playback_repeat repeat)
Change the playback "repeat" mode.
Definition control.c:127
size_t vlc_playlist_Count(vlc_playlist_t *playlist)
Return the number of items.
Definition content.c:184
static void vlc_playlist_MoveOne(vlc_playlist_t *playlist, size_t index, size_t target)
Move an item to a given target index.
Definition vlc_playlist.h:559
void vlc_playlist_Pause(vlc_playlist_t *playlist)
Pause the player.
Definition player.c:191
@ VLC_PLAYLIST_SORT_KEY_DATE
Definition vlc_playlist.h:137
@ VLC_PLAYLIST_SORT_KEY_RATING
Definition vlc_playlist.h:141
@ VLC_PLAYLIST_SORT_KEY_DISC_NUMBER
Definition vlc_playlist.h:139
@ VLC_PLAYLIST_SORT_KEY_FILE_MODIFIED
Definition vlc_playlist.h:143
@ VLC_PLAYLIST_SORT_KEY_DURATION
Definition vlc_playlist.h:132
@ VLC_PLAYLIST_SORT_KEY_ARTIST
Definition vlc_playlist.h:133
@ VLC_PLAYLIST_SORT_KEY_TRACK_NUMBER
Definition vlc_playlist.h:138
@ VLC_PLAYLIST_SORT_KEY_GENRE
Definition vlc_playlist.h:136
@ VLC_PLAYLIST_SORT_KEY_ALBUM
Definition vlc_playlist.h:134
@ VLC_PLAYLIST_SORT_KEY_ALBUM_ARTIST
Definition vlc_playlist.h:135
@ VLC_PLAYLIST_SORT_KEY_URL
Definition vlc_playlist.h:140
@ VLC_PLAYLIST_SORT_KEY_TITLE
Definition vlc_playlist.h:131
@ VLC_PLAYLIST_SORT_KEY_FILE_SIZE
Definition vlc_playlist.h:142
@ VLC_PLAYLIST_MEDIA_STOPPED_EXIT
Exit VLC.
Definition vlc_playlist.h:171
@ VLC_PLAYLIST_MEDIA_STOPPED_STOP
Stop, even if there is a next media to play.
Definition vlc_playlist.h:169
@ VLC_PLAYLIST_MEDIA_STOPPED_CONTINUE
Continue (or stop if there is no next media), default behavior.
Definition vlc_playlist.h:165
@ VLC_PLAYLIST_MEDIA_STOPPED_PAUSE
Pause when reaching the end of file.
Definition vlc_playlist.h:167
@ VLC_PLAYLIST_PLAYBACK_REPEAT_NONE
Definition vlc_playlist.h:118
@ VLC_PLAYLIST_PLAYBACK_REPEAT_CURRENT
Definition vlc_playlist.h:119
@ VLC_PLAYLIST_PLAYBACK_REPEAT_ALL
Definition vlc_playlist.h:120
@ VLC_PLAYLIST_PLAYBACK_ORDER_RANDOM
Definition vlc_playlist.h:126
@ VLC_PLAYLIST_PLAYBACK_ORDER_NORMAL
Definition vlc_playlist.h:125
@ VLC_PLAYLIST_SORT_ORDER_ASCENDING
Definition vlc_playlist.h:148
@ VLC_PLAYLIST_SORT_ORDER_DESCENDING
Definition vlc_playlist.h:149
VLC object common members.
Definition vlc_objects.h:53
Playlist callbacks.
Definition vlc_playlist.h:183
void(* on_items_updated)(vlc_playlist_t *playlist, size_t index, vlc_playlist_item_t *const items[], size_t count, void *userdata)
Called when an item has been updated via (pre-)parsing.
Definition vlc_playlist.h:245
void(* on_playback_repeat_changed)(vlc_playlist_t *playlist, enum vlc_playlist_playback_repeat repeat, void *userdata)
Called when the playback repeat mode has been changed.
Definition vlc_playlist.h:257
void(* on_items_added)(vlc_playlist_t *playlist, size_t index, vlc_playlist_item_t *const items[], size_t count, void *userdata)
Called when items have been added to the playlist.
Definition vlc_playlist.h:207
void(* on_current_index_changed)(vlc_playlist_t *playlist, ssize_t index, void *userdata)
Called when the current item index has changed.
Definition vlc_playlist.h:284
void(* on_has_next_changed)(vlc_playlist_t *playlist, bool has_next, void *userdata)
Called when the "has next item" property has changed.
Definition vlc_playlist.h:310
void(* on_items_moved)(vlc_playlist_t *playlist, size_t index, size_t count, size_t target, void *userdata)
Called when a slice of items have been moved.
Definition vlc_playlist.h:221
void(* on_items_removed)(vlc_playlist_t *playlist, size_t index, size_t count, void *userdata)
Called when a slice of items have been removed from the playlist.
Definition vlc_playlist.h:232
void(* on_playback_order_changed)(vlc_playlist_t *playlist, enum vlc_playlist_playback_order order, void *userdata)
Called when the playback order mode has been changed.
Definition vlc_playlist.h:269
void(* on_media_stopped_action_changed)(vlc_playlist_t *playlist, enum vlc_playlist_media_stopped_action new_action, void *userdata)
Called when the stopped action has changed.
Definition vlc_playlist.h:322
void(* on_items_reset)(vlc_playlist_t *, vlc_playlist_item_t *const items[], size_t count, void *userdata)
Called when the whole content has changed (e.g.
Definition vlc_playlist.h:194
void(* on_has_prev_changed)(vlc_playlist_t *playlist, bool has_prev, void *userdata)
Called when the "has previous item" property has changed.
Definition vlc_playlist.h:297
Definition vlc_playlist.h:153
enum vlc_playlist_sort_key key
Definition vlc_playlist.h:154
enum vlc_playlist_sort_order order
Definition vlc_playlist.h:155
This file is a collection of common definitions and types.