Commit 15abf70b authored by Laurent Aimar's avatar Laurent Aimar

Changed playlist_AddExt to be more consistant with input_item_NewWithType.

parent ebd7cf22
......@@ -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 ) );
......
......@@ -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 );
}
......
......@@ -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 );
}
}
......
......@@ -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 );
}
......
......@@ -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 );
}
......
......@@ -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;
}
......
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment