[vlc-commits] playlist: remove dead playlist_GetPrevLeaf()
Rémi Denis-Courmont
git at videolan.org
Tue Nov 15 22:19:40 CET 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Nov 15 23:12:18 2016 +0200| [b25cd30961fc8401c5b927464069d501a25b99fa] | committer: Rémi Denis-Courmont
playlist: remove dead playlist_GetPrevLeaf()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b25cd30961fc8401c5b927464069d501a25b99fa
---
include/vlc_playlist.h | 1 -
src/libvlccore.sym | 1 -
src/playlist/tree.c | 41 -----------------------------------------
3 files changed, 43 deletions(-)
diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h
index 6ff7f3d..bfd124a 100644
--- a/include/vlc_playlist.h
+++ b/include/vlc_playlist.h
@@ -367,7 +367,6 @@ VLC_API playlist_item_t * playlist_ChildSearchName(playlist_item_t*, const char*
VLC_API void playlist_NodeDelete( playlist_t *, playlist_item_t *, bool , bool );
VLC_API 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 ) VLC_USED;
-VLC_API 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 ) VLC_USED;
/**************************
* Audio output management
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 6da7907..1e1e362 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -343,7 +343,6 @@ playlist_Deactivate
playlist_DeleteFromInput
playlist_Export
playlist_GetNextLeaf
-playlist_GetPrevLeaf
playlist_GetNodeDuration
playlist_Import
playlist_IsServicesDiscoveryLoaded
diff --git a/src/playlist/tree.c b/src/playlist/tree.c
index 78350ab..82e5b755 100644
--- a/src/playlist/tree.c
+++ b/src/playlist/tree.c
@@ -307,47 +307,6 @@ playlist_item_t *playlist_GetNextLeaf( playlist_t *p_playlist,
return p_next;
}
-/**
- * Finds the previous item to play
- *
- * \param p_playlist the playlist
- * \param p_root the root node
- * \param p_item the previous item (NULL if none )
- * \return the next item to play, or NULL if none found
- */
-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 )
-{
- PL_ASSERT_LOCKED;
- playlist_item_t *p_prev;
-
- PL_DEBUG2( "finding previous of %s within %s", PLI_NAME( p_item ),
- PLI_NAME( p_root ) );
- assert( p_root && p_root->i_children != -1 );
-
- /* Now, walk the tree until we find a suitable previous item */
- p_prev = p_item;
- while( 1 )
- {
- bool b_ena_ok = true, b_unplayed_ok = true;
- p_prev = GetPrevItem( p_playlist, p_root, p_prev );
- if( !p_prev || p_prev == p_root )
- break;
- if( p_prev->i_children == -1 )
- {
- if( b_ena && p_prev->i_flags & PLAYLIST_DBL_FLAG )
- b_ena_ok = false;
- if( b_unplayed && p_prev->i_nb_played != 0 )
- b_unplayed_ok = false;
- if( b_ena_ok && b_unplayed_ok ) break;
- }
- }
- if( p_prev == NULL ) PL_DEBUG2( "at beginning of node" );
- return p_prev;
-}
-
/************************************************************************
* Following functions are local
***********************************************************************/
More information about the vlc-commits
mailing list