[vlc-devel] commit: Changed playlist_AddExt to be more consistant with input_item_NewWithType. (Laurent Aimar )
git version control
git at videolan.org
Sun Jan 18 15:15:16 CET 2009
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Jan 18 15:11:13 2009 +0100| [15abf70b6e6074748a52e6c56986a9fde0aeed0f] | committer: Laurent Aimar
Changed playlist_AddExt to be more consistant with input_item_NewWithType.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=15abf70b6e6074748a52e6c56986a9fde0aeed0f
---
include/vlc_playlist.h | 2 +-
modules/gui/pda/pda_callbacks.c | 2 +-
modules/gui/qt4/dialogs_provider.cpp | 2 +-
src/control/playlist.c | 5 +++--
src/libvlc.c | 7 ++++---
src/misc/win32_specific.c | 4 +++-
src/playlist/item.c | 12 +++++++-----
7 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h
index b27fd5a..ac477ac 100644
--- a/include/vlc_playlist.h
+++ b/include/vlc_playlist.h
@@ -314,7 +314,7 @@ VLC_EXPORT( int, playlist_DeleteFromInput, ( playlist_t *, int, bool ) );
/******************** Item addition ********************/
VLC_EXPORT( int, playlist_Add, ( playlist_t *, const char *, const char *, int, int, bool, bool ) );
-VLC_EXPORT( int, playlist_AddExt, ( playlist_t *, const char *, const char *, int, int, mtime_t, const char *const *,int, bool, bool ) );
+VLC_EXPORT( int, playlist_AddExt, ( playlist_t *, const char *, const char *, int, int, mtime_t, int, const char *const *, unsigned, bool, bool ) );
VLC_EXPORT( int, playlist_AddInput, ( playlist_t *, input_item_t *, int, int, bool, bool ) );
VLC_EXPORT( int, playlist_BothAddInput, ( playlist_t *, input_item_t *,playlist_item_t *,int , int, int*, int*, bool ) );
diff --git a/modules/gui/pda/pda_callbacks.c b/modules/gui/pda/pda_callbacks.c
index f3f4017..282b2f5 100644
--- a/modules/gui/pda/pda_callbacks.c
+++ b/modules/gui/pda/pda_callbacks.c
@@ -136,7 +136,7 @@ static void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options,
(const char*)name,
PLAYLIST_APPEND, PLAYLIST_END,
(mtime_t) 0,
- (const char **) ppsz_options, i_options,
+ i_options, (const char **) ppsz_options, VLC_INPUT_OPTION_TRUSTED,
true, pl_Unlocked );
}
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index febaf3e..1b65248 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -551,7 +551,7 @@ void DialogsProvider::streamingDialog( QWidget *parent, QString mrl,
msg_Dbg( p_intf, "Sout mrl %s", psz_option );
playlist_AddExt( THEPL, qtu( mrl ), "Streaming",
PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END,
- -1, &psz_option, 1, true, pl_Unlocked );
+ -1, 1, &psz_option, VLC_INPUT_OPTION_TRUSTED, true, pl_Unlocked );
RecentsMRL::getInstance( p_intf )->addRecent( mrl );
}
}
diff --git a/src/control/playlist.c b/src/control/playlist.c
index e66e401..3764c67 100644
--- a/src/control/playlist.c
+++ b/src/control/playlist.c
@@ -171,8 +171,9 @@ int libvlc_playlist_add_extended( libvlc_instance_t *p_instance,
return VLC_EGENERIC;
}
return playlist_AddExt( PL, psz_uri, psz_name,
- PLAYLIST_INSERT, PLAYLIST_END, -1, ppsz_options,
- i_options, 1, pl_Unlocked );
+ PLAYLIST_INSERT, PLAYLIST_END, -1,
+ i_options, ppsz_options, VLC_INPUT_OPTION_TRUSTED,
+ true, pl_Unlocked );
}
diff --git a/src/libvlc.c b/src/libvlc.c
index c11e151..0114be6 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -1013,7 +1013,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
{
playlist_t *p_playlist = pl_Hold( p_libvlc );
playlist_AddExt( p_playlist, val.psz_string, NULL, PLAYLIST_INSERT, 0,
- -1, NULL, 0, true, pl_Unlocked );
+ -1, 0, NULL, 0, true, pl_Unlocked );
pl_Release( p_libvlc );
}
free( val.psz_string );
@@ -1293,8 +1293,9 @@ static int GetFilenames( libvlc_int_t *p_vlc, int i_argc, const char *ppsz_argv[
playlist_t *p_playlist = pl_Hold( p_vlc );
playlist_AddExt( p_playlist, ppsz_argv[i_opt], NULL, PLAYLIST_INSERT,
- 0, -1, ( i_options ? &ppsz_argv[i_opt + 1] : NULL ),
- i_options, true, pl_Unlocked );
+ 0, -1,
+ i_options, ( i_options ? &ppsz_argv[i_opt + 1] : NULL ), VLC_INPUT_OPTION_TRUSTED,
+ true, pl_Unlocked );
pl_Release( p_vlc );
}
diff --git a/src/misc/win32_specific.c b/src/misc/win32_specific.c
index 8daf1fa..fecb447 100644
--- a/src/misc/win32_specific.c
+++ b/src/misc/win32_specific.c
@@ -348,8 +348,10 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
NULL, PLAYLIST_APPEND |
( ( i_opt || p_data->enqueue ) ? 0 : PLAYLIST_GO ),
PLAYLIST_END, -1,
+ i_options,
(char const **)( i_options ? &ppsz_argv[i_opt+1] : NULL ),
- i_options, true, pl_Unlocked );
+ VLC_INPUT_OPTION_TRUSTED,
+ true, pl_Unlocked );
i_opt += i_options;
}
diff --git a/src/playlist/item.c b/src/playlist/item.c
index 7038061..a1f1d72 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -344,7 +344,7 @@ int playlist_Add( playlist_t *p_playlist, const char *psz_uri,
bool b_playlist, bool b_locked )
{
return playlist_AddExt( p_playlist, psz_uri, psz_name,
- i_mode, i_pos, -1, NULL, 0, b_playlist, b_locked );
+ i_mode, i_pos, -1, 0, NULL, 0, b_playlist, b_locked );
}
/**
@@ -358,20 +358,22 @@ int playlist_Add( playlist_t *p_playlist, const char *psz_uri,
* PLAYLIST_END the item will be added at the end of the playlist
* regardless of its size
* \param i_duration length of the item in milliseconds.
- * \param ppsz_options an array of options
* \param i_options the number of options
+ * \param ppsz_options an array of options
+ * \param i_option_flags options flags
* \param b_playlist TRUE for playlist, FALSE for media library
* \param b_locked TRUE if the playlist is locked
* \return The id of the playlist item
*/
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, const char *const *ppsz_options,
- int i_options, bool b_playlist, bool b_locked )
+ mtime_t i_duration,
+ int i_options, const char *const *ppsz_options, unsigned i_option_flags,
+ bool b_playlist, bool b_locked )
{
int i_ret;
input_item_t *p_input = input_item_NewExt( p_playlist, psz_uri, psz_name,
- i_options, ppsz_options, VLC_INPUT_OPTION_TRUSTED,
+ i_options, ppsz_options, i_option_flags,
i_duration );
i_ret = playlist_AddInput( p_playlist, p_input, i_mode, i_pos, b_playlist,
More information about the vlc-devel
mailing list