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

Rémi Denis-Courmont git at videolan.org
Sun May 14 18:38:37 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 14 16:40:04 2017 +0300| [dd7616662c9ca26de177c025385f97073fc9b3c7] | committer: Rémi Denis-Courmont

playlist: remove constant playlist_Add() parameter

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

 include/vlc_playlist.h                       | 2 +-
 modules/control/dbus/dbus_player.c           | 2 +-
 modules/gui/skins2/commands/cmd_add_item.cpp | 3 +--
 src/playlist/item.c                          | 6 ++----
 4 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h
index dc8dc12d87..f97a03bb6e 100644
--- a/include/vlc_playlist.h
+++ b/include/vlc_playlist.h
@@ -361,7 +361,7 @@ VLC_API int playlist_ServicesDiscoveryControl( playlist_t *, const char *, int,
  ********************************************************/
 
 /******************** Item addition ********************/
-VLC_API int playlist_Add( playlist_t *, const char *, const char *, int );
+VLC_API int playlist_Add( playlist_t *, const char *, int );
 VLC_API int playlist_AddExt( playlist_t *, const char *, const char *, int, int, const char *const *, unsigned, bool );
 VLC_API int playlist_AddInput( playlist_t *, input_item_t *, int, 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 eaee6d2271..728cc90260 100644
--- a/modules/control/dbus/dbus_player.c
+++ b/modules/control/dbus/dbus_player.c
@@ -229,7 +229,7 @@ DBUS_METHOD( OpenUri )
         return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
     }
 
-    playlist_Add( PL, psz_mrl, NULL, PLAYLIST_GO );
+    playlist_Add( PL, psz_mrl, PLAYLIST_GO );
 
     REPLY_SEND;
 }
diff --git a/modules/gui/skins2/commands/cmd_add_item.cpp b/modules/gui/skins2/commands/cmd_add_item.cpp
index 374ed3b10e..a62a29c9da 100644
--- a/modules/gui/skins2/commands/cmd_add_item.cpp
+++ b/modules/gui/skins2/commands/cmd_add_item.cpp
@@ -43,6 +43,5 @@ void CmdAddItem::execute()
         m_name = psz_uri;
         free( psz_uri );
     }
-    playlist_Add( pPlaylist, m_name.c_str(), NULL,
-                  m_playNow ? PLAYLIST_GO : 0 );
+    playlist_Add( pPlaylist, m_name.c_str(), m_playNow ? PLAYLIST_GO : 0 );
 }
diff --git a/src/playlist/item.c b/src/playlist/item.c
index 08d0ff015e..fe7898e342 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -428,14 +428,12 @@ void playlist_Clear( playlist_t * p_playlist, bool b_locked )
  * Add an item to the playlist or the media library
  * \param p_playlist the playlist to add into
  * \param psz_uri the mrl to add to the playlist
- * \param psz_name a text giving a name or description of this item
  * \param i_mode the mode used when adding
  * \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 playlist_Add( playlist_t *p_playlist, const char *psz_uri, int i_mode )
 {
-    return playlist_AddExt( p_playlist, psz_uri, psz_name,
+    return playlist_AddExt( p_playlist, psz_uri, NULL,
                             i_mode, 0, NULL, 0, true );
 }
 



More information about the vlc-commits mailing list