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_t * | playlist_Create (vlc_object_t *) |
| Create playlist. | |
| void | playlist_Activate (playlist_t *) |
| Create the main playlist threads. | |
| void | playlist_Deactivate (playlist_t *) |
| 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. | |
| 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. | |
| 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_t * | playlist_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_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_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_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 *) |
| Launch the recursive search in the playlist. | |
| playlist_item_t * | playlist_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_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_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_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. | |
| 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. | |
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 *
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) *
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 DEF | ( | s | ) | s, |
| #define PL_ASSERT_LOCKED playlist_AssertLocked( p_playlist ) |
Referenced by AddItem(), DeleteFromInput(), DeleteInner(), get_current_status_item(), get_current_status_node(), GoAndPreparse(), pl_lock_if(), PlayItem(), playlist_ChildSearchName(), playlist_CurrentPlayingItem(), playlist_DeleteFromItemId(), playlist_GetNextLeaf(), playlist_GetPreferredNode(), playlist_GetPrevLeaf(), playlist_IsEmpty(), playlist_ItemGetById(), playlist_ItemGetByInput(), playlist_ItemRelease(), playlist_LiveSearchUpdate(), playlist_NodeCreate(), playlist_NodeDelete(), playlist_NodeEmpty(), playlist_NodeInsert(), playlist_NodeRemoveItem(), playlist_NodesPairCreate(), playlist_SendAddNotify(), playlist_Status(), playlist_TreeMove(), playlist_TreeMoveMany(), PlaylistVAControl(), ResyncCurrentIndex(), set_current_status_item(), set_current_status_node(), and UpdateActivity().
| #define pl_CurrentInput | ( | a | ) | __pl_CurrentInput( VLC_OBJECT(a) ) |
Small helper tp get current playing input or NULL.
Release the input after use.
Referenced by VLCBookmarks::add:, VLCControls::addSubtitleFile:, VLCBookmarks::clear:, VLCBookmarks::edit:, VLCBookmarks::edit_ok:, VLCBookmarks::extract:, getInput(), VLCBookmarks::goToBookmark:, VLCControls::goToSpecificTime:, VLCControls::keyEvent:, VLCMain::manageIntf:, VLCBookmarks::remove:, VLCControls::showPosition:, and VLCControls::windowAction:.
| #define pl_Hold | ( | a | ) | __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)) |
Referenced by AddItem(), DeleteInner(), get_current_status_item(), get_current_status_node(), GoAndPreparse(), InputEvent(), ItemToNode(), LoopInput(), LoopRequest(), NextItem(), PlayItem(), playlist_Activate(), playlist_AddInput(), playlist_AskForArtEnqueue(), playlist_AssertLocked(), playlist_Create(), playlist_CurrentInput(), playlist_CurrentPlayingItem(), playlist_Deactivate(), playlist_Destructor(), playlist_GetPreferredNode(), playlist_IsServicesDiscoveryLoaded(), playlist_ItemNewFromInput(), playlist_ItemRelease(), playlist_LiveSearchUpdate(), playlist_Lock(), playlist_MLLoad(), playlist_PreparseEnqueue(), playlist_RecursiveNodeSort(), playlist_SendAddNotify(), playlist_ServicesDiscoveryAdd(), playlist_ServicesDiscoveryKillAll(), playlist_ServicesDiscoveryRemove(), playlist_Status(), playlist_TreeMove(), playlist_TreeMoveMany(), playlist_Unlock(), PlaylistVAControl(), RandomCallback(), ResetCurrentlyPlaying(), set_current_status_item(), set_current_status_node(), and Thread().
| #define pl_Release | ( | a | ) | __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 |
Referenced by __vlclua_playlist_add_internal(), AddTrack(), MainInterface::dropEventPlay(), EvaluateRPN(), CmdAddItem::execute(), HandleKey(), input_item_subitem_added(), MacroDo(), InterfaceWindow::MessageReceived(), open_address_cb(), open_cb(), open_webcam_cb(), openDirectory(), DialogsProvider::openUrlDialog(), pl_row_activated_cb(), Playlist(), playlist_Import(), playlist_sd_item_added(), DialogsProvider::playMRL(), DialogsProvider::streamingDialog(), and WMCOPYWNDPROC().
| #define PLAYLIST_DBL_FLAG 0x0004 |
Is it disabled ?
Referenced by Playlist::OnDisableSelection(), Playlist::OnEnableSelection(), ItemInfoDialog::OnOk(), Playlist::OnPopupEna(), playlist_GetNextLeaf(), playlist_GetPrevLeaf(), playlist_LiveSearchClean(), playlist_LiveSearchUpdateInternal(), Playlist::ProcessCustomDraw(), and ItemInfoDialog::WndProc().
| #define PLAYLIST_END -666 |
Referenced by __vlclua_playlist_add_internal(), AddItem(), AddTrack(), VLCPlaylist::appendArray:atPos:enqueue:, VLCPlaylist::appendNodeArray:inNode:atPos:enqueue:, MainInterface::dropEventPlay(), EvaluateRPN(), CmdAddItem::execute(), HandleKey(), input_item_subitem_added(), MacroDo(), InterfaceWindow::MessageReceived(), VLCWizard::nextTab:, open_address_cb(), open_cb(), open_webcam_cb(), openDirectory(), DialogsProvider::openUrlDialog(), pl_row_activated_cb(), Playlist(), playlist_Import(), playlist_sd_item_added(), DialogsProvider::playMRL(), DialogsProvider::streamingDialog(), and WMCOPYWNDPROC().
| #define PLAYLIST_EXPANDED_FLAG 0x0020 |
Expanded node.
| #define PLAYLIST_GO 0x0004 |
| #define PLAYLIST_INSERT 0x0001 |
| #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 CmdPause::execute(), Input(), Pause(), and vlclua_playlist_pause().
| #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_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 |
Write-enabled ?
Referenced by Playtree::onAppend(), playlist_Create(), playlist_NodeDelete(), playlist_NodesPairCreate(), and PlaylistListNode().
| #define PLAYLIST_SAVE_FLAG 0x0001 |
| #define playlist_Skip | ( | p, | |||
| i | ) | playlist_Control(p,PLAYLIST_SKIP, pl_Unlocked, (i) ) |
Referenced by Playlist::OnActivateItem(), Playlist::OnPopupPlay(), and vlclua_playlist_skip().
| #define PLAYLIST_SKIP_FLAG 0x0002 |
Must playlist skip after it ?
Referenced by NextItem(), playlist_NodesPairCreate(), and playlist_sd_item_added().
| #define PLAYLIST_SPREPARSE 0x0010 |
Referenced by GoAndPreparse(), and input_item_subitem_added().
| #define playlist_Stop | ( | p | ) | playlist_Control(p,PLAYLIST_STOP, pl_Unlocked ) |
Referenced by DirectXEventProc(), CmdStop::execute(), HandleKey(), ManageVideo(), InterfaceWindow::MessageReceived(), Interface::OnStopStream(), Playlist(), PutAction(), InterfaceWindow::QuitRequested(), MainInputManager::stop(), Stop(), stop_cb(), vlclua_playlist_clear(), vlclua_playlist_stop(), and vout_SendEventClose().
| #define VLC_DEFINE_SORT_FUNCTIONS |
Value:
DEF( SORT_ID )\ DEF( SORT_TITLE )\ DEF( SORT_TITLE_NODES_FIRST )\ DEF( SORT_ARTIST )\ DEF( SORT_GENRE )\ DEF( SORT_DURATION )\ DEF( SORT_TITLE_NUMERIC )\ DEF( SORT_ALBUM )\ DEF( SORT_TRACK_NUMBER )\ DEF( SORT_DESCRIPTION )\ DEF( SORT_RATING )\ DEF( SORT_URI )
Referenced by cmp_d_SORT_URI().
| typedef struct vlc_sd_internal_t vlc_sd_internal_t |
| anonymous enum |
| enum pl_locked_state |
| enum playlist_status_t |
| static input_thread_t* __pl_CurrentInput | ( | vlc_object_t * | p_this | ) | [inline, static] |
| playlist_t* __pl_Hold | ( | vlc_object_t * | ) |
References barrier(), libvlc_priv(), vlc_object_t::p_libvlc, libvlc_priv_t::p_playlist, VLC_OBJECT, and vlc_object_hold.
| void __pl_Release | ( | vlc_object_t * | ) |
References libvlc_priv(), vlc_object_t::p_libvlc, libvlc_priv_t::p_playlist, VLC_OBJECT, and vlc_object_release.
| 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 DeleteInner(), input_item_subitem_added(), ItemToNode(), NextItem(), playlist_ItemGetByInput(), PlaylistVAControl(), and Thread().
| 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 :
| p_parent |
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
| 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().
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.
| 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 |
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.
| 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 |
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 | |||
| ) |
Request the art for an input item to be fetched.
References playlist_private_t::p_fetcher, p_sys, PL_LOCK_IF, pl_priv, PL_UNLOCK_IF, playlist_fetcher_Push(), and VLC_SUCCESS.
Referenced by VLCInfo::downloadCoverArt:, VLCPlaylist::downloadCoverArt:, libvlc_media_get_meta(), PlayItem(), and InputManager::requestArtUpdate().
| 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
| 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 |
Â
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.
| p_node | the node | |
| psz_search | the name of the child to search |
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.
| 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_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
| 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 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 | ) |
Create playlist.
Create a playlist structure.
| p_parent | the vlc object that is to be the parent of this playlist |
< Write-enabled ?
< Write-enabled ?
< Write-enabled ?
< Write-enabled ?
References _, playlist_t::all_items, ARRAY_INIT, config_GetInt, playlist_t::current, playlist_t::i_current_index, playlist_item_t::i_flags, playlist_t::items, libvlc_priv(), playlist_private_t::lock, playlist_item_t::p_input, vlc_object_t::p_libvlc, playlist_t::p_local_category, playlist_t::p_local_onelevel, playlist_t::p_ml_category, playlist_t::p_ml_onelevel, libvlc_priv_t::p_playlist, playlist_t::p_root_category, playlist_t::p_root_onelevel, PL_LOCK, pl_priv, PL_UNLOCK, playlist_Destructor(), playlist_MLLoad(), playlist_NodeCreate(), playlist_NodesPairCreate(), PLAYLIST_RO_FLAG, PLAYLIST_STOPPED, playlist_private_t::public_data, playlist_private_t::signal, TAB_INIT, var_CreateGetBool, VariablesInit(), vlc_cond_init(), vlc_custom_create, vlc_mutex_init(), VLC_OBJECT_GENERIC, and vlc_object_set_destructor.
Referenced by libvlc_InternalInit().
| 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 __str_format_meta(), AudioConfig(), Close(), CmdUpdateItem::execute(), CmdFaster::execute(), CmdSlower::execute(), CmdDvdRootMenu::execute(), CmdDvdPreviousChapter::execute(), CmdDvdNextChapter::execute(), CmdDvdPreviousTitle::execute(), CmdDvdNextTitle::execute(), Input(), InputChange(), item_changed_pl(), ItemChange(), VLCMain::manage, VLCMain::manageIntf:, MarshalStatus(), Menu(), VlcProc::on_item_current_changed(), ParseExecute(), Play(), Playlist(), PositionGet(), PositionSet(), PutAction(), ReadMetaData(), Redraw(), VLCMain::resetScrollField, Run(), RunIntf(), EqualizerPreamp::set(), VLCMain::setupMenus, StateChange(), Statistics(), VLCMain::timesliderUpdate:, TrackChange(), UpdateCaps(), VideoConfig(), vlclua_get_input_internal(), vlclua_playlist_current(), vlclua_playlist_status(), Volume(), VolumeMove(), and WaitPreparsed().
| playlist_item_t* playlist_CurrentPlayingItem | ( | playlist_t * | ) |
References PL_ASSERT_LOCKED, and pl_priv.
Referenced by VLCPlaylist::deleteItem:, DemuxOpen(), Eject(), GetCurrentMetadata(), HandleKey(), VLCMain::manageIntf:, Playtree::onUpdateItem(), PlaylistChanged(), PlaylistIsPlaying(), PlaylistListNode(), PLModel::rebuild(), Redraw(), VLCMain::resetScrollField, Run(), SetBookmark(), and VLCPlaylist::updateRowSelection.
| 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 * | ) |
References input_resource_Delete(), msg_Dbg, playlist_private_t::p_fetcher, playlist_private_t::p_input, playlist_private_t::p_input_resource, playlist_private_t::p_preparser, p_sys, PL_LOCK, pl_priv, PL_UNLOCK, playlist_fetcher_Delete(), playlist_MLDump(), playlist_preparser_Delete(), set_current_status_item(), set_current_status_node(), playlist_private_t::signal, playlist_private_t::thread, vlc_cond_signal(), vlc_join(), and vlc_object_kill.
Referenced by libvlc_InternalCleanup().
| 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
| p_playlist | playlist object | |
| p_input | the input to delete | |
| b_locked | TRUE if the playlist is locked |
< 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
| 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.
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
| p_playlist | playlist object | |
| i_id | id of the item do delete |
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.
| 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, ..) |
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.
< 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 | |||
| ) |
Get the node in the preferred tree from a node in one of category or onelevel tree.
References input_item_t::b_prefers_tree, i, playlist_item_t::i_children, playlist_item_t::p_input, playlist_item_t::p_parent, playlist_t::p_root_category, playlist_t::p_root_onelevel, PL_ASSERT_LOCKED, pl_priv, and playlist_item_t::pp_children.
Referenced by PlaylistWidget::PlaylistWidget(), and StandardPLPanel::setRoot().
| 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.
< 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 | |||
| ) |
Open a playlist file, add its content to the current playlist.
References input_item_NewExt, input_Read, make_URI(), playlist_AddInput(), PLAYLIST_APPEND, PLAYLIST_END, psz_option, VLC_EGENERIC, and VLC_INPUT_OPTION_TRUSTED.
Referenced by CmdPlaylistLoad::execute(), OnOpenCB(), and DialogsProvider::openAPlaylist().
| static bool playlist_IsEmpty | ( | playlist_t * | p_playlist | ) | [inline, static] |
Tell if the playlist is empty.
References playlist_t::current, playlist_item_array_t::i_size, and PL_ASSERT_LOCKED.
Referenced by CmdPlay::execute(), Interface::OnPlayStream(), VLCControls::play:, VLCPlaylist::playlistUpdated, PlaylistVAControl(), PopupMenu(), Run(), and InterfaceWindow::UpdateInterface().
| bool playlist_IsServicesDiscoveryLoaded | ( | playlist_t * | , | |
| const char * | ||||
| ) |
Check whether a given SD is loaded.
References i, playlist_private_t::i_sds, PL_LOCK, pl_priv, PL_UNLOCK, playlist_private_t::pp_sds, and vlc_sd_internal_t::psz_name.
Referenced by PodcastConfigDialog::accept(), EvaluateRPN(), VLCPlaylist::servicesChange:, and vlclua_sd_is_loaded().
| 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 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 | |||
| ) |
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, i, and PL_ASSERT_LOCKED.
Referenced by PLModel::activateItem(), ArtCallback(), PLModel::dropMimeData(), EvaluateRPN(), PLModel::flags(), MacroDo(), Playtree::onAppend(), Playlist::OnDisableSelection(), Playlist::OnEnableSelection(), Playlist::OnPopupEna(), playlist_DeleteFromItemId(), PLModel::popup(), Playlist::ProcessCustomDraw(), PLModel::search(), PLModel::selectedURIs(), Playlist::ShowInfos(), PLModel::sort(), TrackListChangeEmit(), Playlist::UpdateItem(), vlclua_playlist_get(), and vlclua_playlist_goto().
| 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(), 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 | |||
| ) |
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, p_item, 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_BothAddInput(), playlist_NodeAddInput(), and playlist_NodeCreate().
| int playlist_ItemRelease | ( | playlist_item_t * | p_item | ) |
Release an item.
| p_item | item to delete |
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.
| p_playlist,: | the playlist | |
| p_root,: | the current root item | |
| psz_string,: | the string to find |
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 * | ) |
References lock, pl_priv, and vlc_mutex_lock().
Referenced by Playtree::action(), ArtCallback(), Playtree::delSelected(), EvaluateRPN(), CmdPlay::execute(), mvar_PlaylistSetNew(), Playtree::onAppend(), Playtree::onUpdateItem(), playlist_Export(), playlist_sd_item_removed(), and Thread().
| int playlist_MLDump | ( | playlist_t * | p_playlist | ) |
References config_CreateDir(), config_GetInt, config_GetUserDir(), DIR_SEP, msg_Err, playlist_Export(), STATS_TIMER_ML_DUMP, stats_TimerStart, stats_TimerStop, VLC_DATA_DIR, VLC_EGENERIC, and VLC_SUCCESS.
Referenced by playlist_Deactivate().
| int playlist_MLLoad | ( | playlist_t * | p_playlist | ) |
References _, asprintf(), config_GetInt, config_GetUserDir(), DIR_SEP, input_item_t::event_manager, input_item_NewExt, input_item_subitem_added(), input_Read, make_URI(), msg_Err, playlist_item_t::p_input, playlist_t::p_ml_category, playlist_t::p_ml_onelevel, PL_LOCK, pl_priv, PL_UNLOCK, STATS_TIMER_ML_LOAD, stats_TimerStart, stats_TimerStop, utf8_stat(), VLC_DATA_DIR, VLC_EGENERIC, VLC_ENOMEM, vlc_event_attach, vlc_event_detach(), vlc_gc_decref, vlc_gc_incref, VLC_INPUT_OPTION_TRUSTED, vlc_InputItemSubItemAdded, and VLC_SUCCESS.
Referenced by playlist_Create().
| 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.
| 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(), 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.
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.
| 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 |
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 | |||
| ) |
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 ? |
< Write-enabled ?
References playlist_t::all_items, ARRAY_BSEARCH, ARRAY_REMOVE, i, playlist_item_t::i_children, playlist_item_t::i_flags, playlist_item_t::i_id, playlist_item_t::p_parent, PL_ASSERT_LOCKED, playlist_DeleteFromItemId(), playlist_ItemRelease(), playlist_NodeDelete(), playlist_NodeRemoveItem(), PLAYLIST_RO_FLAG, playlist_item_t::pp_children, var_SetInteger, VLC_EGENERIC, and VLC_SUCCESS.
Referenced by DeleteInner(), VLCPlaylist::deleteItem:, Playtree::delSelected(), HandleKey(), 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 ? |
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 | ||||
| ) |
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(), and playlist_NodeAppend().
| 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.
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.
| 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 | |||
| ) |
Enqueue an input item for preparsing.
References playlist_private_t::p_preparser, p_sys, PL_LOCK_IF, pl_priv, PL_UNLOCK_IF, playlist_preparser_Push(), and VLC_SUCCESS.
Referenced by GoAndPreparse(), preparse_if_needed(), VLCPlaylist::preparseItem:, and VLCInfo::updatePanelWithItem:.
| 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().
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.
| 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, 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 * | ||||
| ) |
Add a list of comma-separated service discovery modules.
References input_item_t::b_prefers_tree, module_find_by_shortcut(), module_get_name(), module_release(), msg_Dbg, msg_Err, vlc_sd_internal_t::p_cat, playlist_item_t::p_input, vlc_sd_internal_t::p_one, vlc_sd_internal_t::p_sd, PL_LOCK, pl_priv, PL_UNLOCK, playlist_NodesPairCreate(), playlist_sd_item_added(), playlist_sd_item_removed(), vlc_sd_internal_t::psz_name, 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_ServicesDiscoveryItemRemoved, and VLC_SUCCESS.
Referenced by EvaluateRPN(), libvlc_InternalInit(), VLCPlaylist::servicesChange:, and vlclua_sd_add().
| int playlist_ServicesDiscoveryRemove | ( | playlist_t * | , | |
| const char * | ||||
| ) |
Remove a services discovery module by name.
References i, playlist_private_t::i_sds, msg_Warn, vlc_sd_internal_t::p_cat, vlc_sd_internal_t::p_one, playlist_t::p_root_category, playlist_t::p_root_onelevel, 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 EvaluateRPN(), playlist_ServicesDiscoveryKillAll(), VLCPlaylist::servicesChange:, and vlclua_sd_remove().
| int playlist_Status | ( | playlist_t * | ) |
References PL_ASSERT_LOCKED, and pl_priv.
Referenced by VLCPlaylist::deleteItem:, Playlist(), Run(), StateChanged(), and vlclua_playlist_status().
| 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 |
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 |
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 * | ) |
References lock, pl_priv, and vlc_mutex_unlock().
Referenced by Playtree::action(), ArtCallback(), Playtree::delSelected(), EvaluateRPN(), CmdPlay::execute(), mvar_PlaylistSetNew(), Playtree::onAppend(), Playtree::onUpdateItem(), playlist_Export(), playlist_sd_item_removed(), and Thread().
| 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().
1.5.6