[vlc-commits] playlist: remove locked parameter to playlist_Add()

Rémi Denis-Courmont git at videolan.org
Wed Nov 16 23:05:07 CET 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Nov 16 23:42:00 2016 +0200| [284b59b94f503b44e9bdc00a89f30fcc8e72e0fc] | committer: Rémi Denis-Courmont

playlist: remove locked parameter to playlist_Add()

This is always false. For unlocked insertions, playlist_NodeAddInput()
is preferred.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=284b59b94f503b44e9bdc00a89f30fcc8e72e0fc
---

 include/vlc_playlist.h                       | 2 +-
 modules/control/dbus/dbus_player.c           | 5 ++---
 modules/control/dbus/dbus_tracklist.c        | 2 +-
 modules/gui/ncurses.c                        | 7 +++----
 modules/gui/skins2/commands/cmd_add_item.cpp | 2 +-
 src/playlist/item.c                          | 5 ++---
 6 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h
index f6db8b1..477a3dc 100644
--- a/include/vlc_playlist.h
+++ b/include/vlc_playlist.h
@@ -333,7 +333,7 @@ VLC_API int playlist_ServicesDiscoveryControl( playlist_t *, const char *, int,
 VLC_API int playlist_DeleteFromInput( playlist_t *, input_item_t *, bool );
 
 /******************** Item addition ********************/
-VLC_API int playlist_Add( playlist_t *, const char *, const char *, int, int, bool, bool );
+VLC_API int playlist_Add( playlist_t *, const char *, const char *, int, int, bool );
 VLC_API int playlist_AddExt( playlist_t *, const char *, const char *, int, int, mtime_t, int, const char *const *, unsigned, bool, bool );
 VLC_API int playlist_AddInput( playlist_t *, input_item_t *, int, int, bool, bool );
 VLC_API playlist_item_t * playlist_NodeAddInput( playlist_t *, input_item_t *, playlist_item_t *, int, int );
diff --git a/modules/control/dbus/dbus_player.c b/modules/control/dbus/dbus_player.c
index 5f0f347..e4f7ee1 100644
--- a/modules/control/dbus/dbus_player.c
+++ b/modules/control/dbus/dbus_player.c
@@ -229,9 +229,8 @@ DBUS_METHOD( OpenUri )
         return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
     }
 
-    playlist_Add( PL, psz_mrl, NULL,
-                  PLAYLIST_APPEND | PLAYLIST_GO,
-                  PLAYLIST_END, true, false );
+    playlist_Add( PL, psz_mrl, NULL, PLAYLIST_APPEND | PLAYLIST_GO,
+                  PLAYLIST_END, true );
 
     REPLY_SEND;
 }
diff --git a/modules/control/dbus/dbus_tracklist.c b/modules/control/dbus/dbus_tracklist.c
index 8175595..844043c 100644
--- a/modules/control/dbus/dbus_tracklist.c
+++ b/modules/control/dbus/dbus_tracklist.c
@@ -124,7 +124,7 @@ invalidTrackID:
     }
 
     i_mode |= ( TRUE == b_play ) ? PLAYLIST_GO : 0;
-    playlist_Add( PL, psz_mrl, NULL, i_mode, i_pos, true, false );
+    playlist_Add( PL, psz_mrl, NULL, i_mode, i_pos, true );
 
     REPLY_SEND;
 }
diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c
index c51307a..8206f98 100644
--- a/modules/gui/ncurses.c
+++ b/modules/gui/ncurses.c
@@ -1447,7 +1447,7 @@ static bool HandleBrowseKey(intf_thread_t *intf, int key)
 
         input_item_t *p_input = p_playlist->p_playing->p_input;
         playlist_Add(p_playlist, uri, NULL, PLAYLIST_APPEND,
-                      PLAYLIST_END, p_parent->p_input == p_input, false);
+                     PLAYLIST_END, p_parent->p_input == p_input);
 
         BoxSwitch(sys, BOX_PLAYLIST);
         free(uri);
@@ -1483,9 +1483,8 @@ static void OpenSelection(intf_thread_t *intf)
     PL_UNLOCK;
 
     playlist_Add(p_playlist, uri, NULL,
-            PLAYLIST_APPEND|PLAYLIST_GO, PLAYLIST_END,
-            p_parent->p_input == p_playlist->p_playing->p_input,
-            false);
+                 PLAYLIST_APPEND|PLAYLIST_GO, PLAYLIST_END,
+                 p_parent->p_input == p_playlist->p_playing->p_input);
 
     sys->plidx_follow = true;
     free(uri);
diff --git a/modules/gui/skins2/commands/cmd_add_item.cpp b/modules/gui/skins2/commands/cmd_add_item.cpp
index 5d03ad4..d4635dd 100644
--- a/modules/gui/skins2/commands/cmd_add_item.cpp
+++ b/modules/gui/skins2/commands/cmd_add_item.cpp
@@ -47,5 +47,5 @@ void CmdAddItem::execute()
     }
     playlist_Add( pPlaylist, m_name.c_str(), NULL,
                   m_playNow ? PLAYLIST_APPEND | PLAYLIST_GO : PLAYLIST_APPEND,
-                  PLAYLIST_END, true, false );
+                  PLAYLIST_END, true );
 }
diff --git a/src/playlist/item.c b/src/playlist/item.c
index 450f834..5a012e4 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -377,15 +377,14 @@ void playlist_Clear( playlist_t * p_playlist, bool b_locked )
  *        PLAYLIST_END the item will be added at the end of the playlist
  *        regardless of its size
  * \param b_playlist TRUE for playlist, FALSE for media library
- * \param b_locked TRUE if the playlist is locked
  * \return VLC_SUCCESS or a VLC error code
  */
 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 )
+                  bool b_playlist )
 {
     return playlist_AddExt( p_playlist, psz_uri, psz_name,
-                            i_mode, i_pos, -1, 0, NULL, 0, b_playlist, b_locked );
+                            i_mode, i_pos, -1, 0, NULL, 0, b_playlist, false );
 }
 
 /**



More information about the vlc-commits mailing list