VLC
3.0.15
|
VLC playlist controls. More...
Modules | |
VLC playlist internals | |
Files | |
file | vlc_playlist.h |
Data Structures | |
struct | playlist_export_t |
Helper structure to export to file part of the playlist. More... | |
struct | playlist_item_t |
playlist item / node More... | |
struct | playlist_t |
Structure containing information about the playlist. More... | |
Macros | |
#define | VLC_DEFINE_SORT_FUNCTIONS |
#define | DEF(s) s, |
#define | PLAYLIST_END -1 |
#define | PL_LOCK playlist_Lock( p_playlist ) |
#define | PL_UNLOCK playlist_Unlock( p_playlist ) |
#define | PL_ASSERT_LOCKED playlist_AssertLocked( p_playlist ) |
#define | playlist_Play(p) playlist_Control(p,PLAYLIST_PLAY, pl_Unlocked ) |
#define | playlist_TogglePause(p) playlist_Control(p, PLAYLIST_TOGGLE_PAUSE, pl_Unlocked) |
#define | playlist_Stop(p) playlist_Control(p,PLAYLIST_STOP, pl_Unlocked ) |
#define | playlist_Next(p) playlist_Control(p,PLAYLIST_SKIP, pl_Unlocked, 1) |
#define | playlist_Prev(p) playlist_Control(p,PLAYLIST_SKIP, pl_Unlocked, -1) |
#define | playlist_Skip(p, i) playlist_Control(p,PLAYLIST_SKIP, pl_Unlocked, (i) ) |
#define | playlist_Pause(p) playlist_Control(p, PLAYLIST_PAUSE, pl_Unlocked) |
#define | playlist_Resume(p) playlist_Control(p, PLAYLIST_RESUME, pl_Unlocked) |
#define | playlist_VolumeDown(a, b, c) playlist_VolumeUp(a, -(b), c) |
Typedefs | |
typedef struct playlist_export_t | playlist_export_t |
Helper structure to export to file part of the playlist. More... | |
Enumerations | |
enum | playlist_item_flags_e { PLAYLIST_DBL_FLAG = 0x04, PLAYLIST_RO_FLAG = 0x08, PLAYLIST_SUBITEM_STOP_FLAG = 0x40, PLAYLIST_NO_INHERIT_FLAG = 0x80 } |
enum | playlist_status_t { PLAYLIST_STOPPED, PLAYLIST_RUNNING, PLAYLIST_PAUSED } |
Playlist status. More... | |
enum | { SORT_ID, SORT_TITLE, SORT_TITLE_NODES_FIRST, SORT_ARTIST, SORT_GENRE, SORT_DURATION, SORT_TITLE_NUMERIC, SORT_ALBUM, SORT_TRACK_NUMBER, SORT_DESCRIPTION, SORT_RATING, SORT_URI, SORT_DISC_NUMBER, SORT_DATE, SORT_RANDOM, NUM_SORT_FNS =SORT_RANDOM } |
enum | { ORDER_NORMAL = 0, ORDER_REVERSE = 1 } |
enum | pl_locked_state { pl_Locked = true, pl_Unlocked = false } |
enum | { PLAYLIST_PLAY, PLAYLIST_VIEWPLAY, PLAYLIST_TOGGLE_PAUSE, PLAYLIST_STOP, PLAYLIST_SKIP, PLAYLIST_PAUSE, PLAYLIST_RESUME } |
Playlist commands. More... | |
Functions | |
void | playlist_Lock (playlist_t *) |
Locks the playlist. More... | |
void | playlist_Unlock (playlist_t *) |
Unlocks the playlist. More... | |
void | playlist_AssertLocked (playlist_t *) |
void | playlist_Deactivate (playlist_t *) |
Stops the playlist forever (but do not destroy it yet). More... | |
void | playlist_Control (playlist_t *p_playlist, int i_query, int b_locked,...) |
Do a playlist action. More... | |
static void | playlist_ViewPlay (playlist_t *pl, playlist_item_t *node, playlist_item_t *item) |
input_thread_t * | playlist_CurrentInput (playlist_t *p_playlist) |
Get current playing input. More... | |
input_thread_t * | playlist_CurrentInputLocked (playlist_t *p_playlist) |
Get current playing input. More... | |
mtime_t | playlist_GetNodeDuration (playlist_item_t *) |
Get the duration of all items in a node. More... | |
void | playlist_Clear (playlist_t *, bool) |
Clear the playlist. More... | |
int | playlist_TreeMove (playlist_t *, playlist_item_t *, playlist_item_t *, int) |
Moves an item. More... | |
int | playlist_TreeMoveMany (playlist_t *, int, playlist_item_t **, playlist_item_t *, int) |
Moves an array of items. More... | |
int | playlist_RecursiveNodeSort (playlist_t *, playlist_item_t *, int, int) |
Sort a node recursively. More... | |
playlist_item_t * | playlist_CurrentPlayingItem (playlist_t *) |
int | playlist_Status (playlist_t *) |
int | playlist_Export (playlist_t *p_playlist, const char *psz_name, bool b_playlist, const char *psz_type) |
Export a node of the playlist to a certain type of playlistfile. More... | |
int | playlist_Import (playlist_t *p_playlist, const char *psz_file) |
Open a playlist file, add its content to the current playlist. More... | |
int | playlist_ServicesDiscoveryAdd (playlist_t *, const char *) |
Add a service discovery module. More... | |
int | playlist_ServicesDiscoveryRemove (playlist_t *, const char *) |
Remove a services discovery module by name. More... | |
bool | playlist_IsServicesDiscoveryLoaded (playlist_t *, const char *) |
Check whether a given SD is loaded. More... | |
int | playlist_ServicesDiscoveryControl (playlist_t *, const char *, int,...) |
Query a services discovery. More... | |
int | playlist_SetRenderer (playlist_t *p_pl, vlc_renderer_item_t *p_item) |
Sets a renderer or remove the current one. More... | |
int | playlist_Add (playlist_t *, const char *, bool) |
Playlist add. More... | |
int | playlist_AddExt (playlist_t *, const char *, const char *, bool, int, const char *const *, unsigned, bool) |
Add a MRL into the playlist or the media library, duration and options given. More... | |
int | playlist_AddInput (playlist_t *, input_item_t *, bool, bool) |
Add an input item to the playlist node. More... | |
playlist_item_t * | playlist_NodeAddInput (playlist_t *, input_item_t *, playlist_item_t *, int) |
Add an input item to a given node. More... | |
int | playlist_NodeAddCopy (playlist_t *, playlist_item_t *, playlist_item_t *, int) |
Copy an item (and all its children, if any) into another node. More... | |
playlist_item_t * | playlist_ItemGetById (playlist_t *, int) |
Finds a playlist item by ID. More... | |
playlist_item_t * | playlist_ItemGetByInput (playlist_t *, const input_item_t *) |
Finds a playlist item by input item. More... | |
int | playlist_LiveSearchUpdate (playlist_t *, playlist_item_t *, const char *, bool) |
Launch the recursive search in the playlist. More... | |
playlist_item_t * | playlist_NodeCreate (playlist_t *, const char *, playlist_item_t *p_parent, int i_pos, int i_flags) |
Create a playlist node. More... | |
playlist_item_t * | playlist_ChildSearchName (playlist_item_t *, const char *) |
Search a child of a node by its name. More... | |
void | playlist_NodeDelete (playlist_t *, playlist_item_t *) |
Remove all the children of a node and removes the node. More... | |
audio_output_t * | playlist_GetAout (playlist_t *) |
float | playlist_VolumeGet (playlist_t *) |
int | playlist_VolumeSet (playlist_t *, float) |
int | playlist_VolumeUp (playlist_t *, int, float *) |
Raises the volume. More... | |
int | playlist_MuteSet (playlist_t *, bool) |
int | playlist_MuteGet (playlist_t *) |
static int | playlist_MuteToggle (playlist_t *pl) |
void | playlist_EnableAudioFilter (playlist_t *, const char *, bool) |
static bool | playlist_IsEmpty (playlist_t *p_playlist) |
Tell if the playlist is empty. More... | |
static int | playlist_CurrentSize (playlist_t *p_playlist) |
Tell the number of items in the current playing context. More... | |
VLC playlist controls.
#define DEF | ( | s | ) | s, |
#define PL_ASSERT_LOCKED playlist_AssertLocked( p_playlist ) |
#define PL_LOCK playlist_Lock( p_playlist ) |
#define PL_UNLOCK playlist_Unlock( p_playlist ) |
#define PLAYLIST_END -1 |
#define playlist_Next | ( | p | ) | playlist_Control(p,PLAYLIST_SKIP, pl_Unlocked, 1) |
#define playlist_Pause | ( | p | ) | playlist_Control(p, PLAYLIST_PAUSE, pl_Unlocked) |
#define playlist_Play | ( | p | ) | playlist_Control(p,PLAYLIST_PLAY, pl_Unlocked ) |
#define playlist_Prev | ( | p | ) | playlist_Control(p,PLAYLIST_SKIP, pl_Unlocked, -1) |
#define playlist_Resume | ( | p | ) | playlist_Control(p, PLAYLIST_RESUME, pl_Unlocked) |
#define playlist_Skip | ( | p, | |
i | |||
) | playlist_Control(p,PLAYLIST_SKIP, pl_Unlocked, (i) ) |
#define playlist_Stop | ( | p | ) | playlist_Control(p,PLAYLIST_STOP, pl_Unlocked ) |
#define playlist_TogglePause | ( | p | ) | playlist_Control(p, PLAYLIST_TOGGLE_PAUSE, pl_Unlocked) |
#define playlist_VolumeDown | ( | a, | |
b, | |||
c | |||
) | playlist_VolumeUp(a, -(b), c) |
#define VLC_DEFINE_SORT_FUNCTIONS |
typedef struct playlist_export_t playlist_export_t |
Helper structure to export to file part of the playlist.
anonymous enum |
anonymous enum |
Playlist commands.
enum pl_locked_state |
enum playlist_status_t |
int playlist_Add | ( | playlist_t * | p_playlist, |
const char * | psz_uri, | ||
bool | play_now | ||
) |
Playlist add.
Add an item to the playlist
p_playlist | the playlist to add into |
psz_uri | the mrl to add to the playlist |
play_now | whether to start playing immediately or not |
References playlist_AddExt().
int playlist_AddExt | ( | playlist_t * | p_playlist, |
const char * | psz_uri, | ||
const char * | psz_name, | ||
bool | play_now, | ||
int | i_options, | ||
const char *const * | ppsz_options, | ||
unsigned | i_option_flags, | ||
bool | b_playlist | ||
) |
Add a MRL into the playlist or the media library, duration and options given.
p_playlist | the playlist to add into |
psz_uri | the mrl to add to the playlist |
psz_name | a text giving a name or description of this item |
play_now | whether to start playing immediately or not |
i_options | the number of options |
ppsz_options | an array of options |
i_option_flags | options flags |
b_playlist | TRUE for playlist, FALSE for media library |
< Not enough memory
References input_item_AddOptions(), input_item_New, input_item_Release(), playlist_AddInput(), psz_name, and VLC_ENOMEM.
Referenced by IPCHelperThread(), and playlist_Add().
int playlist_AddInput | ( | playlist_t * | p_playlist, |
input_item_t * | p_input, | ||
bool | play_now, | ||
bool | b_playlist | ||
) |
Add an input item to the playlist node.
p_playlist | the playlist to add into |
p_input | the input item to add |
i_mode | the mode used when adding |
b_playlist | TRUE for playlist, FALSE for media library |
< No error
< Not enough memory
References likely, playlist_t::p_media_library, playlist_t::p_playing, PL_LOCK, PL_UNLOCK, PLAYLIST_END, playlist_NodeAddInput(), playlist_ViewPlay(), VLC_ENOMEM, and VLC_SUCCESS.
Referenced by playlist_AddExt(), and playlist_Import().
void playlist_AssertLocked | ( | playlist_t * | ) |
playlist_item_t* playlist_ChildSearchName | ( | playlist_item_t * | p_node, |
const char * | psz_search | ||
) |
Search a child of a node by its name.
p_node | the node |
psz_search | the name of the child to search |
References playlist_item_t::i_children, playlist_item_t::p_input, playlist_item_t::pp_children, and input_item_t::psz_name.
void playlist_Clear | ( | playlist_t * | p_playlist, |
bool | b_locked | ||
) |
Clear the playlist.
b_locked | TRUE if playlist is locked when entering this function |
p_playlist | playlist object |
b_locked | TRUE if the playlist is locked |
References playlist_item_t::i_children, playlist_t::p_playing, PL_LOCK_IF, PL_UNLOCK_IF, playlist_NodeDelete(), and playlist_item_t::pp_children.
void playlist_Control | ( | playlist_t * | p_playlist, |
int | i_query, | ||
int | b_locked, | ||
... | |||
) |
Do a playlist action.
If there is something in the playlist then you can do playlist actions. Possible queries are listed in vlc_common.h
p_playlist | the playlist to do the command on |
i_query | the command to do |
b_locked | TRUE if playlist is locked when entering this function |
variable | number of arguments |
Referenced by CorksCallback(), input_item_add_subitem_tree(), and libvlc_InternalPlay().
input_thread_t* playlist_CurrentInput | ( | playlist_t * | p_playlist | ) |
Get current playing input.
The object is retained.
References PL_LOCK, PL_UNLOCK, and playlist_CurrentInputLocked().
input_thread_t* playlist_CurrentInputLocked | ( | playlist_t * | p_playlist | ) |
Get current playing input.
References PL_ASSERT_LOCKED, pl_priv, and vlc_object_hold.
Referenced by playlist_CurrentInput().
playlist_item_t* playlist_CurrentPlayingItem | ( | playlist_t * | ) |
|
inlinestatic |
Tell the number of items in the current playing context.
References playlist_item_array_t::i_size, playlist_t::items, and PL_ASSERT_LOCKED.
void playlist_Deactivate | ( | playlist_t * | p_playlist | ) |
Stops the playlist forever (but do not destroy it yet).
Any input is stopped.
References playlist_private_t::killed, msg_Dbg, PL_LOCK, pl_priv, PL_UNLOCK, playlist_private_t::signal, playlist_private_t::thread, vlc_cond_signal(), and vlc_join().
Referenced by playlist_Destroy().
void playlist_EnableAudioFilter | ( | playlist_t * | , |
const char * | , | ||
bool | |||
) |
References aout_ChangeFilterString(), name, playlist_GetAout(), VLC_OBJECT, and vlc_object_release.
int playlist_Export | ( | playlist_t * | p_playlist, |
const char * | psz_name, | ||
bool | b_playlist, | ||
const char * | psz_type | ||
) |
Export a node of the playlist to a certain type of playlistfile.
b_playlist | true for the playlist, false for the media library |
psz_filename | the location where the exported file will be saved |
psz_type | the type of playlist file to create (m3u, pls, ..) |
< Not enough memory
< Unspecified error
< No error
References playlist_export_t::base_url, module_need, module_unneed, msg_Dbg, msg_Err, playlist_export_t::p_file, playlist_t::p_media_library, playlist_t::p_playing, playlist_export_t::p_root, playlist_Lock(), playlist_Unlock(), unlikely, vlc_custom_create, VLC_EGENERIC, VLC_ENOMEM, vlc_fopen(), vlc_object_release, vlc_path2uri(), vlc_strerror_c(), and VLC_SUCCESS.
audio_output_t* playlist_GetAout | ( | playlist_t * | ) |
References input_resource_HoldAout(), playlist_private_t::p_input_resource, and pl_priv.
Referenced by playlist_EnableAudioFilter(), playlist_MuteGet(), playlist_MuteSet(), playlist_VolumeGet(), playlist_VolumeSet(), and playlist_VolumeUp().
mtime_t playlist_GetNodeDuration | ( | playlist_item_t * | ) |
Get the duration of all items in a node.
int playlist_Import | ( | playlist_t * | p_playlist, |
const char * | psz_file | ||
) |
Open a playlist file, add its content to the current playlist.
< Unspecified error
References input_item_New, input_Read, playlist_AddInput(), var_Create, VLC_EGENERIC, vlc_object_create, vlc_object_release, vlc_path2uri(), and VLC_VAR_VOID.
|
inlinestatic |
Tell if the playlist is empty.
bool playlist_IsServicesDiscoveryLoaded | ( | playlist_t * | , |
const char * | |||
) |
Check whether a given SD is loaded.
References playlist_private_t::i_sds, vlc_sd_internal_t::name, pl_priv, playlist_Lock(), playlist_Unlock(), playlist_private_t::pp_sds, and psz_name.
playlist_item_t* playlist_ItemGetById | ( | playlist_t * | p_playlist, |
int | id | ||
) |
Finds a playlist item by ID.
Searches for a playlist item with the given ID.
p_playlist | the playlist |
id | ID to look for |
References playlist_item_t::i_id, p, PL_ASSERT_LOCKED, pl_priv, playlist_ItemCmpId(), and tfind().
playlist_item_t* playlist_ItemGetByInput | ( | playlist_t * | p_playlist, |
const input_item_t * | item | ||
) |
Finds a playlist item by input item.
Searches for a playlist item for the given input item.
p_playlist | the playlist |
item | input item to look for |
References p, playlist_item_t::p_input, PL_ASSERT_LOCKED, pl_priv, playlist_ItemCmpInput(), and tfind().
Referenced by input_item_add_subitem_tree(), and playlist_sd_item_removed().
int playlist_LiveSearchUpdate | ( | playlist_t * | p_playlist, |
playlist_item_t * | p_root, | ||
const char * | psz_string, | ||
bool | b_recursive | ||
) |
Launch the recursive search in the playlist.
p_playlist | the playlist |
p_root | the current root item |
psz_string | the string to find |
< No error
References PL_ASSERT_LOCKED, pl_priv, playlist_LiveSearchClean(), playlist_LiveSearchUpdateInternal(), vlc_cond_signal(), and VLC_SUCCESS.
void playlist_Lock | ( | playlist_t * | ) |
Locks the playlist.
This function locks the playlist. While the playlist is locked, no other thread can modify the playlist tree layout or current playing item and node.
Locking the playlist is necessary before accessing, either for reading or writing, any playlist item.
While holding the playlist lock, a thread shall not attempt to:
References lock, pl_priv, and vlc_mutex_lock().
Referenced by CorksCallback(), intf_InsertItem(), playlist_Export(), playlist_IsServicesDiscoveryLoaded(), playlist_sd_item_removed(), playlist_ServicesDiscoveryAdd(), playlist_ServicesDiscoveryControl(), playlist_ServicesDiscoveryInternalRemoveLocked(), playlist_ServicesDiscoveryKillAll(), and playlist_ServicesDiscoveryRemove().
int playlist_MuteGet | ( | playlist_t * | ) |
References aout_MuteGet(), playlist_GetAout(), and vlc_object_release.
int playlist_MuteSet | ( | playlist_t * | , |
bool | |||
) |
References aout_MuteSet(), playlist_GetAout(), and vlc_object_release.
|
inlinestatic |
int playlist_NodeAddCopy | ( | playlist_t * | p_playlist, |
playlist_item_t * | p_item, | ||
playlist_item_t * | p_parent, | ||
int | i_pos | ||
) |
Copy an item (and all its children, if any) into another node.
p_playlist | the playlist to operate on |
p_item | the playlist item to copy |
p_parent | the parent item to copy into |
i_pos | the position in the parent item for the new copy; if this is PLAYLIST_END, the copy is appended after all parent's children |
References playlist_item_t::i_children, playlist_item_t::p_parent, playlist_t::p_playing, PL_ASSERT_LOCKED, pl_priv, PLAYLIST_END, and RecursiveInsertCopy().
playlist_item_t* playlist_NodeAddInput | ( | playlist_t * | p_playlist, |
input_item_t * | p_input, | ||
playlist_item_t * | p_parent, | ||
int | i_pos | ||
) |
Add an input item to a given node.
p_playlist | the playlist to add into |
p_input | the input item to add |
p_parent | the parent item to add into |
i_pos | the position in the playlist where to add. If this is PLAYLIST_END the item will be added at the end of the playlist regardless of its size |
References ARRAY_APPEND, playlist_item_t::i_children, input_item_t::i_type, ITEM_TYPE_NODE, playlist_t::items, PL_ASSERT_LOCKED, playlist_ItemNewFromInput(), playlist_NodeInsert(), playlist_Preparse(), playlist_SendAddNotify(), and unlikely.
Referenced by intf_InsertItem(), and playlist_AddInput().
playlist_item_t* playlist_NodeCreate | ( | playlist_t * | p_playlist, |
const char * | psz_name, | ||
playlist_item_t * | p_parent, | ||
int | i_pos, | ||
int | i_flags | ||
) |
Create a playlist node.
p_playlist | the playlist |
psz_name | the name of the node |
p_parent | the parent node to attach to or NULL if no attach |
i_pos | position of the node in the parent, PLAYLIST_END to append to end. |
p_flags | miscellaneous flags |
p_input | the input_item to attach to or NULL if it has to be created |
References _, playlist_item_t::i_flags, input_item_NewExt(), input_item_Release(), ITEM_NET_UNKNOWN, ITEM_TYPE_NODE, PL_ASSERT_LOCKED, playlist_ItemNewFromInput(), playlist_NodeInsert(), playlist_SendAddNotify(), and psz_name.
Referenced by playlist_Create(), and playlist_ServicesDiscoveryAdd().
void playlist_NodeDelete | ( | playlist_t * | p_playlist, |
playlist_item_t * | p_root | ||
) |
Remove all the children of a node and removes the node.
p_playlist | the playlist |
p_root | the node |
< stop playlist playback if node is currently the one played
References PLAYLIST_DELETE_STOP_IF_CURRENT, and playlist_NodeDeleteExplicit().
Referenced by playlist_Clear().
int playlist_RecursiveNodeSort | ( | playlist_t * | p_playlist, |
playlist_item_t * | p_node, | ||
int | i_mode, | ||
int | i_type | ||
) |
Sort a node recursively.
This function must be entered with the playlist lock !
p_playlist | the playlist |
p_node | the node to sort |
i_mode | a SORT_* constant indicating the field to sort on |
i_type | ORDER_NORMAL or ORDER_REVERSE (reversed order) |
References find_sorting_fn(), i_type, PL_ASSERT_LOCKED, pl_priv, and recursiveNodeSort().
int playlist_ServicesDiscoveryAdd | ( | playlist_t * | , |
const char * | |||
) |
Add a service discovery module.
< Not enough memory
< Not enough memory
< No error
References services_discovery_t::description, vlc_sd_internal_t::name, vlc_sd_internal_t::node, pl_priv, PLAYLIST_END, playlist_Lock(), playlist_NodeCreate(), PLAYLIST_RO_FLAG, playlist_sd_item_added(), playlist_sd_item_removed(), playlist_Unlock(), playlist_t::root, vlc_sd_internal_t::sd, TAB_APPEND, unlikely, VLC_ENOMEM, VLC_OBJECT, vlc_sd_Create(), and VLC_SUCCESS.
Referenced by playlist_Create().
int playlist_ServicesDiscoveryControl | ( | playlist_t * | , |
const char * | , | ||
int | , | ||
... | |||
) |
Query a services discovery.
< Unspecified error
References playlist_private_t::i_sds, vlc_sd_internal_t::name, pl_priv, playlist_Lock(), playlist_Unlock(), playlist_private_t::pp_sds, psz_name, vlc_sd_internal_t::sd, VLC_EGENERIC, and vlc_sd_control().
int playlist_ServicesDiscoveryRemove | ( | playlist_t * | , |
const char * | |||
) |
Remove a services discovery module by name.
< Unspecified error
< No error
References playlist_private_t::i_sds, msg_Warn, name, pl_priv, playlist_Lock(), playlist_ServicesDiscoveryInternalRemoveLocked(), playlist_Unlock(), playlist_private_t::pp_sds, TAB_ERASE, VLC_EGENERIC, and VLC_SUCCESS.
int playlist_SetRenderer | ( | playlist_t * | p_pl, |
vlc_renderer_item_t * | p_item | ||
) |
Sets a renderer or remove the current one.
p_item | The renderer item to be used, or NULL to disable the current one. If a renderer is provided, its reference count will be incremented. |
< No error
References input_Control(), INPUT_SET_RENDERER, playlist_private_t::p_input, playlist_private_t::p_renderer, PL_LOCK, pl_priv, PL_UNLOCK, vlc_renderer_item_hold(), vlc_renderer_item_release(), and VLC_SUCCESS.
int playlist_Status | ( | playlist_t * | ) |
Referenced by CorksCallback().
int playlist_TreeMove | ( | playlist_t * | p_playlist, |
playlist_item_t * | p_item, | ||
playlist_item_t * | p_node, | ||
int | i_newpos | ||
) |
Moves an item.
This function must be entered with the playlist lock
p_playlist | the playlist |
p_item | the item to move |
p_node | the new parent of the item |
i_newpos | the new position under this new parent |
< Unspecified error
< No error
References playlist_item_t::i_children, input_item_node_t::i_children, ItemIndex(), rdh_slave::p_node, playlist_item_t::p_parent, PL_ASSERT_LOCKED, pl_priv, playlist_item_t::pp_children, input_item_node_t::pp_children, TAB_ERASE, TAB_INSERT, vlc_cond_signal(), VLC_EGENERIC, and VLC_SUCCESS.
int playlist_TreeMoveMany | ( | playlist_t * | p_playlist, |
int | i_items, | ||
playlist_item_t ** | pp_items, | ||
playlist_item_t * | p_node, | ||
int | i_newpos | ||
) |
Moves an array of items.
This function must be entered with the playlist lock
p_playlist | the playlist |
i_items | the number of indexes to move |
pp_items | the array of indexes to move |
p_node | the target node |
i_newpos | the target position under this node |
< Unspecified error
< No error
References playlist_item_t::i_children, input_item_node_t::i_children, ItemIndex(), rdh_slave::p_node, playlist_item_t::p_parent, PL_ASSERT_LOCKED, pl_priv, playlist_item_t::pp_children, input_item_node_t::pp_children, TAB_ERASE, TAB_INSERT, vlc_cond_signal(), VLC_EGENERIC, and VLC_SUCCESS.
void playlist_Unlock | ( | playlist_t * | ) |
Unlocks the playlist.
This function unlocks the playlist, allowing other threads to lock it. The calling thread must have called playlist_Lock() before.
This function invalidates all or any playlist item pointers. There are no ways to ensure that playlist items are not modified or deleted by another thread past this function call.
To retain a reference to a playlist item while not holding the playlist lock, a thread should take a reference to the input item within the playlist item before unlocking. If this is not practical, then the thread can store the playlist item ID (i_id) before unlocking. Either way, this will not ensure that the playlist item is not deleted, so the thread must be ready to handle that case later when calling playlist_ItemGetByInput() or playlist_ItemGetById().
Furthermore, if ID is used, then the playlist item might be deleted, and another item could be assigned the same ID. To avoid that problem, use the input item instead of the ID.
Referenced by CorksCallback(), intf_InsertItem(), playlist_Export(), playlist_IsServicesDiscoveryLoaded(), playlist_sd_item_removed(), playlist_ServicesDiscoveryAdd(), playlist_ServicesDiscoveryControl(), playlist_ServicesDiscoveryInternalRemoveLocked(), playlist_ServicesDiscoveryKillAll(), and playlist_ServicesDiscoveryRemove().
|
inlinestatic |
Referenced by input_item_add_subitem_tree(), and playlist_AddInput().
float playlist_VolumeGet | ( | playlist_t * | ) |
References aout_VolumeGet(), playlist_GetAout(), and vlc_object_release.
int playlist_VolumeSet | ( | playlist_t * | , |
float | |||
) |
References aout_VolumeSet(), playlist_GetAout(), and vlc_object_release.
int playlist_VolumeUp | ( | playlist_t * | pl, |
int | value, | ||
float * | volp | ||
) |
Raises the volume.
value | how much to increase (> 0) or decrease (< 0) the volume |
volp | if non-NULL, will contain contain the resulting volume |
References aout_VolumeUpdate(), playlist_GetAout(), and vlc_object_release.