#endif
/* Initialize mutexes */
+ vlc_mutex_init( &priv->ml_lock );
vlc_mutex_init( &priv->timer_lock );
vlc_ExitInit( &priv->exit );
var_Create( p_libvlc, "snapshot-file", VLC_VAR_STRING );
var_Create( p_libvlc, "record-file", VLC_VAR_STRING );
+ /* some default internal settings */
+ var_Create( p_libvlc, "window", VLC_VAR_STRING );
+ var_Create( p_libvlc, "user-agent", VLC_VAR_STRING );
+ var_SetString( p_libvlc, "user-agent", "(LibVLC "VERSION")" );
+
/* Initialize playlist and get commandline files */
p_playlist = playlist_Create( VLC_OBJECT(p_libvlc) );
if( !p_playlist )
/* Get the ML */
if( var_GetBool( p_libvlc, "load-media-library-on-startup" ) == true )
{
- priv->p_ml = __ml_Create( VLC_OBJECT( p_libvlc ), NULL );
+ priv->p_ml = ml_Create( VLC_OBJECT( p_libvlc ), NULL );
if( !priv->p_ml )
{
msg_Err( p_libvlc, "ML initialization failed" );
}
#endif
+#ifdef __APPLE__
var_Create( p_libvlc, "drawable-view-top", VLC_VAR_INTEGER );
var_Create( p_libvlc, "drawable-view-left", VLC_VAR_INTEGER );
var_Create( p_libvlc, "drawable-view-bottom", VLC_VAR_INTEGER );
var_Create( p_libvlc, "drawable-clip-left", VLC_VAR_INTEGER );
var_Create( p_libvlc, "drawable-clip-bottom", VLC_VAR_INTEGER );
var_Create( p_libvlc, "drawable-clip-right", VLC_VAR_INTEGER );
+#endif
#ifdef WIN32
var_Create( p_libvlc, "drawable-hwnd", VLC_VAR_ADDRESS );
#endif
media_library_t* p_ml = priv->p_ml;
if( p_ml )
{
- __ml_Destroy( VLC_OBJECT( p_ml ) );
+ ml_Destroy( VLC_OBJECT( p_ml ) );
vlc_object_release( p_ml );
libvlc_priv(p_playlist->p_libvlc)->p_ml = NULL;
}
/* Destroy mutexes */
vlc_ExitDestroy( &priv->exit );
vlc_mutex_destroy( &priv->timer_lock );
+ vlc_mutex_destroy( &priv->ml_lock );
#ifndef NDEBUG /* Hack to dump leaked objects tree */
if( vlc_internals( p_libvlc )->i_refcount > 1 )
}
}
- /* TODO: write an internal function of this one, to avoid
- * unnecessary lookups. */
- char *mrl = make_URI( args[n] );
+ char *mrl = make_URI( args[n], NULL );
if( !mrl )
continue;
if( p_item->min.i || p_item->max.i )
{
- sprintf( psz_buffer, "%s [%i .. %i]", psz_type,
- p_item->min.i, p_item->max.i );
+ sprintf( psz_buffer, "%s [%"PRId64" .. %"PRId64"]",
+ psz_type, p_item->min.i, p_item->max.i );
psz_type = psz_buffer;
}