Commit 4409e905 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Back-end for creating playlist input items with option flags

This is untested (no plugin here). If you care about the Mozilla or
ActiveX plugin, you really do want to trial it before 0.9.9 goes out.
parent 918d0086
...@@ -46,6 +46,9 @@ VLC_EXPORT (int, libvlc_InternalDestroy, ( libvlc_int_t * ) ); ...@@ -46,6 +46,9 @@ VLC_EXPORT (int, libvlc_InternalDestroy, ( libvlc_int_t * ) );
VLC_EXPORT (int, libvlc_InternalAddIntf, ( libvlc_int_t *, const char * ) ); VLC_EXPORT (int, libvlc_InternalAddIntf, ( libvlc_int_t *, const char * ) );
VLC_EXPORT (int, playlist_AddExtOpt, ( playlist_t *, const char *, const char *, int, int, mtime_t, const char *const *, int, int, bool, bool ) );
/*************************************************************************** /***************************************************************************
* Opaque structures for libvlc API * Opaque structures for libvlc API
***************************************************************************/ ***************************************************************************/
......
...@@ -262,6 +262,7 @@ picture_New ...@@ -262,6 +262,7 @@ picture_New
plane_CopyPixels plane_CopyPixels
playlist_Add playlist_Add
playlist_AddExt playlist_AddExt
playlist_AddExtOpt
playlist_AddInput playlist_AddInput
playlist_AskForArtEnqueue playlist_AskForArtEnqueue
playlist_BothAddInput playlist_BothAddInput
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <assert.h> #include <assert.h>
#include <vlc_playlist.h> #include <vlc_playlist.h>
#include "playlist_internal.h" #include "playlist_internal.h"
#include "control/libvlc_internal.h"
static void AddItem( playlist_t *p_playlist, playlist_item_t *p_item, static void AddItem( playlist_t *p_playlist, playlist_item_t *p_item,
playlist_item_t *p_node, int i_mode, int i_pos ); playlist_item_t *p_node, int i_mode, int i_pos );
...@@ -381,11 +382,24 @@ int playlist_AddExt( playlist_t *p_playlist, const char * psz_uri, ...@@ -381,11 +382,24 @@ int playlist_AddExt( playlist_t *p_playlist, const char * psz_uri,
const char *psz_name, int i_mode, int i_pos, const char *psz_name, int i_mode, int i_pos,
mtime_t i_duration, const char *const *ppsz_options, mtime_t i_duration, const char *const *ppsz_options,
int i_options, bool b_playlist, bool b_locked ) int i_options, bool b_playlist, bool b_locked )
{
return playlist_AddExtOpt( p_playlist, psz_uri, psz_name, i_mode, i_pos,
i_duration, ppsz_options, i_options,
VLC_INPUT_OPTION_TRUSTED,
b_playlist, b_locked );
}
int playlist_AddExtOpt( 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, int flags,
bool b_playlist, bool b_locked )
{ {
int i_ret; int i_ret;
input_item_t *p_input = input_item_NewExt( p_playlist, psz_uri, psz_name, input_item_t *p_input = input_item_NewExt( p_playlist, psz_uri, psz_name,
i_options, ppsz_options, 0, NULL, i_duration );
i_duration ); for( int i = 0; i < i_options; i++ )
input_item_AddOpt( p_input, ppsz_options[i], flags );
i_ret = playlist_AddInput( p_playlist, p_input, i_mode, i_pos, b_playlist, i_ret = playlist_AddInput( p_playlist, p_input, i_mode, i_pos, b_playlist,
b_locked ); b_locked );
......
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