|
VLC
2.1.0-git
|
The VLC playlist system has a tree structure. More...
Data Structures | |
| struct | playlist_private_t |
| 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... | |
| struct | playlist_add_t |
| Helper to add an item. More... | |
Typedefs | |
| typedef struct vlc_sd_internal_t | vlc_sd_internal_t |
| typedef struct playlist_private_t | playlist_private_t |
| typedef struct playlist_export_t | playlist_export_t |
| Helper structure to export to file part of the playlist. | |
Enumerations | |
| enum | playlist_item_flags_e { PLAYLIST_SAVE_FLAG = 0x0001, PLAYLIST_SKIP_FLAG = 0x0002, PLAYLIST_DBL_FLAG = 0x0004, PLAYLIST_RO_FLAG = 0x0008, PLAYLIST_REMOVE_FLAG = 0x0010, PLAYLIST_EXPANDED_FLAG = 0x0020, PLAYLIST_SUBITEM_STOP_FLAG = 0x0040 } |
| 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_RANDOM, NUM_SORT_FNS = SORT_RANDOM } |
| enum | { ORDER_NORMAL = 0, ORDER_REVERSE = 1 } |
| enum | pl_locked_state { pl_Locked = true, pl_Unlocked = false } |
Functions | |
| void | playlist_Destroy (playlist_t *) |
| Destroy playlist. | |
| void | playlist_Activate (playlist_t *) |
| Creates the main playlist thread. | |
| playlist_item_t * | playlist_ItemNewFromInput (playlist_t *p_playlist, input_item_t *p_input) |
| playlist_item_t * | get_current_status_item (playlist_t *p_playlist) |
| Accessor for status item and status nodes. | |
| playlist_item_t * | get_current_status_node (playlist_t *p_playlist) |
| void | set_current_status_item (playlist_t *, playlist_item_t *) |
| void | set_current_status_node (playlist_t *, playlist_item_t *) |
| int | playlist_MLLoad (playlist_t *p_playlist) |
| int | playlist_MLDump (playlist_t *p_playlist) |
| void | playlist_SendAddNotify (playlist_t *p_playlist, int i_item_id, int i_node_id, bool b_signal) |
| Send a notification that an item has been added to a node. | |
| playlist_item_t * | playlist_NodeAddInput (playlist_t *, input_item_t *, playlist_item_t *, int, int, bool) |
| Add an input item to a given node. | |
| int | playlist_InsertInputItemTree (playlist_t *, playlist_item_t *, input_item_node_t *, int, bool) |
| Insert a tree of input items into a given playlist node. | |
| playlist_item_t * | playlist_ItemFindFromInputAndRoot (playlist_t *p_playlist, input_item_t *p_input, playlist_item_t *p_root, bool) |
| Find an item within a root, given its input id. | |
| int | playlist_DeleteFromInputInParent (playlist_t *, input_item_t *, playlist_item_t *, bool) |
| Delete input item. | |
| int | playlist_DeleteFromItemId (playlist_t *, int) |
| Delete playlist item. | |
| int | playlist_ItemRelease (playlist_item_t *) |
| Release an item. | |
| int | playlist_NodeEmpty (playlist_t *, playlist_item_t *, bool) |
| Remove all the children of a node. | |
| int | playlist_DeleteItem (playlist_t *p_playlist, playlist_item_t *, bool) |
| void | ResetCurrentlyPlaying (playlist_t *p_playlist, playlist_item_t *p_cur) |
| Reset the currently playing playlist. | |
| void | ResyncCurrentIndex (playlist_t *p_playlist, playlist_item_t *p_cur) |
| Synchronise the current index of the playlist to match the index of the current item. | |
| playlist_t * | pl_Get (vlc_object_t *) |
| void | playlist_Lock (playlist_t *) |
| void | playlist_Unlock (playlist_t *) |
| void | playlist_AssertLocked (playlist_t *) |
| void | playlist_Deactivate (playlist_t *) |
| Stops the playlist forever (but do not destroy it yet). | |
| int | playlist_Control (playlist_t *p_playlist, int i_query, bool b_locked,...) |
| Do a playlist action. | |
| input_thread_t * | playlist_CurrentInput (playlist_t *p_playlist) |
| Get current playing input. | |
| mtime_t | playlist_GetNodeDuration (playlist_item_t *) |
| Get the duration of all items in a node. | |
| void | playlist_Clear (playlist_t *, bool) |
| Clear the playlist. | |
| int | playlist_PreparseEnqueue (playlist_t *, input_item_t *) |
| Enqueue an input item for preparsing. | |
| int | playlist_AskForArtEnqueue (playlist_t *, input_item_t *) |
| Request the art for an input item to be fetched. | |
| int | playlist_TreeMove (playlist_t *, playlist_item_t *, playlist_item_t *, int) |
| Moves an item. | |
| int | playlist_TreeMoveMany (playlist_t *, int, playlist_item_t **, playlist_item_t *, int) |
| Moves an array of items. | |
| int | playlist_RecursiveNodeSort (playlist_t *, playlist_item_t *, int, int) |
| Sort a node recursively. | |
| playlist_item_t * | playlist_CurrentPlayingItem (playlist_t *) |
| int | playlist_Status (playlist_t *) |
| int | playlist_Export (playlist_t *p_playlist, const char *psz_name, playlist_item_t *p_export_root, const char *psz_type) |
| Export a node of the playlist to a certain type of playlistfile. | |
| int | playlist_Import (playlist_t *p_playlist, const char *psz_file) |
| Open a playlist file, add its content to the current playlist. | |
| int | playlist_ServicesDiscoveryAdd (playlist_t *, const char *) |
| Add a list of comma-separated service discovery modules. | |
| int | playlist_ServicesDiscoveryRemove (playlist_t *, const char *) |
| Remove a services discovery module by name. | |
| bool | playlist_IsServicesDiscoveryLoaded (playlist_t *, const char *) |
| Check whether a given SD is loaded. | |
| int | playlist_ServicesDiscoveryControl (playlist_t *, const char *, int,...) |
| Query a services discovery. | |
| int | playlist_DeleteFromInput (playlist_t *, input_item_t *, bool) |
| Delete from input. | |
| int | playlist_Add (playlist_t *, const char *, const char *, int, int, bool, bool) |
| Playlist add. | |
| int | playlist_AddExt (playlist_t *, const char *, const char *, int, int, mtime_t, int, const char *const *, unsigned, bool, bool) |
| Add a MRL into the playlist or the media library, duration and options given. | |
| int | playlist_AddInput (playlist_t *, input_item_t *, int, int, bool, bool) |
| Add an input item to the playlist node. | |
| int | playlist_NodeAddCopy (playlist_t *, playlist_item_t *, playlist_item_t *, int) |
| Copy an item (and all its children, if any) into another node. | |
| playlist_item_t * | playlist_ItemGetById (playlist_t *, int) |
| Search a playlist item by its playlist_item id. | |
| playlist_item_t * | playlist_ItemGetByInput (playlist_t *, input_item_t *) |
| Search an item by its input_item_t The playlist have to be locked. | |
| int | playlist_LiveSearchUpdate (playlist_t *, playlist_item_t *, const char *, bool) |
| Launch the recursive search in the playlist. | |
| playlist_item_t * | playlist_NodeCreate (playlist_t *, const char *, playlist_item_t *p_parent, int i_pos, int i_flags, input_item_t *) |
| Create a playlist node. | |
| int | playlist_NodeAppend (playlist_t *, playlist_item_t *, playlist_item_t *) |
| Adds an item to the children of a node. | |
| int | playlist_NodeInsert (playlist_t *, playlist_item_t *, playlist_item_t *, int) |
| int | playlist_NodeRemoveItem (playlist_t *, playlist_item_t *, playlist_item_t *) |
| Deletes an item from the children of a node. | |
| playlist_item_t * | playlist_ChildSearchName (playlist_item_t *, const char *) |
| Search a child of a node by its name. | |
| int | playlist_NodeDelete (playlist_t *, playlist_item_t *, bool, bool) |
| Remove all the children of a node and removes the node. | |
| playlist_item_t * | playlist_GetNextLeaf (playlist_t *p_playlist, playlist_item_t *p_root, playlist_item_t *p_item, bool b_ena, bool b_unplayed) |
| Finds the next item to play. | |
| playlist_item_t * | playlist_GetPrevLeaf (playlist_t *p_playlist, playlist_item_t *p_root, playlist_item_t *p_item, bool b_ena, bool b_unplayed) |
| Finds the previous item to play. | |
| 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. | |
| 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 input_thread_t * | __pl_CurrentInput (vlc_object_t *p_this) |
| static bool | playlist_IsEmpty (playlist_t *p_playlist) |
| Tell if the playlist is empty. | |
| static int | playlist_CurrentSize (playlist_t *p_playlist) |
| Tell the number of items in the current playing context. | |
The VLC playlist system has a tree structure.
This allows advanced categorization, like for SAP streams (which are grouped by "sap groups").
The base structure for all playlist operations is the input_item_t. This contains all information needed to play a stream and get info, ie, mostly, mrl and metadata. This structure contains a unique i_id field. ids are not recycled when an item is destroyed.
Input items are not used directly, but through playlist items. The playlist items are themselves in a tree structure. They only contain a link to the input item, a unique id and a few flags. the playlist item id is NOT the same as the input item id. Several playlist items can be attached to a single input item. The input item is refcounted and is automatically destroyed when it is not used anymore.
The top-level items are the main media sources and include: playlist, media library, SAP, Shoutcast, devices, ...
It is envisioned that a third tree will appear: VLM, but it's not done yet
The playlist also stores, for utility purposes, an array of all input items, an array of all playlist items and an array of all playlist items and nodes (both are represented by the same structure).
So, here is an example:
* Inputs array * - input 1 -> name = foo 1 uri = ... * - input 2 -> name = foo 2 uri = ... * * Playlist items tree * - playlist (id 1) * - category 1 (id 2) * - foo 2 (id 6 - input 2) * - media library (id 2) * - foo 1 (id 5 - input 1) *
Sometimes, an item creates subitems. This happens for the directory access for example. In that case, if the item is under the "playlist" top-level item and playlist is configured to be flat then the item will be deleted and replaced with new subitems. If the item is under another top-level item, it will be transformed to a node and removed from the list of all items without nodes.
For "standard" item addition, you can use playlist_Add, playlist_AddExt (more options) or playlist_AddInput if you already created your input item. This will add the item at the root of "Playlist" or of "Media library" in each of the two trees.
You can create nodes with playlist_NodeCreate and can create items from existing input items to be placed under any node with playlist_NodeAddInput.
To delete an item, use playlist_DeleteFromInput( p_item ) which will remove all occurrences of the input.
The playlist defines the following event variables:
The playlist contains rate-variable which is propagated to current input if available also rate-slower/rate-faster is in use
XXX Be really carefull, playlist_item_t->i_id and input_item_t->i_id are not the same. Yes, the situation is pretty bad.
| #define AOUT_VOLUME_DEFAULT 256 |
Referenced by playlist_VolumeUp(), and str_format_meta().
| #define AOUT_VOLUME_MAX 512 |
| #define DEF | ( | s | ) | s, |
| #define PL_ASSERT_LOCKED playlist_AssertLocked( p_playlist ) |
Referenced by AddItem(), DeleteFromInput(), get_current_status_item(), get_current_status_node(), GoAndPreparse(), pl_lock_if(), PlayItem(), playlist_ChildSearchName(), playlist_CurrentPlayingItem(), playlist_CurrentSize(), playlist_DeleteFromItemId(), playlist_GetNextLeaf(), playlist_GetNodeDuration(), playlist_GetPrevLeaf(), playlist_IsEmpty(), playlist_ItemGetById(), playlist_ItemGetByInput(), playlist_ItemRelease(), playlist_LiveSearchUpdate(), playlist_NodeAddCopy(), playlist_NodeCreate(), playlist_NodeDelete(), playlist_NodeEmpty(), playlist_NodeInsert(), playlist_NodeRemoveItem(), playlist_SendAddNotify(), playlist_Status(), playlist_TreeMove(), playlist_TreeMoveMany(), PlaylistVAControl(), RecursiveInsertCopy(), ResyncCurrentIndex(), set_current_status_item(), and set_current_status_node().
| #define pl_CurrentInput | ( | a | ) | __pl_CurrentInput( VLC_OBJECT(a) ) |
Small helper tp get current playing input or NULL.
Release the input after use.
| #define pl_Get | ( | a | ) | pl_Get( VLC_OBJECT(a) ) |
Referenced by __pl_CurrentInput(), GetFilenames(), input_CreateFilename(), IPCHelperThread(), libvlc_InternalInit(), and WMCOPYWNDPROC().
| #define PL_LOCK playlist_Lock( p_playlist ) |
Referenced by input_item_add_subitem_tree(), input_item_subitem_tree_added(), InputEvent(), LoopInput(), pl_lock_if(), PlayItem(), playlist_Create(), playlist_CurrentInput(), playlist_Deactivate(), playlist_Destroy(), playlist_IsServicesDiscoveryLoaded(), playlist_MLLoad(), playlist_sd_item_added(), playlist_sd_item_removeall(), playlist_sd_item_removed(), playlist_ServicesDiscoveryAdd(), playlist_ServicesDiscoveryControl(), playlist_ServicesDiscoveryRemove(), RandomCallback(), RateCallback(), RateOffsetCallback(), Thread(), and VideoSplitterCallback().
| #define pl_priv | ( | pl | ) | ((playlist_private_t *)(pl)) |
Referenced by AddItem(), get_current_status_item(), get_current_status_node(), GoAndPreparse(), input_item_add_subitem_tree(), InputEvent(), LoopInput(), LoopRequest(), NextItem(), PlayItem(), playlist_Activate(), playlist_AddInput(), playlist_AskForArtEnqueue(), playlist_AssertLocked(), playlist_Create(), playlist_CurrentInput(), playlist_CurrentPlayingItem(), playlist_Deactivate(), playlist_Destroy(), playlist_GetAout(), playlist_IsServicesDiscoveryLoaded(), playlist_ItemNewFromInput(), playlist_ItemRelease(), playlist_LiveSearchUpdate(), playlist_Lock(), playlist_MLLoad(), playlist_NodeAddCopy(), playlist_NodeDelete(), playlist_PreparseEnqueue(), playlist_RecursiveNodeSort(), playlist_SendAddNotify(), playlist_ServicesDiscoveryAdd(), playlist_ServicesDiscoveryControl(), playlist_ServicesDiscoveryKillAll(), playlist_ServicesDiscoveryRemove(), playlist_Status(), playlist_TreeMove(), playlist_TreeMoveMany(), playlist_Unlock(), PlaylistVAControl(), RandomCallback(), RateCallback(), RateOffsetCallback(), ResetCurrentlyPlaying(), set_current_status_item(), set_current_status_node(), Thread(), and VideoSplitterCallback().
| #define PL_UNLOCK playlist_Unlock( p_playlist ) |
Referenced by input_item_add_subitem_tree(), input_item_subitem_tree_added(), InputEvent(), LoopInput(), pl_unlock_if(), PlayItem(), playlist_Create(), playlist_CurrentInput(), playlist_Deactivate(), playlist_Destroy(), playlist_IsServicesDiscoveryLoaded(), playlist_MLLoad(), playlist_sd_item_added(), playlist_sd_item_removeall(), playlist_sd_item_removed(), playlist_ServicesDiscoveryAdd(), playlist_ServicesDiscoveryControl(), playlist_ServicesDiscoveryRemove(), RandomCallback(), RateCallback(), RateOffsetCallback(), Thread(), and VideoSplitterCallback().
| #define PLAYLIST_APPEND 0x0002 |
Referenced by IPCHelperThread(), playlist_Import(), playlist_sd_item_added(), and WMCOPYWNDPROC().
| #define PLAYLIST_END -666 |
| #define PLAYLIST_GO 0x0004 |
Referenced by GoAndPreparse(), IPCHelperThread(), and WMCOPYWNDPROC().
| #define PLAYLIST_INSERT 0x0001 |
Referenced by GetFilenames(), libvlc_InternalInit(), RecursiveAddIntoParent(), and RecursiveInsertCopy().
| #define playlist_Next | ( | p | ) | playlist_Control(p,PLAYLIST_SKIP, pl_Unlocked, 1) |
| #define PLAYLIST_NO_REBUILD 0x0020 |
Referenced by AddItem(), and playlist_NodeCreate().
| #define playlist_Pause | ( | p | ) | playlist_Control(p,PLAYLIST_PAUSE, pl_Unlocked ) |
Referenced by CorksCallback().
| #define playlist_Play | ( | p | ) | playlist_Control(p,PLAYLIST_PLAY, pl_Unlocked ) |
| #define PLAYLIST_PREPARSE 0x0008 |
| #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_SPREPARSE 0x0010 |
| #define playlist_Stop | ( | p | ) | playlist_Control(p,PLAYLIST_STOP, pl_Unlocked ) |
Referenced by input_item_add_subitem_tree().
| #define playlist_VolumeDown | ( | a, | |
| b, | |||
| c | |||
| ) | playlist_VolumeUp(a, -(b), c) |
| #define VLC_DEFINE_SORT_FUNCTIONS |
Referenced by cmp_d_SORT_URI().
| typedef struct playlist_export_t playlist_export_t |
Helper structure to export to file part of the playlist.
| typedef struct playlist_private_t playlist_private_t |
| typedef struct vlc_sd_internal_t vlc_sd_internal_t |
| anonymous enum |
| enum pl_locked_state |
| enum playlist_status_t |
|
inlinestatic |
References pl_Get, and playlist_CurrentInput().
| playlist_item_t* get_current_status_item | ( | playlist_t * | p_playlist | ) |
Accessor for status item and status nodes.
References PL_ASSERT_LOCKED, and pl_priv.
Referenced by input_item_add_subitem_tree(), NextItem(), playlist_ItemGetByInput(), playlist_NodeDelete(), and PlaylistVAControl().
| playlist_item_t* get_current_status_node | ( | playlist_t * | p_playlist | ) |
References PL_ASSERT_LOCKED, and pl_priv.
Referenced by input_item_add_subitem_tree(), NextItem(), and PlaylistVAControl().
| playlist_t* pl_Get | ( | vlc_object_t * | ) |
| void playlist_Activate | ( | playlist_t * | ) |
Creates the main playlist thread.
References msg_Err, pl_priv, Thread(), playlist_private_t::thread, vlc_clone(), and VLC_THREAD_PRIORITY_LOW.
Referenced by playlist_Create().
| int playlist_Add | ( | playlist_t * | p_playlist, |
| const char * | psz_uri, | ||
| const char * | psz_name, | ||
| int | i_mode, | ||
| int | i_pos, | ||
| bool | b_playlist, | ||
| bool | b_locked | ||
| ) |
Playlist add.
Add an item to the playlist or the media library
| 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 |
| i_mode | the mode used when adding |
| 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 |
| b_playlist | TRUE for playlist, FALSE for media library |
| b_locked | TRUE if the playlist is locked |
References playlist_AddExt().
| int playlist_AddExt | ( | playlist_t * | p_playlist, |
| const char * | psz_uri, | ||
| const char * | psz_name, | ||
| int | i_mode, | ||
| int | i_pos, | ||
| mtime_t | i_duration, | ||
| int | i_options, | ||
| const char *const * | ppsz_options, | ||
| unsigned | i_option_flags, | ||
| bool | b_playlist, | ||
| bool | b_locked | ||
| ) |
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 |
| i_mode | the mode used when adding |
| 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 |
| i_duration | length of the item in milliseconds. |
| 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 |
| b_locked | TRUE if the playlist is locked |
< Not enough memory
References input_item_NewExt(), playlist_AddInput(), VLC_ENOMEM, and vlc_gc_decref.
Referenced by GetFilenames(), IPCHelperThread(), libvlc_InternalInit(), playlist_Add(), and WMCOPYWNDPROC().
| int playlist_AddInput | ( | playlist_t * | p_playlist, |
| input_item_t * | p_input, | ||
| int | i_mode, | ||
| int | i_pos, | ||
| bool | b_playlist, | ||
| bool | b_locked | ||
| ) |
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 |
| 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 |
| b_playlist | TRUE for playlist, FALSE for media library |
| b_locked | TRUE if the playlist is locked |
< Unspecified error
< Not enough memory
< No error
References AddItem(), GoAndPreparse(), playlist_t::p_media_library, playlist_t::p_playing, PL_DEBUG, PL_LOCK_IF, pl_priv, PL_UNLOCK_IF, playlist_ItemNewFromInput(), input_item_t::psz_name, input_item_t::psz_uri, VLC_EGENERIC, VLC_ENOMEM, vlc_object_alive, and VLC_SUCCESS.
Referenced by playlist_AddExt(), and playlist_Import().
| int playlist_AskForArtEnqueue | ( | playlist_t * | , |
| input_item_t * | |||
| ) |
Request the art for an input item to be fetched.
< Not enough memory
< No error
References playlist_private_t::p_fetcher, pl_priv, playlist_fetcher_Push(), unlikely, VLC_ENOMEM, and VLC_SUCCESS.
Referenced by PlayItem().
| void playlist_AssertLocked | ( | playlist_t * | ) |
References lock, pl_priv, and vlc_assert_locked.
| 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::p_playlist, PL_ASSERT_LOCKED, playlist_item_t::pp_children, and input_item_t::psz_name.
Referenced by playlist_sd_item_added().
| 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_t::p_playing, PL_LOCK_IF, PL_UNLOCK_IF, and playlist_NodeEmpty().
| int playlist_Control | ( | playlist_t * | p_playlist, |
| int | i_query, | ||
| bool | 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 |
References PL_LOCK_IF, PL_UNLOCK_IF, and PlaylistVAControl().
Referenced by input_item_add_subitem_tree(), and playlist_NodeDelete().
| input_thread_t* playlist_CurrentInput | ( | playlist_t * | p_playlist | ) |
Get current playing input.
The object is retained.
References PL_LOCK, pl_priv, PL_UNLOCK, and vlc_object_hold.
Referenced by __pl_CurrentInput(), and str_format_meta().
| playlist_item_t* playlist_CurrentPlayingItem | ( | playlist_t * | ) |
References PL_ASSERT_LOCKED, and pl_priv.
|
inlinestatic |
Tell the number of items in the current playing context.
References playlist_t::current, playlist_item_array_t::i_size, 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().
| int playlist_DeleteFromInput | ( | playlist_t * | p_playlist, |
| input_item_t * | p_input, | ||
| bool | b_locked | ||
| ) |
Delete from input.
Search anywhere in playlist for an an input item and delete it
| p_playlist | playlist object |
| p_input | the input to delete |
| b_locked | TRUE if the playlist is locked |
< No error
< No error
< Item not found
References DeleteFromInput(), playlist_t::p_root, PL_LOCK_IF, PL_UNLOCK_IF, VLC_ENOITEM, and VLC_SUCCESS.
| int playlist_DeleteFromInputInParent | ( | playlist_t * | p_playlist, |
| input_item_t * | p_item, | ||
| playlist_item_t * | p_root, | ||
| bool | b_locked | ||
| ) |
Delete input item.
Remove an input item when it appears from a root playlist item
| p_playlist | playlist object |
| p_input | the input to delete |
| p_root | root playlist item |
| b_locked | TRUE if the playlist is locked |
References DeleteFromInput(), PL_LOCK_IF, and PL_UNLOCK_IF.
| int playlist_DeleteFromItemId | ( | playlist_t * | p_playlist, |
| int | i_id | ||
| ) |
Delete playlist item.
Remove a playlist item from the playlist, given its id This function is to be used only by the playlist
| p_playlist | playlist object |
| i_id | id of the item do delete |
< Unspecified error
References PL_ASSERT_LOCKED, playlist_DeleteItem(), playlist_ItemGetById(), and VLC_EGENERIC.
Referenced by playlist_NodeEmpty().
| int playlist_DeleteItem | ( | playlist_t * | p_playlist, |
| playlist_item_t * | , | ||
| bool | |||
| ) |
References playlist_NodeDelete().
Referenced by DeleteFromInput(), input_item_add_subitem_tree(), playlist_DeleteFromItemId(), and playlist_sd_item_removed().
| void playlist_Destroy | ( | playlist_t * | p_playlist | ) |
Destroy playlist.
This is not thread-safe. Any reference to the playlist is assumed gone. (In particular, all interface and services threads must have been joined).
| p_playlist | the playlist object |
References playlist_t::all_items, ARRAY_RESET, playlist_t::current, FOREACH_ARRAY, FOREACH_END, input_resource_Release(), playlist_t::items, playlist_private_t::items_to_delete, playlist_private_t::lock, msg_Dbg, playlist_private_t::p_fetcher, playlist_private_t::p_input, playlist_item_t::p_input, playlist_private_t::p_input_resource, playlist_t::p_media_library, playlist_private_t::p_preparser, PL_LOCK, pl_priv, PL_UNLOCK, playlist_Deactivate(), playlist_fetcher_Delete(), playlist_MLDump(), playlist_preparser_Delete(), playlist_ServicesDiscoveryKillAll(), playlist_item_t::pp_children, set_current_status_item(), set_current_status_node(), playlist_private_t::signal, vlc_cond_destroy(), vlc_gc_decref, vlc_mutex_destroy(), and vlc_object_release.
Referenced by libvlc_InternalCleanup().
| void playlist_EnableAudioFilter | ( | playlist_t * | , |
| const char * | , | ||
| bool | |||
| ) |
| int playlist_Export | ( | playlist_t * | p_playlist, |
| const char * | psz_name, | ||
| playlist_item_t * | p_export_root, | ||
| const char * | psz_type | ||
| ) |
Export a node of the playlist to a certain type of playlistfile.
| p_playlist | the playlist to export |
| psz_filename | the location where the exported file will be saved |
| p_export_root | the root node to export |
| psz_type | the type of playlist file to create (m3u, pls, ..) |
< Unspecified error
< Not enough memory
< Unspecified error
< No error
References module_need, module_unneed, msg_Dbg, msg_Err, playlist_export_t::p_file, playlist_item_t::p_input, playlist_export_t::p_root, playlist_Lock(), playlist_Unlock(), playlist_export_t::psz_filename, input_item_t::psz_name, vlc_custom_create, VLC_EGENERIC, VLC_ENOMEM, vlc_fopen(), vlc_object_release, and VLC_SUCCESS.
Referenced by playlist_MLDump().
| 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().
| playlist_item_t* playlist_GetNextLeaf | ( | playlist_t * | p_playlist, |
| playlist_item_t * | p_root, | ||
| playlist_item_t * | p_item, | ||
| bool | b_ena, | ||
| bool | b_unplayed | ||
| ) |
Finds the next item to play.
| p_playlist | the playlist |
| p_root | the root node |
| p_item | the previous item (NULL if none ) |
References GetNextItem(), playlist_item_t::i_children, playlist_item_t::i_flags, input_item_t::i_nb_played, playlist_item_t::p_input, PL_ASSERT_LOCKED, PL_DEBUG2, PLAYLIST_DBL_FLAG, and PLI_NAME.
Referenced by NextItem(), and ResetCurrentlyPlaying().
| mtime_t playlist_GetNodeDuration | ( | playlist_item_t * | ) |
Get the duration of all items in a node.
References playlist_item_t::i_children, input_item_GetDuration(), playlist_item_t::p_input, playlist_item_t::p_playlist, PL_ASSERT_LOCKED, and playlist_item_t::pp_children.
| playlist_item_t* playlist_GetPrevLeaf | ( | playlist_t * | p_playlist, |
| playlist_item_t * | p_root, | ||
| playlist_item_t * | p_item, | ||
| bool | b_ena, | ||
| bool | b_unplayed | ||
| ) |
Finds the previous item to play.
| p_playlist | the playlist |
| p_root | the root node |
| p_item | the previous item (NULL if none ) |
References GetPrevItem(), playlist_item_t::i_children, playlist_item_t::i_flags, input_item_t::i_nb_played, playlist_item_t::p_input, PL_ASSERT_LOCKED, PL_DEBUG2, PLAYLIST_DBL_FLAG, and PLI_NAME.
| 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_NewExt(), input_Read, playlist_AddInput(), PLAYLIST_APPEND, PLAYLIST_END, VLC_EGENERIC, VLC_INPUT_OPTION_TRUSTED, and vlc_path2uri().
| int playlist_InsertInputItemTree | ( | playlist_t * | p_playlist, |
| playlist_item_t * | p_parent, | ||
| input_item_node_t * | p_node, | ||
| int | i_pos, | ||
| bool | b_flat | ||
| ) |
Insert a tree of input items into a given playlist node.
| p_playlist | the playlist to insert into |
| p_parent | the receiving playlist node (can be an item) |
| p_node | the root of input item tree, only it's contents will be inserted |
| i_pos | the position in the playlist where to insert. If this is PLAYLIST_END the items will be added at the end of the playlist regardless of its size |
| b_flat | TRUE if the new tree contents should be flattened into a list |
References RecursiveAddIntoParent().
Referenced by input_item_add_subitem_tree(), and input_item_subitem_tree_added().
|
inlinestatic |
Tell if the playlist is empty.
References playlist_item_array_t::i_size, playlist_t::items, and PL_ASSERT_LOCKED.
Referenced by PlaylistVAControl().
| bool playlist_IsServicesDiscoveryLoaded | ( | playlist_t * | , |
| const char * | |||
| ) |
Check whether a given SD is loaded.
References playlist_private_t::i_sds, PL_LOCK, pl_priv, PL_UNLOCK, playlist_private_t::pp_sds, and vlc_sd_internal_t::psz_name.
| playlist_item_t* playlist_ItemFindFromInputAndRoot | ( | playlist_t * | p_playlist, |
| input_item_t * | p_item, | ||
| playlist_item_t * | p_root, | ||
| bool | b_items_only | ||
| ) |
Find an item within a root, given its input id.
| p_playlist | the playlist object |
| p_item | the input item |
| p_root | root playlist item |
| b_items_only | TRUE if we want the item himself |
References playlist_item_t::i_children, playlist_item_t::p_input, playlist_ItemFindFromInputAndRoot(), and playlist_item_t::pp_children.
Referenced by DeleteFromInput(), playlist_ItemFindFromInputAndRoot(), and playlist_sd_item_removed().
| playlist_item_t* playlist_ItemGetById | ( | playlist_t * | p_playlist, |
| int | i_id | ||
| ) |
Search a playlist item by its playlist_item id.
The playlist have to be locked
| p_playlist,: | the playlist |
| i_id,: | the id to find |
References playlist_t::all_items, ARRAY_BSEARCH, ARRAY_VAL, and PL_ASSERT_LOCKED.
Referenced by playlist_DeleteFromItemId().
| playlist_item_t* playlist_ItemGetByInput | ( | playlist_t * | p_playlist, |
| input_item_t * | p_item | ||
| ) |
Search an item by its input_item_t The playlist have to be locked.
| p_playlist,: | the playlist |
| p_item,: | the input_item_t to find |
References playlist_t::all_items, ARRAY_VAL, get_current_status_item(), playlist_item_array_t::i_size, and PL_ASSERT_LOCKED.
Referenced by input_item_add_subitem_tree().
| playlist_item_t* playlist_ItemNewFromInput | ( | playlist_t * | p_playlist, |
| input_item_t * | p_input | ||
| ) |
References playlist_item_t::i_children, playlist_item_t::i_flags, playlist_item_t::i_id, install_input_item_observer(), playlist_item_t::p_input, playlist_item_t::p_parent, playlist_item_t::p_playlist, pl_priv, playlist_item_t::pp_children, and vlc_gc_incref.
Referenced by playlist_AddInput(), playlist_NodeAddInput(), and playlist_NodeCreate().
| int playlist_ItemRelease | ( | playlist_item_t * | p_item | ) |
Release an item.
| p_item | item to delete |
< No error
References ARRAY_APPEND, playlist_item_t::p_playlist, PL_ASSERT_LOCKED, pl_priv, uninstall_input_item_observer(), and VLC_SUCCESS.
Referenced by playlist_NodeDelete().
| 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 * | ) |
References lock, pl_priv, and vlc_mutex_lock().
Referenced by playlist_Export(), and Thread().
| int playlist_MLDump | ( | playlist_t * | p_playlist | ) |
< Unspecified error
< Unspecified error
< No error
References config_CreateDir(), config_GetUserDir(), DIR_SEP, msg_Err, playlist_t::p_media_library, playlist_Export(), VLC_DATA_DIR, VLC_EGENERIC, and VLC_SUCCESS.
Referenced by playlist_Destroy().
| int playlist_MLLoad | ( | playlist_t * | p_playlist | ) |
< Unspecified error
< Not enough memory
< Unspecified error
< Not enough memory
< Unspecified error
< No error
References _, asprintf(), config_GetUserDir(), DIR_SEP, input_item_t::event_manager, input_item_NewExt(), input_item_subitem_tree_added(), input_Read, msg_Err, playlist_item_t::p_input, playlist_t::p_media_library, PL_LOCK, pl_priv, PL_UNLOCK, VLC_DATA_DIR, VLC_EGENERIC, VLC_ENOMEM, vlc_event_attach(), vlc_event_detach(), vlc_gc_decref, VLC_INPUT_OPTION_TRUSTED, vlc_InputItemSubItemTreeAdded, vlc_path2uri(), vlc_stat(), and VLC_SUCCESS.
Referenced by playlist_Create().
| int playlist_MuteGet | ( | playlist_t * | ) |
References aout_MuteGet(), playlist_GetAout(), and vlc_object_release.
Referenced by playlist_MuteToggle().
| int playlist_MuteSet | ( | playlist_t * | , |
| bool | |||
| ) |
References aout_MuteSet(), playlist_GetAout(), var_SetBool, and vlc_object_release.
Referenced by playlist_MuteToggle().
|
inlinestatic |
References playlist_MuteGet(), and playlist_MuteSet().
| 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 * | , |
| input_item_t * | , | ||
| playlist_item_t * | , | ||
| int | , | ||
| int | , | ||
| bool | |||
| ) |
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_mode | the mode used when addin |
| 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 |
| b_locked | TRUE if the playlist is locked |
References AddItem(), GoAndPreparse(), playlist_item_t::i_children, PL_LOCK_IF, PL_UNLOCK_IF, playlist_ItemNewFromInput(), and vlc_object_alive.
Referenced by playlist_sd_item_added(), RecursiveAddIntoParent(), and RecursiveInsertCopy().
| int playlist_NodeAppend | ( | playlist_t * | p_playlist, |
| playlist_item_t * | p_item, | ||
| playlist_item_t * | p_parent | ||
| ) |
Adds an item to the children of a node.
| p_playlist | the playlist |
| p_item | the item to append |
| p_parent | the parent node |
References playlist_NodeInsert().
Referenced by AddItem().
| playlist_item_t* playlist_NodeCreate | ( | playlist_t * | p_playlist, |
| const char * | psz_name, | ||
| playlist_item_t * | p_parent, | ||
| int | i_pos, | ||
| int | i_flags, | ||
| input_item_t * | p_input | ||
| ) |
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_t::all_items, ARRAY_APPEND, playlist_item_t::i_children, playlist_item_t::i_flags, playlist_item_t::i_id, input_item_NewWithType(), ITEM_TYPE_NODE, PL_ASSERT_LOCKED, PLAYLIST_END, playlist_ItemNewFromInput(), PLAYLIST_NO_REBUILD, playlist_NodeInsert(), playlist_SendAddNotify(), and vlc_gc_decref.
Referenced by playlist_Create(), playlist_sd_item_added(), playlist_ServicesDiscoveryAdd(), and RecursiveInsertCopy().
| int playlist_NodeDelete | ( | playlist_t * | p_playlist, |
| playlist_item_t * | p_root, | ||
| bool | b_delete_items, | ||
| bool | b_force | ||
| ) |
Remove all the children of a node and removes the node.
| p_playlist | the playlist |
| p_root | the node |
| b_delete_items | do we have to delete the children items ? |
< No error
< No error
References playlist_t::all_items, ARRAY_BSEARCH, ARRAY_REMOVE, playlist_t::current, get_current_status_item(), playlist_item_t::i_children, playlist_item_t::i_flags, playlist_item_t::i_id, playlist_t::items, msg_Info, playlist_item_t::p_input, playlist_item_t::p_parent, PL_ASSERT_LOCKED, PL_DEBUG, pl_Locked, pl_priv, playlist_Control(), playlist_ItemRelease(), playlist_NodeDelete(), playlist_NodeRemoveItem(), PLAYLIST_RO_FLAG, PLAYLIST_STOP, playlist_item_t::pp_children, input_item_t::psz_name, set_current_status_item(), var_SetInteger, and VLC_SUCCESS.
Referenced by playlist_DeleteItem(), playlist_NodeDelete(), playlist_NodeEmpty(), playlist_sd_item_removed(), and playlist_ServicesDiscoveryRemove().
| int playlist_NodeEmpty | ( | playlist_t * | p_playlist, |
| playlist_item_t * | p_root, | ||
| bool | b_delete_items | ||
| ) |
Remove all the children of a node.
This function must be entered with the playlist lock
| p_playlist | the playlist |
| p_root | the node |
| b_delete_items | do we have to delete the children items ? |
< Unspecified error
< No error
References playlist_item_t::i_children, playlist_item_t::i_id, PL_ASSERT_LOCKED, playlist_DeleteFromItemId(), playlist_NodeDelete(), playlist_item_t::pp_children, VLC_EGENERIC, and VLC_SUCCESS.
Referenced by playlist_Clear(), and playlist_sd_item_removeall().
| int playlist_NodeInsert | ( | playlist_t * | , |
| playlist_item_t * | , | ||
| playlist_item_t * | , | ||
| int | |||
| ) |
< No error
References playlist_item_t::i_children, INSERT_ELEM, playlist_item_t::p_parent, PL_ASSERT_LOCKED, playlist_item_t::pp_children, and VLC_SUCCESS.
Referenced by AddItem(), playlist_NodeAppend(), and playlist_NodeCreate().
| int playlist_NodeRemoveItem | ( | playlist_t * | p_playlist, |
| playlist_item_t * | p_item, | ||
| playlist_item_t * | p_parent | ||
| ) |
Deletes an item from the children of a node.
| p_playlist | the playlist |
| p_item | the item to remove |
| p_parent | the parent node |
< Unspecified error
< No error
< No error
References playlist_item_t::i_children, playlist_item_t::p_parent, PL_ASSERT_LOCKED, playlist_item_t::pp_children, REMOVE_ELEM, VLC_EGENERIC, and VLC_SUCCESS.
Referenced by playlist_NodeDelete().
| int playlist_PreparseEnqueue | ( | playlist_t * | p_playlist, |
| input_item_t * | p_item | ||
| ) |
Enqueue an input item for preparsing.
< Not enough memory
< No error
References playlist_private_t::p_preparser, pl_priv, playlist_preparser_Push(), unlikely, VLC_ENOMEM, and VLC_SUCCESS.
Referenced by GoAndPreparse().
| 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(), pl_priv, and recursiveNodeSort().
| void playlist_SendAddNotify | ( | playlist_t * | p_playlist, |
| int | i_item_id, | ||
| int | i_node_id, | ||
| bool | b_signal | ||
| ) |
Send a notification that an item has been added to a node.
| p_playlist | the playlist object |
| i_item_id | id of the item added |
| i_node_id | id of the node in wich the item was added |
| b_signal | TRUE if the function must send a signal |
References playlist_private_t::b_reset_currently_playing, playlist_add_t::i_item, playlist_add_t::i_node, PL_ASSERT_LOCKED, pl_priv, playlist_private_t::signal, var_SetAddress, and vlc_cond_signal().
Referenced by AddItem(), and playlist_NodeCreate().
| int playlist_ServicesDiscoveryAdd | ( | playlist_t * | , |
| const char * | |||
| ) |
Add a list of comma-separated service discovery modules.
< Not enough memory
< Not enough memory
< Unspecified error
< No error
References msg_Dbg, services_discovery_t::p_cfg, config_chain_t::p_next, vlc_sd_internal_t::p_node, playlist_t::p_root, vlc_sd_internal_t::p_sd, PL_LOCK, pl_priv, PL_UNLOCK, PLAYLIST_END, playlist_NodeCreate(), playlist_sd_item_added(), playlist_sd_item_removeall(), playlist_sd_item_removed(), config_chain_t::psz_name, vlc_sd_internal_t::psz_name, config_chain_t::psz_value, services_discovery_EventManager(), strdup(), TAB_APPEND, VLC_EGENERIC, VLC_ENOMEM, vlc_event_attach(), VLC_OBJECT, vlc_sd_Create(), vlc_sd_Destroy(), vlc_sd_Start(), vlc_ServicesDiscoveryItemAdded, vlc_ServicesDiscoveryItemRemoveAll, vlc_ServicesDiscoveryItemRemoved, 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::p_sd, PL_LOCK, pl_priv, PL_UNLOCK, playlist_private_t::pp_sds, vlc_sd_internal_t::psz_name, 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, vlc_sd_internal_t::p_node, vlc_sd_internal_t::p_sd, PL_LOCK, pl_priv, PL_UNLOCK, playlist_NodeDelete(), playlist_sd_item_added(), playlist_sd_item_removed(), playlist_private_t::pp_sds, vlc_sd_internal_t::psz_name, REMOVE_ELEM, services_discovery_EventManager(), VLC_EGENERIC, vlc_event_detach(), vlc_sd_Destroy(), vlc_sd_Stop(), vlc_ServicesDiscoveryItemAdded, vlc_ServicesDiscoveryItemRemoved, and VLC_SUCCESS.
Referenced by playlist_ServicesDiscoveryKillAll().
| int playlist_Status | ( | playlist_t * | ) |
References PL_ASSERT_LOCKED, and pl_priv.
| 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, INSERT_ELEM, ItemIndex(), playlist_item_t::p_parent, PL_ASSERT_LOCKED, pl_priv, playlist_item_t::pp_children, REMOVE_ELEM, 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, INSERT_ELEM, ItemIndex(), playlist_item_t::p_parent, PL_ASSERT_LOCKED, pl_priv, playlist_item_t::pp_children, REMOVE_ELEM, vlc_cond_signal(), VLC_EGENERIC, and VLC_SUCCESS.
| void playlist_Unlock | ( | playlist_t * | ) |
References lock, pl_priv, and vlc_mutex_unlock().
Referenced by playlist_Export(), and Thread().
| float playlist_VolumeGet | ( | playlist_t * | ) |
References aout_VolumeGet(), playlist_GetAout(), and vlc_object_release.
Referenced by str_format_meta().
| 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_VOLUME_DEFAULT, aout_VolumeGet(), aout_VolumeSet(), playlist_GetAout(), var_InheritInteger, and vlc_object_release.
| void ResetCurrentlyPlaying | ( | playlist_t * | p_playlist, |
| playlist_item_t * | p_cur | ||
| ) |
Reset the currently playing playlist.
| p_playlist | the playlist structure |
| p_cur | the current playlist item |
FIXME: this is slow
References ARRAY_APPEND, ARRAY_RESET, ARRAY_VAL, playlist_private_t::b_reset_currently_playing, playlist_t::current, playlist_t::i_current_index, playlist_item_array_t::i_size, playlist_private_t::p_node, PL_DEBUG, pl_priv, playlist_GetNextLeaf(), PLI_NAME, playlist_private_t::status, var_GetBool, and vlc_lrand48().
Referenced by NextItem(), and RandomCallback().
| void ResyncCurrentIndex | ( | playlist_t * | p_playlist, |
| playlist_item_t * | p_cur | ||
| ) |
Synchronise the current index of the playlist to match the index of the current item.
| p_playlist | the playlist structure |
| p_cur | the current playlist item |
References ARRAY_VAL, playlist_t::current, playlist_t::i_current_index, playlist_item_array_t::i_size, PL_ASSERT_LOCKED, PL_DEBUG, and PLI_NAME.
Referenced by LoopRequest(), NextItem(), and RandomCallback().
| void set_current_status_item | ( | playlist_t * | , |
| playlist_item_t * | |||
| ) |
References PL_ASSERT_LOCKED, pl_priv, and PLAYLIST_REMOVE_FLAG.
Referenced by PlayItem(), playlist_Destroy(), and playlist_NodeDelete().
| void set_current_status_node | ( | playlist_t * | , |
| playlist_item_t * | |||
| ) |
References PL_ASSERT_LOCKED, pl_priv, and PLAYLIST_REMOVE_FLAG.
Referenced by NextItem(), and playlist_Destroy().
1.8.1.2