From: Laurent Aimar Date: Sun, 18 Jan 2009 14:11:13 +0000 (+0100) Subject: Changed playlist_AddExt to be more consistant with input_item_NewWithType. X-Git-Tag: 1.0.0-pre1~1242 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=15abf70b6e6074748a52e6c56986a9fde0aeed0f;p=vlc Changed playlist_AddExt to be more consistant with input_item_NewWithType. --- diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h index b27fd5a130..ac477ac6a6 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 f3f40176df..282b2f5724 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 febaf3e5df..1b65248893 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 e66e4019a4..3764c67768 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 c11e1513f3..0114be64ef 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 8daf1fa0a9..fecb447bb5 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 70380613dc..a1f1d72c52 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,