[vlc-devel] commit: Back-end for creating playlist input items with option flags ( Rémi Denis-Courmont )
git version control
git at videolan.org
Wed Feb 4 17:00:52 CET 2009
vlc | branch: 0.9-bugfix | Rémi Denis-Courmont <rdenis at simphalempin.com> | Wed Feb 4 17:50:51 2009 +0200| [4409e905c6f899c7388dfed98055398ff8a3a6c4] | committer: 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4409e905c6f899c7388dfed98055398ff8a3a6c4
---
src/control/libvlc_internal.h | 3 +++
src/libvlccore.sym | 1 +
src/playlist/item.c | 18 ++++++++++++++++--
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/src/control/libvlc_internal.h b/src/control/libvlc_internal.h
index a291858..7d62b88 100644
--- a/src/control/libvlc_internal.h
+++ b/src/control/libvlc_internal.h
@@ -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, playlist_AddExtOpt, ( playlist_t *, const char *, const char *, int, int, mtime_t, const char *const *, int, int, bool, bool ) );
+
+
/***************************************************************************
* Opaque structures for libvlc API
***************************************************************************/
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 05acc07..0c45847 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -262,6 +262,7 @@ picture_New
plane_CopyPixels
playlist_Add
playlist_AddExt
+playlist_AddExtOpt
playlist_AddInput
playlist_AskForArtEnqueue
playlist_BothAddInput
diff --git a/src/playlist/item.c b/src/playlist/item.c
index d72e415..590c825 100644
--- a/src/playlist/item.c
+++ b/src/playlist/item.c
@@ -29,6 +29,7 @@
#include <assert.h>
#include <vlc_playlist.h>
#include "playlist_internal.h"
+#include "control/libvlc_internal.h"
static void AddItem( playlist_t *p_playlist, playlist_item_t *p_item,
playlist_item_t *p_node, int i_mode, int i_pos );
@@ -382,10 +383,23 @@ int playlist_AddExt( playlist_t *p_playlist, const char * psz_uri,
mtime_t i_duration, const char *const *ppsz_options,
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;
input_item_t *p_input = input_item_NewExt( p_playlist, psz_uri, psz_name,
- i_options, ppsz_options,
- i_duration );
+ 0, NULL, 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,
b_locked );
More information about the vlc-devel
mailing list