VLC
3.0.15
|
Modules | |
Playlist_NodeDeleteExplicit_flags | |
Flags for playlist_NodeDeleteExplicit. | |
Files | |
file | playlist_internal.h |
Data Structures | |
struct | playlist_private_t |
Macros | |
#define | pl_priv(pl) container_of(pl, playlist_private_t, public_data) |
#define | PLAYLIST_DEBUG 1 |
#define | PL_DEBUG(...) msg_Dbg( p_playlist, __VA_ARGS__ ) |
#define | PL_DEBUG2(msg, ...) {} |
#define | PLI_NAME(p) p && p->p_input ? p->p_input->psz_name : "null" |
#define | PL_LOCK_IF(cond) pl_lock_if( p_playlist, cond ) |
#define | PL_UNLOCK_IF(cond) pl_unlock_if( p_playlist, cond ) |
Typedefs | |
typedef struct vlc_sd_internal_t | vlc_sd_internal_t |
typedef struct playlist_private_t | playlist_private_t |
#define PL_DEBUG | ( | ... | ) | msg_Dbg( p_playlist, __VA_ARGS__ ) |
#define PL_DEBUG2 | ( | msg, | |
... | |||
) | {} |
#define PL_LOCK_IF | ( | cond | ) | pl_lock_if( p_playlist, cond ) |
#define pl_priv | ( | pl | ) | container_of(pl, playlist_private_t, public_data) |
#define PL_UNLOCK_IF | ( | cond | ) | pl_unlock_if( p_playlist, cond ) |
#define PLAYLIST_DEBUG 1 |
typedef struct playlist_private_t playlist_private_t |
typedef struct vlc_sd_internal_t vlc_sd_internal_t |
playlist_item_t* get_current_status_item | ( | playlist_t * | p_playlist | ) |
Accessor for status item and status nodes.
References PL_ASSERT_LOCKED, and pl_priv.
Referenced by input_item_add_subitem_tree(), and NextItem().
playlist_item_t* get_current_status_node | ( | playlist_t * | p_playlist | ) |
Referenced by NextItem().
|
inlinestatic |
References PL_ASSERT_LOCKED, and PL_LOCK.
|
inlinestatic |
References PL_UNLOCK.
void playlist_Activate | ( | playlist_t * | ) |
Creates the main playlist thread.
References msg_Err, pl_priv, playlist_private_t::thread, Thread(), vlc_clone(), and VLC_THREAD_PRIORITY_LOW.
Referenced by playlist_Create().
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 |
References _, ARRAY_INIT, playlist_t::current, playlist_item_t::i_children, playlist_t::i_current_index, playlist_item_t::i_flags, playlist_item_t::i_id, playlist_item_t::i_nb_played, input_resource_GetAout(), input_resource_New(), input_resource_PutAout(), playlist_t::items, likely, p, vlc_value_t::p_address, playlist_item_t::p_input, playlist_t::p_media_library, playlist_t::p_playing, PL_LOCK, pl_priv, PL_UNLOCK, playlist_Activate(), PLAYLIST_END, playlist_MLLoad(), PLAYLIST_NO_INHERIT_FLAG, playlist_NodeCreate(), PLAYLIST_RO_FLAG, playlist_ServicesDiscoveryAdd(), playlist_item_t::pp_children, playlist_t::root, strsep(), TAB_INIT, unlikely, var_Create, var_InheritBool, var_InheritString, var_SetChecked, VariablesInit(), vlc_cond_init(), vlc_custom_create, vlc_http_cookies_new(), vlc_mutex_init(), VLC_OBJECT, and VLC_VAR_ADDRESS.
Referenced by intf_GetPlaylist().
void playlist_Destroy | ( | playlist_t * | p_playlist | ) |
Destroy playlist.
This is not thread-safe. Any reference to the playlist is assumed gone. (In particular, all interface and services threads must have been joined).
p_playlist | the playlist object |
< delete node even if read-only
< delete node even if read-only
References ARRAY_RESET, playlist_t::current, playlist_item_t::i_children, input_resource_Release(), playlist_t::items, playlist_private_t::lock, msg_Dbg, playlist_private_t::p_input, playlist_private_t::p_input_resource, playlist_t::p_media_library, playlist_t::p_playing, playlist_private_t::p_renderer, PL_LOCK, pl_priv, PL_UNLOCK, playlist_Deactivate(), PLAYLIST_DELETE_FORCE, playlist_MLDump(), playlist_NodeDeleteExplicit(), playlist_ServicesDiscoveryKillAll(), playlist_t::root, set_current_status_item(), set_current_status_node(), playlist_private_t::signal, var_Destroy, var_GetAddress, vlc_cond_destroy(), vlc_http_cookies_destroy(), vlc_mutex_destroy(), vlc_object_release, and vlc_renderer_item_release().
Referenced by intf_DestroyAll().
playlist_item_t* playlist_GetNextLeaf | ( | playlist_t * | p_playlist, |
playlist_item_t * | p_root, | ||
playlist_item_t * | p_item, | ||
bool | b_ena, | ||
bool | b_unplayed | ||
) |
Finds the next item to play.
p_playlist | the playlist |
p_root | the root node |
p_item | the previous item (NULL if none ) |
References GetNextItem(), playlist_item_t::i_children, playlist_item_t::i_flags, playlist_item_t::i_nb_played, PL_ASSERT_LOCKED, PL_DEBUG2, PLAYLIST_DBL_FLAG, and PLI_NAME.
Referenced by NextItem(), and ResetCurrentlyPlaying().
int playlist_InsertInputItemTree | ( | playlist_t * | p_playlist, |
playlist_item_t * | p_parent, | ||
input_item_node_t * | p_node, | ||
int | i_pos, | ||
bool | b_flat | ||
) |
Insert a tree of input items into a given playlist node.
p_playlist | the playlist to insert into |
p_parent | the receiving playlist node (can be an item) |
p_node | the root of input item tree, only it's contents will be inserted |
i_pos | the position in the playlist where to insert. If this is PLAYLIST_END the items will be added at the end of the playlist regardless of its size |
b_flat | TRUE if the new tree contents should be flattened into a list |
References rdh_slave::p_node, and RecursiveAddIntoParent().
Referenced by input_item_add_subitem_tree(), and input_item_subitem_tree_added().
playlist_item_t* playlist_ItemNewFromInput | ( | playlist_t * | p_playlist, |
input_item_t * | p_input | ||
) |
References input_item_t::event_manager, playlist_item_t::i_children, playlist_item_t::i_flags, playlist_item_t::i_id, playlist_item_t::i_nb_played, input_item_t::i_type, input_item_add_subitem_tree(), input_item_changed(), input_item_Hold(), ITEM_TYPE_NODE, p, playlist_item_t::p_input, playlist_item_t::p_parent, PL_ASSERT_LOCKED, pl_priv, playlist_ItemCmpId(), playlist_ItemCmpInput(), playlist_item_t::pp_children, tdelete(), tsearch(), unlikely, vlc_event_attach(), vlc_InputItemDurationChanged, vlc_InputItemErrorWhenReadingChanged, vlc_InputItemInfoChanged, vlc_InputItemMetaChanged, vlc_InputItemNameChanged, and vlc_InputItemSubItemTreeAdded.
Referenced by playlist_NodeAddInput(), and playlist_NodeCreate().
void playlist_ItemRelease | ( | playlist_t * | p_playlist, |
playlist_item_t * | p_item | ||
) |
Release an item.
p_item | item to delete |
References input_item_t::event_manager, input_item_add_subitem_tree(), input_item_changed(), input_item_Release(), p, playlist_item_t::p_input, PL_ASSERT_LOCKED, pl_priv, playlist_ItemCmpId(), playlist_ItemCmpInput(), playlist_item_t::pp_children, tdelete(), vlc_event_detach(), vlc_InputItemDurationChanged, vlc_InputItemErrorWhenReadingChanged, vlc_InputItemInfoChanged, vlc_InputItemMetaChanged, vlc_InputItemNameChanged, and vlc_InputItemSubItemTreeAdded.
int playlist_MLDump | ( | playlist_t * | p_playlist | ) |
< Unspecified error
< Unspecified error
< Unspecified error
< No error
< Unspecified error
< No error
Referenced by playlist_Destroy().
int playlist_MLLoad | ( | playlist_t * | p_playlist | ) |
< Unspecified error
< Not enough memory
< Unspecified error
< Not enough memory
< Unspecified error
< No error
Referenced by playlist_Create().
void playlist_NodeDeleteExplicit | ( | playlist_t * | , |
playlist_item_t * | , | ||
int | flags | ||
) |
Delete a node with explicit semantics.
This function acts like playlist_NodeDelete with the advantage of the caller being able control some of the semantics of the function.
p_playlist the playlist where the node is to be deleted p_node the node to delete flags a bitfield consisting of Playlist_NodeDeleteExplicit_flags
< delete node even if read-only
< delete node even if read-only
< stop playlist playback if node is currently the one played
Referenced by input_item_add_subitem_tree(), playlist_Destroy(), playlist_NodeDelete(), playlist_sd_item_removed(), and playlist_ServicesDiscoveryInternalRemoveLocked().
int playlist_NodeInsert | ( | playlist_item_t * | , |
playlist_item_t * | , | ||
int | |||
) |
< No error
Referenced by playlist_NodeAddInput(), and playlist_NodeCreate().
void playlist_SendAddNotify | ( | playlist_t * | p_playlist, |
playlist_item_t * | item | ||
) |
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 which the item was added |
References playlist_private_t::b_reset_currently_playing, PL_ASSERT_LOCKED, pl_priv, playlist_private_t::signal, and vlc_cond_signal().
Referenced by playlist_NodeAddInput(), and playlist_NodeCreate().
void playlist_ServicesDiscoveryKillAll | ( | playlist_t * | p_playlist | ) |
References playlist_private_t::i_sds, pl_priv, playlist_Lock(), playlist_ServicesDiscoveryInternalRemoveLocked(), playlist_Unlock(), playlist_private_t::pp_sds, and TAB_ERASE.
Referenced by playlist_Destroy().
void ResetCurrentlyPlaying | ( | playlist_t * | p_playlist, |
playlist_item_t * | p_cur | ||
) |
Reset the currently playing playlist.
p_playlist | the playlist structure |
p_cur | the current playlist item |
FIXME: this is slow
References ARRAY_APPEND, ARRAY_RESET, ARRAY_VAL, playlist_private_t::b_reset_currently_playing, playlist_t::current, playlist_t::i_current_index, playlist_item_array_t::i_size, playlist_private_t::p_node, PL_DEBUG, pl_priv, playlist_GetNextLeaf(), PLI_NAME, playlist_private_t::status, var_GetBool, and vlc_lrand48().
Referenced by input_item_add_subitem_tree(), and NextItem().
void ResyncCurrentIndex | ( | playlist_t * | p_playlist, |
playlist_item_t * | p_cur | ||
) |
Synchronise the current index of the playlist to match the index of the current item.
p_playlist | the playlist structure |
p_cur | the current playlist item |
References ARRAY_VAL, playlist_t::current, playlist_t::i_current_index, playlist_item_array_t::i_size, PL_ASSERT_LOCKED, PL_DEBUG, and PLI_NAME.
Referenced by NextItem().
void set_current_status_item | ( | playlist_t * | , |
playlist_item_t * | |||
) |
Referenced by PlayItem(), and playlist_Destroy().
void set_current_status_node | ( | playlist_t * | , |
playlist_item_t * | |||
) |
Referenced by NextItem(), and playlist_Destroy().