#include <vlc_input.h>
#include <vlc_meta.h>
#include <vlc_playlist.h> /* For the preparser */
+#include <vlc_url.h>
#include "libvlc.h"
/**************************************************************************
* Create a new media descriptor object
**************************************************************************/
-libvlc_media_t * libvlc_media_new( libvlc_instance_t *p_instance,
- const char * psz_mrl )
+libvlc_media_t *libvlc_media_new_location( libvlc_instance_t *p_instance,
+ const char * psz_mrl )
{
input_item_t * p_input_item;
libvlc_media_t * p_md;
return p_md;
}
+libvlc_media_t *libvlc_media_new_path( libvlc_instance_t *p_instance,
+ const char *path )
+{
+ char *mrl = make_URI( path );
+ if( unlikely(mrl == NULL) )
+ {
+ libvlc_printerr( "Not enough memory" );
+ return NULL;
+ }
+
+ libvlc_media_t *m = libvlc_media_new_location( p_instance, mrl );
+ free( mrl );
+ return m;
+}
+
/**************************************************************************
* Create a new media descriptor object
**************************************************************************/