return pl;
}
+/**
+ * Inserts an item in the playlist used by interfaces.
+ * @note This function may <b>not</b> be called at the same time as
+ * intf_DestroyAll().
+ */
+void intf_InsertItem(libvlc_int_t *libvlc, const char *mrl, unsigned optc,
+ const char *const *optv, unsigned flags)
+{
+ playlist_AddExt(intf_GetPlaylist(libvlc), mrl, NULL, PLAYLIST_INSERT,
+ 0, -1, optc, optv, flags, true, pl_Unlocked);
+}
+
/**
* Stops and destroys all interfaces
* @param p_libvlc the LibVLC instance
psz_val = var_InheritString( p_libvlc, "open" );
if ( psz_val != NULL )
{
- playlist_AddExt( pl_Get(p_libvlc), psz_val, NULL, PLAYLIST_INSERT, 0,
- -1, 0, NULL, 0, true, pl_Unlocked );
+ intf_InsertItem( p_libvlc, psz_val, 0, NULL, 0 );
free( psz_val );
}
continue;
}
- playlist_AddExt( pl_Get( p_vlc ), (mrl != NULL) ? mrl : args[n], NULL,
- PLAYLIST_INSERT, 0, -1, i_options,
+ intf_InsertItem( p_vlc, (mrl != NULL) ? mrl : args[n], i_options,
( i_options ? &args[n + 1] : NULL ),
- VLC_INPUT_OPTION_TRUSTED, true, pl_Unlocked );
+ VLC_INPUT_OPTION_TRUSTED );
free( mrl );
}
}
return (libvlc_priv_t *)libvlc;
}
+void intf_InsertItem(libvlc_int_t *, const char *mrl, unsigned optc,
+ const char * const *optv, unsigned flags);
void intf_DestroyAll( libvlc_int_t * );
#define libvlc_stats( o ) (libvlc_priv((VLC_OBJECT(o))->p_libvlc)->b_stats)