Playlist

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...

Defines

#define pl_priv(pl)   ((playlist_private_t *)(pl))
#define PLAYLIST_SAVE_FLAG   0x0001
 Must it be saved.
#define PLAYLIST_SKIP_FLAG   0x0002
 Must playlist skip after it ?
#define PLAYLIST_DBL_FLAG   0x0004
 Is it disabled ?
#define PLAYLIST_RO_FLAG   0x0008
 Write-enabled ?
#define PLAYLIST_REMOVE_FLAG   0x0010
 Remove this item at the end.
#define PLAYLIST_EXPANDED_FLAG   0x0020
 Expanded node.
#define VLC_DEFINE_SORT_FUNCTIONS
#define DEF(s)   s,
#define PLAYLIST_INSERT   0x0001
#define PLAYLIST_APPEND   0x0002
#define PLAYLIST_GO   0x0004
#define PLAYLIST_PREPARSE   0x0008
#define PLAYLIST_SPREPARSE   0x0010
#define PLAYLIST_NO_REBUILD   0x0020
#define PLAYLIST_END   -666
#define PL_LOCK   playlist_Lock( p_playlist )
#define PL_UNLOCK   playlist_Unlock( p_playlist )
#define PL_ASSERT_LOCKED   playlist_AssertLocked( p_playlist )
#define pl_Hold(a)   __pl_Hold( VLC_OBJECT(a) )
#define pl_Release(a)   __pl_Release( VLC_OBJECT(a) )
#define playlist_Play(p)   playlist_Control(p,PLAYLIST_PLAY, pl_Unlocked )
#define playlist_Pause(p)   playlist_Control(p,PLAYLIST_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 pl_CurrentInput(a)   __pl_CurrentInput( VLC_OBJECT(a) )
 Small helper tp get current playing input or NULL.

Typedefs

typedef struct vlc_sd_internal_t vlc_sd_internal_t

Enumerations

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

playlist_tplaylist_Create (vlc_object_t *)
 Create playlist.
void playlist_Activate (playlist_t *)
 Create the main playlist threads.
void playlist_Deactivate (playlist_t *)
playlist_item_tplaylist_ItemNewFromInput (playlist_t *p_playlist, input_item_t *p_input)
playlist_item_tget_current_status_item (playlist_t *p_playlist)
 Accessor for status item and status nodes.
playlist_item_tget_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_tplaylist_NodeAddInput (playlist_t *, input_item_t *, playlist_item_t *, int, int, bool)
 Add an input item to a given node.
playlist_item_tplaylist_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.
void playlist_NodesPairCreate (playlist_t *, const char *, playlist_item_t **, playlist_item_t **, bool)
 Create a pair of nodes in the category and onelevel trees.
int playlist_NodeEmpty (playlist_t *, playlist_item_t *, bool)
 Remove all the children of a node.
playlist_t__pl_Hold (vlc_object_t *)
void __pl_Release (vlc_object_t *)
void playlist_Lock (playlist_t *)
void playlist_Unlock (playlist_t *)
void playlist_AssertLocked (playlist_t *)
int playlist_Control (playlist_t *p_playlist, int i_query, bool b_locked,...)
 Do a playlist action.
input_thread_tplaylist_CurrentInput (playlist_t *p_playlist)
 Get current playing input.
void playlist_Clear (playlist_t *, bool)
 Clear the playlist.
int playlist_PreparseEnqueue (playlist_t *, input_item_t *, bool b_locked)
 Enqueue an input item for preparsing.
int playlist_AskForArtEnqueue (playlist_t *, input_item_t *, bool b_locked)
 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_tplaylist_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_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_BothAddInput (playlist_t *, input_item_t *, playlist_item_t *, int, int, int *, int *, bool)
 Add input.
playlist_item_tplaylist_ItemGetById (playlist_t *, int)
 Search a playlist item by its playlist_item id.
playlist_item_tplaylist_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 *)
 Launch the recursive search in the playlist.
playlist_item_tplaylist_NodeCreate (playlist_t *, const char *, playlist_item_t *p_parent, 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_tplaylist_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_tplaylist_GetPreferredNode (playlist_t *p_playlist, playlist_item_t *p_node)
 Get the node in the preferred tree from a node in one of category or onelevel tree.
playlist_item_tplaylist_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_tplaylist_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.
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.

Detailed Description

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.

In the playlist itself, there are two trees, that should always be kept in sync. The "category" tree contains the whole tree structure with several levels, while the onelevel tree contains only one level :), ie it only contains "real" items, not nodes For example, if you open a directory, you will have

 * Category tree:               Onelevel tree:
 * Playlist                     Playlist
 *  - Dir                         - item1
 *    - Subdir                    - item2
 *      - item1
 *      - item2
 *
The top-level items of both tree are the same, and they are reproduced in the left-part of the playlist GUIs, they are the "sources" from the source selectors. Top-level items 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 = ...
 *
 * Category tree                        Onelevel tree
 * - playlist (id 1)                    - playlist (id 3)
 *    - category 1 (id 2)                - foo 2 (id 8 - input 2)
 *      - foo 2 (id 6 - input 2)       - media library (id 4)
 * - media library (id 2)                - foo 1 (id6 - input 1)
 *    - foo 1 (id 5 - input 1)
 * 
Sometimes, an item must be transformed to a node. This happens for the directory access for example. In that case, the item is removed from the onelevel tree, as it is not a real item anymore.

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.

If you want more control (like, adding the item as the child of a given node in the category tree, use playlist_BothAddInput. You'll have to provide the node in the category tree. The item will be added as a child of this node in the category tree, and as a child of the matching top-level node in the onelevel tree. (Nodes are created with playlist_NodeCreate)

Generally speaking, playlist_NodeAddInput should not be used in newer code, it will maybe become useful again when we merge VLM;

To delete an item, use playlist_DeleteFromInput( p_item ) which will remove all occurrences of the input in both trees

The playlist defines the following event variables:

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 Documentation

#define DEF (  )     s,

#define PL_ASSERT_LOCKED   playlist_AssertLocked( p_playlist )

#define pl_CurrentInput (  )     __pl_CurrentInput( VLC_OBJECT(a) )

#define pl_Hold (  )     __pl_Hold( VLC_OBJECT(a) )

Referenced by __str_format_meta(), Activate(), VLCPlaylist::addNode:, AddTrack(), VLCPlaylist::appendArray:atPos:enqueue:, VLCPlaylist::appendNodeArray:inNode:atPos:enqueue:, VLCMain::applicationWillTerminate:, VLCEqualizer::awakeFromNib, VLCEqualizer::bandSliderUpdated:, VLCEqualizer::changePreset:, Close(), Playlist::DeleteItem(), VLCPlaylist::deleteItem:, DelTrack(), Demux(), DemuxOpen(), DesktopCallback(), DirectXEventProc(), VLCInfo::downloadCoverArt:, VLCPlaylist::downloadCoverArt:, Eject(), VLCVoutView::enterFullscreen, VLCEqualizer::equalizerUpdated, FindArt(), GetCurrentMetadata(), GetCurrentTrack(), GetFilenames(), GetLength(), GetMetadata(), HandleKey(), input_ExtractAttachmentAndCacheArt(), InterfaceWindow::InterfaceWindow(), ItemChange(), VLCVoutView::leaveFullscreen, libvlc_InternalInit(), VLCControls::loop:, VLCMain::manage, VLCMain::manageIntf:, ManageVideo(), VLCMain::manageVolumeSlider, MarshalStatus(), Next(), VLCWizard::nextTab:, Playlist::OnActivateItem(), Playlist::OnColSelect(), Playlist::OnDisableSelection(), Playlist::OnDown(), Playlist::OnEnableSelection(), Playlist::OnLoop(), Interface::OnNextStream(), ItemInfoDialog::OnOk(), OpenDialog::OnOk(), OnOpenCB(), Interface::OnPlayStream(), Playlist::OnPopupEna(), Playlist::OnPopupPlay(), Interface::OnPrevStream(), Playlist::OnRandom(), Playlist::OnRepeat(), OnSaveCB(), Playlist::OnSort(), Interface::OnStopStream(), Playlist::OnUp(), VLCExtended::opaqueSliderAction:, Open(), Pause(), Play(), VLCControls::play:, PlayBookmark(), VLCPlaylist::playingItem, VLCPlaylist::playItem:, PlaylistChanged(), PlaylistGetRoot(), PlaylistRebuild(), VLCPlaylist::playlistUpdated, VLCPlaylist::playModeUpdated, PlayPause(), VLCPlaylist::playSidebarItem:, PopupMenu(), PositionGet(), PositionSet(), VLCEqualizer::preampSliderUpdated:, VLCPlaylist::preparseItem:, Prev(), Playlist::ProcessCustomDraw(), PutAction(), VLCControls::quitAfterPlayback:, VLCControls::random:, ReadMetaData(), Playlist::Rebuild(), Redraw(), Repeat(), VLCControls::repeat:, VLCControls::repeatButtonAction:, InputManager::requestArtUpdate(), VLCMain::resetScrollField, Run(), RunIntf(), MetaPanel::saveMeta(), VLCInfo::saveMetaData:, VLCPlaylist::savePlaylist:, VLCExtended::savePrefs, VLCPlaylist::searchItem:, VLCPlaylist::servicesChange:, SetBookmark(), SetLoop(), SetRandom(), VLCMain::setupMenus, Playlist::ShowInfos(), VLCControls::shuffle, VLCPlaylist::sortNode:, StateChange(), Stop(), Timer::Timer(), VLCMain::timesliderUpdate:, TrackChange(), TrackListChangeEmit(), TrackListChangeSignal(), VLCEqualizer::twopass:, UpdateCaps(), Playlist::UpdateItem(), VLCInfo::updatePanelWithItem:, Playlist::UpdatePlaylist(), VLCPlaylist::updateRowSelection, SoundWidget::updateVolume(), vlclua_get_playlist_internal(), Interface::VolumeChange(), VolumeGet(), VolumeSet(), VLCControls::volumeSliderUpdated:, Interface::VolumeUpdate(), vout_SendEventClose(), WallpaperCallback(), VLCControls::windowAction:, WMCOPYWNDPROC(), Playlist::WndProc(), and Timer::~Timer().

#define PL_LOCK   playlist_Lock( p_playlist )

Referenced by PLModel::activateItem(), VLCPlaylist::addNode:, VLCPlaylist::appendArray:atPos:enqueue:, VLCPlaylist::appendNodeArray:inNode:atPos:enqueue:, VLCPlaylist::deleteItem:, DelTrack(), PLModel::dropMimeData(), Eject(), CmdPlaytreeSort::execute(), FindIndex(), PLModel::flags(), GetCurrentMetadata(), GetMetadata(), HandleKey(), input_item_subitem_added(), InputEvent(), LoopInput(), LoopRequest(), VLCMain::manageIntf:, VLCWizard::nextTab:, Playlist::OnDisableSelection(), Playlist::OnEnableSelection(), Playlist::OnPopupEna(), Open(), pl_lock_if(), VLCControls::play:, PlayBookmark(), VLCPlaylist::playingItem, PlayItem(), VLCPlaylist::playItem:, Playlist(), playlist_Create(), playlist_CurrentInput(), playlist_Deactivate(), playlist_IsServicesDiscoveryLoaded(), playlist_MLLoad(), playlist_sd_item_added(), playlist_ServicesDiscoveryAdd(), playlist_ServicesDiscoveryRemove(), PlaylistRebuild(), VLCPlaylist::playlistUpdated, PlaylistWidget::PlaylistWidget(), PLModel::popup(), Playlist::ProcessCustomDraw(), RandomCallback(), PLModel::rebuild(), Playlist::Rebuild(), Redraw(), VLCMain::resetScrollField, Run(), PLModel::search(), PLModel::selectedURIs(), Playlist::ShowInfos(), PLModel::sort(), VLCPlaylist::sortNode:, StateChanged(), TrackListChangeEmit(), UpdateCaps(), Playlist::UpdateItem(), Playlist::UpdatePlaylist(), VLCPlaylist::updateRowSelection, vlclua_playlist_get(), vlclua_playlist_goto(), vlclua_playlist_play(), vlclua_playlist_search(), vlclua_playlist_sort(), and vlclua_playlist_status().

#define pl_priv ( pl   )     ((playlist_private_t *)(pl))

#define pl_Release (  )     __pl_Release( VLC_OBJECT(a) )

Referenced by __str_format_meta(), VLCPlaylist::addNode:, AddTrack(), VLCPlaylist::appendArray:atPos:enqueue:, VLCPlaylist::appendNodeArray:inNode:atPos:enqueue:, VLCMain::applicationWillTerminate:, Close(), Deactivate(), Playlist::DeleteItem(), VLCPlaylist::deleteItem:, DelTrack(), Demux(), DemuxOpen(), DesktopCallback(), DirectXEventProc(), VLCInfo::downloadCoverArt:, VLCPlaylist::downloadCoverArt:, Eject(), VLCVoutView::enterFullscreen, FindArt(), GetCurrentMetadata(), GetCurrentTrack(), GetFilenames(), GetLength(), GetMetadata(), HandleKey(), input_ExtractAttachmentAndCacheArt(), ItemChange(), VLCVoutView::leaveFullscreen, libvlc_InternalInit(), VLCControls::loop:, VLCMain::manageIntf:, ManageVideo(), VLCMain::manageVolumeSlider, MarshalStatus(), Next(), VLCWizard::nextTab:, Playlist::OnActivateItem(), Playlist::OnColSelect(), Playlist::OnDisableSelection(), Playlist::OnDown(), Playlist::OnEnableSelection(), Playlist::OnLoop(), Interface::OnNextStream(), ItemInfoDialog::OnOk(), OpenDialog::OnOk(), OnOpenCB(), Interface::OnPlayStream(), Playlist::OnPopupEna(), Playlist::OnPopupPlay(), Interface::OnPrevStream(), Playlist::OnRandom(), Playlist::OnRepeat(), OnSaveCB(), Playlist::OnSort(), Interface::OnStopStream(), Playlist::OnUp(), VLCExtended::opaqueSliderAction:, Open(), Pause(), Play(), VLCControls::play:, PlayBookmark(), VLCPlaylist::playingItem, VLCPlaylist::playItem:, PlaylistChanged(), PlaylistGetRoot(), PlaylistRebuild(), VLCPlaylist::playlistUpdated, VLCPlaylist::playModeUpdated, PlayPause(), VLCPlaylist::playSidebarItem:, PopupMenu(), PositionGet(), PositionSet(), VLCPlaylist::preparseItem:, Prev(), Playlist::ProcessCustomDraw(), PutAction(), VLCControls::quitAfterPlayback:, VLCControls::random:, ReadMetaData(), Playlist::Rebuild(), Redraw(), Repeat(), VLCControls::repeat:, VLCControls::repeatButtonAction:, InputManager::requestArtUpdate(), VLCMain::resetScrollField, Run(), RunIntf(), MetaPanel::saveMeta(), VLCInfo::saveMetaData:, VLCPlaylist::savePlaylist:, VLCExtended::savePrefs, VLCPlaylist::searchItem:, VLCPlaylist::servicesChange:, SetBookmark(), SetLoop(), SetRandom(), VLCMain::setupMenus, Playlist::ShowInfos(), VLCControls::shuffle, VLCPlaylist::sortNode:, StateChange(), Stop(), Timer::Timer(), VLCMain::timesliderUpdate:, TrackChange(), TrackListChangeEmit(), TrackListChangeSignal(), UpdateCaps(), Playlist::UpdateItem(), VLCInfo::updatePanelWithItem:, Playlist::UpdatePlaylist(), VLCPlaylist::updateRowSelection, SoundWidget::updateVolume(), Interface::VolumeChange(), VolumeGet(), VolumeSet(), VLCControls::volumeSliderUpdated:, Interface::VolumeUpdate(), vout_SendEventClose(), WallpaperCallback(), VLCControls::windowAction:, Playlist::WndProc(), and Timer::~Timer().

#define PL_UNLOCK   playlist_Unlock( p_playlist )

Referenced by PLModel::activateItem(), VLCPlaylist::addNode:, VLCPlaylist::appendArray:atPos:enqueue:, VLCPlaylist::appendNodeArray:inNode:atPos:enqueue:, VLCPlaylist::deleteItem:, DelTrack(), PLModel::dropMimeData(), Eject(), CmdPlaytreeSort::execute(), FindIndex(), PLModel::flags(), GetCurrentMetadata(), GetMetadata(), HandleKey(), input_item_subitem_added(), InputEvent(), LoopInput(), LoopRequest(), VLCMain::manageIntf:, VLCWizard::nextTab:, Playlist::OnDisableSelection(), Playlist::OnEnableSelection(), Playlist::OnPopupEna(), Open(), pl_unlock_if(), VLCControls::play:, PlayBookmark(), VLCPlaylist::playingItem, PlayItem(), VLCPlaylist::playItem:, Playlist(), playlist_Create(), playlist_CurrentInput(), playlist_Deactivate(), playlist_IsServicesDiscoveryLoaded(), playlist_MLLoad(), playlist_sd_item_added(), playlist_ServicesDiscoveryAdd(), playlist_ServicesDiscoveryRemove(), PlaylistRebuild(), VLCPlaylist::playlistUpdated, PlaylistWidget::PlaylistWidget(), PLModel::popup(), Playlist::ProcessCustomDraw(), RandomCallback(), PLModel::rebuild(), Playlist::Rebuild(), Redraw(), VLCMain::resetScrollField, Run(), PLModel::search(), PLModel::selectedURIs(), Playlist::ShowInfos(), PLModel::sort(), VLCPlaylist::sortNode:, StateChanged(), TrackListChangeEmit(), UpdateCaps(), Playlist::UpdateItem(), Playlist::UpdatePlaylist(), VLCPlaylist::updateRowSelection, vlclua_playlist_get(), vlclua_playlist_goto(), vlclua_playlist_play(), vlclua_playlist_search(), vlclua_playlist_sort(), and vlclua_playlist_status().

#define PLAYLIST_APPEND   0x0002

#define PLAYLIST_DBL_FLAG   0x0004

#define PLAYLIST_END   -666

#define PLAYLIST_EXPANDED_FLAG   0x0020

Expanded node.

#define PLAYLIST_GO   0x0004

#define PLAYLIST_INSERT   0x0001

#define playlist_Next (  )     playlist_Control(p,PLAYLIST_SKIP, pl_Unlocked, 1)

#define PLAYLIST_NO_REBUILD   0x0020

Referenced by AddItem(), and playlist_NodeCreate().

#define playlist_Pause (  )     playlist_Control(p,PLAYLIST_PAUSE, pl_Unlocked )

#define playlist_Play (  )     playlist_Control(p,PLAYLIST_PLAY, pl_Unlocked )

#define PLAYLIST_PREPARSE   0x0008

#define playlist_Prev (  )     playlist_Control(p,PLAYLIST_SKIP, pl_Unlocked, -1)

#define PLAYLIST_REMOVE_FLAG   0x0010

Remove this item at the end.

Referenced by DemuxOpen(), set_current_status_item(), and set_current_status_node().

#define PLAYLIST_RO_FLAG   0x0008

#define PLAYLIST_SAVE_FLAG   0x0001

Must it be saved.

Referenced by DoChildren(), and playlist_sd_item_added().

#define playlist_Skip ( p,
 )     playlist_Control(p,PLAYLIST_SKIP, pl_Unlocked, (i) )

#define PLAYLIST_SKIP_FLAG   0x0002

Must playlist skip after it ?

Referenced by NextItem(), playlist_NodesPairCreate(), and playlist_sd_item_added().

#define PLAYLIST_SPREPARSE   0x0010

#define playlist_Stop (  )     playlist_Control(p,PLAYLIST_STOP, pl_Unlocked )

#define VLC_DEFINE_SORT_FUNCTIONS


Typedef Documentation


Enumeration Type Documentation

anonymous enum

Enumerator:
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 

anonymous enum

Enumerator:
ORDER_NORMAL 
ORDER_REVERSE 

Enumerator:
pl_Locked 
pl_Unlocked 

Playlist status.

Enumerator:
PLAYLIST_STOPPED 
PLAYLIST_RUNNING 
PLAYLIST_PAUSED 


Function Documentation

static input_thread_t* __pl_CurrentInput ( vlc_object_t p_this  )  [inline, static]

playlist_t* __pl_Hold ( vlc_object_t  ) 

void __pl_Release ( vlc_object_t  ) 

playlist_item_t* get_current_status_item ( playlist_t p_playlist  ) 

playlist_item_t* get_current_status_node ( playlist_t p_playlist  ) 

References PL_ASSERT_LOCKED, and pl_priv.

Referenced by ItemToNode(), NextItem(), and PlaylistVAControl().

void playlist_Activate ( playlist_t p_playlist  ) 

Create the main playlist threads.

Additionally to the playlist, this thread controls :

  • Statistics
  • VLM
    Parameters:
    p_parent 
    Returns:
    an object with a started thread

References msg_Dbg, msg_Err, playlist_private_t::p_fetcher, playlist_private_t::p_preparser, p_sys, pl_priv, playlist_fetcher_New(), playlist_preparser_New(), Thread(), playlist_private_t::thread, vlc_clone(), and VLC_THREAD_PRIORITY_LOW.

Referenced by libvlc_InternalInit().

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

Parameters:
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
Returns:
VLC_SUCCESS or a VLC error code

References playlist_AddExt().

Referenced by AddTrack(), MainInterface::dropEventPlay(), CmdAddItem::execute(), HandleKey(), InterfaceWindow::MessageReceived(), DialogsProvider::openUrlDialog(), and DialogsProvider::playMRL().

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.

Parameters:
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
Returns:
VLC_SUCCESS or a VLC error code

References input_item_NewExt, playlist_AddInput(), VLC_ENOMEM, and vlc_gc_decref.

Referenced by GetFilenames(), 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.

Parameters:
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
Returns:
VLC_SUCCESS or VLC_ENOMEM or VLC_EGENERIC

References AddItem(), playlist_t::b_die, GoAndPreparse(), playlist_t::p_local_category, playlist_t::p_local_onelevel, playlist_t::p_ml_category, playlist_t::p_ml_onelevel, 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, and VLC_SUCCESS.

Referenced by __vlclua_playlist_add_internal(), VLCPlaylist::appendArray:atPos:enqueue:, EvaluateRPN(), input_item_subitem_added(), MacroDo(), VLCWizard::nextTab:, open_address_cb(), open_cb(), open_webcam_cb(), openDirectory(), pl_row_activated_cb(), Playlist(), playlist_AddExt(), playlist_Import(), and DialogsProvider::streamingDialog().

int playlist_AskForArtEnqueue ( playlist_t ,
input_item_t ,
bool  b_locked 
)

void playlist_AssertLocked ( playlist_t  ) 

References lock, pl_priv, and vlc_assert_locked.

int playlist_BothAddInput ( playlist_t p_playlist,
input_item_t p_input,
playlist_item_t p_direct_parent,
int  i_mode,
int  i_pos,
int *  i_cat,
int *  i_one,
bool  b_locked 
)

Add input.

Add an input item to p_direct_parent in the category tree, and to the matching top category in onelevel

Parameters:
p_playlist the playlist to add into
p_input the input item to add
p_direct_parent the parent item to add into
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_cat id of the items category
i_one id of the item onelevel category
b_locked TRUE if the playlist is locked
Returns:
VLC_SUCCESS if success, VLC_EGENERIC if fail, VLC_ENOMEM if OOM

 

Todo:
make a faster case for ml import

References AddItem(), GoAndPreparse(), playlist_item_t::i_children, playlist_item_t::i_id, playlist_item_t::p_input, playlist_item_t::p_parent, playlist_t::p_root_category, playlist_t::p_root_onelevel, PL_LOCK_IF, PL_UNLOCK_IF, playlist_ItemNewFromInput(), playlist_item_t::pp_children, VLC_EGENERIC, VLC_ENOMEM, vlc_object_alive, and VLC_SUCCESS.

Referenced by VLCPlaylist::appendNodeArray:inNode:atPos:enqueue:, and input_item_subitem_added().

playlist_item_t* playlist_ChildSearchName ( playlist_item_t p_node,
const char *  psz_search 
)

Search a child of a node by its name.

Parameters:
p_node the node
psz_search the name of the child to search
Returns:
the child item or NULL if not found or error

References i, 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.

Parameters:
b_locked TRUE if playlist is locked when entering this function
p_playlist playlist object
b_locked TRUE if the playlist is locked
Returns:
nothing

References playlist_t::p_local_category, playlist_t::p_local_onelevel, PL_LOCK_IF, PL_UNLOCK_IF, and playlist_NodeEmpty().

Referenced by EvaluateRPN(), MacroDo(), InterfaceWindow::MessageReceived(), Playlist(), and vlclua_playlist_clear().

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

Parameters:
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
Returns:
VLC_SUCCESS or an error

References PL_LOCK_IF, PL_UNLOCK_IF, and PlaylistVAControl().

Referenced by Playtree::action(), PLModel::activateItem(), VLCPlaylist::appendArray:atPos:enqueue:, VLCPlaylist::appendNodeArray:inNode:atPos:enqueue:, DeleteInner(), VLCPlaylist::deleteItem:, EvaluateRPN(), CmdPlaylistFirst::execute(), HandleKey(), input_item_subitem_added(), libvlc_playlist_play(), MacroDo(), VLCWizard::nextTab:, PlayBookmark(), VLCPlaylist::playItem:, Playlist(), VLCPlaylist::playSidebarItem:, and vlclua_playlist_goto().

playlist_t* playlist_Create ( vlc_object_t p_parent  ) 

input_thread_t* playlist_CurrentInput ( playlist_t p_playlist  ) 

playlist_item_t* playlist_CurrentPlayingItem ( playlist_t  ) 

static int playlist_CurrentSize ( playlist_t p_playlist  )  [inline, static]

Tell the number of items in the current playing context.

Referenced by VLCMain::manageIntf:, Playlist::OnDown(), Playlist::OnUp(), VLCPlaylist::playlistUpdated, and Playlist::UpdatePlaylist().

void playlist_Deactivate ( playlist_t  ) 

int playlist_DeleteFromInput ( playlist_t p_playlist,
input_item_t p_input,
bool  b_locked 
)

Delete from input.

Remove an input item from ONELEVEL and CATEGORY

Parameters:
p_playlist playlist object
p_input the input to delete
b_locked TRUE if the playlist is locked
Returns:
VLC_SUCCESS or VLC_ENOITEM

< Item not found

References DeleteFromInput(), playlist_t::p_root_category, playlist_t::p_root_onelevel, PL_LOCK_IF, PL_UNLOCK_IF, VLC_ENOITEM, and VLC_SUCCESS.

Referenced by Playlist::DeleteItem(), VLCPlaylist::deleteItem:, Playtree::delSelected(), DelTrack(), EvaluateRPN(), HandleKey(), and MacroDo().

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

Parameters:
p_playlist playlist object
p_input the input to delete
p_root root playlist item
b_locked TRUE if the playlist is locked
Returns:
VLC_SUCCESS or VLC_EGENERIC

References DeleteFromInput(), PL_LOCK_IF, and PL_UNLOCK_IF.

Referenced by playlist_sd_item_removed().

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

Parameters:
p_playlist playlist object
i_id id of the item do delete
Returns:
VLC_SUCCESS or an error

References DeleteInner(), p_item, PL_ASSERT_LOCKED, playlist_ItemGetById(), and VLC_EGENERIC.

Referenced by playlist_NodeDelete(), and playlist_NodeEmpty().

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.

Parameters:
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, ..)
Returns:
VLC_SUCCESS on success

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, utf8_fopen(), vlc_custom_create, VLC_EGENERIC, VLC_ENOMEM, vlc_object_attach, VLC_OBJECT_GENERIC, vlc_object_release, and VLC_SUCCESS.

Referenced by CmdPlaylistSave::execute(), OnSaveCB(), playlist_MLDump(), DialogsProvider::saveAPlaylist(), and VLCPlaylist::savePlaylist:.

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.

Parameters:
p_playlist the playlist
p_root the root node
p_item the previous item (NULL if none )
Returns:
the next item to play, or NULL if none found

< Is it disabled ?

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(), Playlist::Rebuild(), and ResetCurrentlyPlaying().

playlist_item_t* playlist_GetPreferredNode ( playlist_t p_playlist,
playlist_item_t p_node 
)

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.

Parameters:
p_playlist the playlist
p_root the root node
p_item the previous item (NULL if none )
Returns:
the next item to play, or NULL if none found

< Is it disabled ?

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 
)

static bool playlist_IsEmpty ( playlist_t p_playlist  )  [inline, static]

bool playlist_IsServicesDiscoveryLoaded ( playlist_t ,
const char *   
)

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.

Parameters:
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
Returns:
the first found item, or NULL if not found

References i, playlist_item_t::i_children, playlist_item_t::p_input, playlist_ItemFindFromInputAndRoot(), and playlist_item_t::pp_children.

Referenced by input_item_subitem_added(), ItemToNode(), playlist_ItemFindFromInputAndRoot(), and playlist_sd_item_removed().

playlist_item_t* playlist_ItemGetById ( playlist_t p_playlist,
int  i_id 
)

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.

Parameters:
p_playlist,: the playlist
p_item,: the input_item_t to find
Returns:
the item, or NULL on failure

Todo:
Check if this is always incremental and whether we can bsearch

References playlist_t::all_items, ARRAY_VAL, get_current_status_item(), i, playlist_item_array_t::i_size, and PL_ASSERT_LOCKED.

Referenced by VLCPlaylist::appendArray:atPos:enqueue:, VLCPlaylist::appendNodeArray:inNode:atPos:enqueue:, EvaluateRPN(), and VLCWizard::nextTab:.

playlist_item_t* playlist_ItemNewFromInput ( playlist_t p_playlist,
input_item_t p_input 
)

int playlist_ItemRelease ( playlist_item_t p_item  ) 

Release an item.

Parameters:
p_item item to delete
Returns:
VLC_SUCCESS

References ARRAY_APPEND, playlist_item_t::p_playlist, PL_ASSERT_LOCKED, pl_priv, uninstall_input_item_observer(), and VLC_SUCCESS.

Referenced by DeleteInner(), and playlist_NodeDelete().

int playlist_LiveSearchUpdate ( playlist_t p_playlist,
playlist_item_t p_root,
const char *  psz_string 
)

Launch the recursive search in the playlist.

Parameters:
p_playlist,: the playlist
p_root,: the current root item
psz_string,: the string to find
Returns:
VLC_SUCCESS

References PL_ASSERT_LOCKED, pl_priv, playlist_LiveSearchClean(), playlist_LiveSearchUpdateInternal(), vlc_cond_signal(), and VLC_SUCCESS.

Referenced by PLModel::search(), and vlclua_playlist_search().

void playlist_Lock ( playlist_t  ) 

int playlist_MLDump ( playlist_t p_playlist  ) 

int playlist_MLLoad ( playlist_t p_playlist  ) 

playlist_item_t* playlist_NodeAddInput ( playlist_t p_playlist,
input_item_t p_input,
playlist_item_t p_parent,
int  i_mode,
int  i_pos,
bool  b_locked 
)

Add an input item to a given node.

Parameters:
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
Returns:
the new playlist item

References AddItem(), playlist_t::b_die, playlist_item_t::i_children, p_item, PL_LOCK_IF, PL_UNLOCK_IF, and playlist_ItemNewFromInput().

Referenced by playlist_sd_item_added().

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.

Parameters:
p_playlist the playlist
p_item the item to append
p_parent the parent node
Returns:
VLC_SUCCESS or an error

References playlist_NodeInsert().

Referenced by AddItem(), and playlist_NodeCreate().

playlist_item_t* playlist_NodeCreate ( playlist_t p_playlist,
const char *  psz_name,
playlist_item_t p_parent,
int  i_flags,
input_item_t p_input 
)

Create a playlist node.

Parameters:
p_playlist the playlist
psz_name the name of the node
p_parent the parent node to attach to or NULL if no attach
p_flags miscellaneous flags
p_input the input_item to attach to or NULL if it has to be created
Returns:
the new node

References _, playlist_t::all_items, ARRAY_APPEND, playlist_item_t::i_children, playlist_item_t::i_id, input_item_NewWithType(), ITEM_TYPE_NODE, p_item, PL_ASSERT_LOCKED, playlist_ItemNewFromInput(), PLAYLIST_NO_REBUILD, playlist_NodeAppend(), playlist_SendAddNotify(), vlc_gc_decref, and VLC_OBJECT.

Referenced by VLCPlaylist::addNode:, playlist_Create(), playlist_NodesPairCreate(), and playlist_sd_item_added().

int playlist_NodeDelete ( playlist_t p_playlist,
playlist_item_t p_root,
bool  b_delete_items,
bool  b_force 
)

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

Parameters:
p_playlist the playlist
p_root the node
b_delete_items do we have to delete the children items ?
Returns:
VLC_SUCCESS or an error

References i, 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().

int playlist_NodeInsert ( playlist_t ,
playlist_item_t ,
playlist_item_t ,
int   
)

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.

Parameters:
p_playlist the playlist
p_item the item to remove
p_parent the parent node
Returns:
VLC_SUCCESS or an error

References i, playlist_item_t::i_children, PL_ASSERT_LOCKED, playlist_item_t::pp_children, REMOVE_ELEM, and VLC_SUCCESS.

Referenced by DeleteInner(), and playlist_NodeDelete().

void playlist_NodesPairCreate ( playlist_t p_playlist,
const char *  psz_name,
playlist_item_t **  pp_node_cat,
playlist_item_t **  pp_node_one,
bool  b_for_sd 
)

Create a pair of nodes in the category and onelevel trees.

They share the same input item.

Parameters:
p_playlist the playlist
psz_name the name of the nodes
pp_node_cat pointer to return the node in category tree
pp_node_one pointer to return the node in onelevel tree
b_for_sd For Services Discovery ? (make node read-only and unskipping)

< Write-enabled ?

< Must playlist skip after it ?

< Write-enabled ?

< Must playlist skip after it ?

References playlist_item_t::p_input, playlist_t::p_root_category, playlist_t::p_root_onelevel, PL_ASSERT_LOCKED, playlist_NodeCreate(), PLAYLIST_RO_FLAG, and PLAYLIST_SKIP_FLAG.

Referenced by playlist_Create(), and playlist_ServicesDiscoveryAdd().

int playlist_PreparseEnqueue ( playlist_t p_playlist,
input_item_t p_item,
bool  b_locked 
)

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 !

Parameters:
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)
Returns:
VLC_SUCCESS on success

References find_sorting_fn(), pl_priv, and recursiveNodeSort().

Referenced by CmdPlaytreeSort::execute(), HandleKey(), MacroDo(), Playlist::OnColSelect(), Playlist::OnSort(), Playlist(), PLModel::sort(), VLCPlaylist::sortNode:, and vlclua_playlist_sort().

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.

Parameters:
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
Returns:
nothing

References playlist_private_t::b_reset_currently_playing, vlc_value_t::p_address, p_sys, PL_ASSERT_LOCKED, pl_priv, playlist_private_t::signal, var_Set, and vlc_cond_signal().

Referenced by AddItem(), and playlist_NodeCreate().

int playlist_ServicesDiscoveryAdd ( playlist_t ,
const char *   
)

int playlist_ServicesDiscoveryRemove ( playlist_t ,
const char *   
)

int playlist_Status ( playlist_t  ) 

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

Parameters:
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
Returns:
VLC_SUCCESS or an 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

Parameters:
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
Returns:
VLC_SUCCESS or an error

References i, playlist_item_t::i_children, INSERT_ELEM, ItemIndex(), p_item, 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  ) 

void set_current_status_item ( playlist_t ,
playlist_item_t  
)

< Remove this item at the end

References PL_ASSERT_LOCKED, pl_priv, and PLAYLIST_REMOVE_FLAG.

Referenced by DeleteInner(), ItemToNode(), PlayItem(), and playlist_Deactivate().

void set_current_status_node ( playlist_t ,
playlist_item_t  
)

< Remove this item at the end

References PL_ASSERT_LOCKED, pl_priv, and PLAYLIST_REMOVE_FLAG.

Referenced by NextItem(), and playlist_Deactivate().


Generated on Sun Nov 22 08:06:01 2009 for VLC by  doxygen 1.5.6