}
/* Check for daemon mode */
-#ifndef WIN32
+#if !defined( WIN32 ) && !defined( __SYMBIAN32__ )
if( var_InheritBool( p_libvlc, "daemon" ) )
{
#ifdef HAVE_DAEMON
&& ( defined( HAVE_GETTEXT ) || defined( HAVE_INCLUDED_GETTEXT ) )
# if defined (WIN32) || defined (__APPLE__)
if( !var_InheritBool( p_libvlc, "ignore-config" ) )
- config_LoadConfigFile( p_libvlc, "main" );
+ config_LoadConfigFile( p_libvlc );
priv->i_verbose = var_InheritInteger( p_libvlc, "verbose" );
/* Check if the user specified a custom language */
if( module_count <= 1 )
{
- msg_Err( p_libvlc, "No modules were found, refusing to start. Check "
- "that you properly gave a module path with --plugin-path.");
+ msg_Err( p_libvlc, "No plugins found! Check your VLC installation.");
b_exit = true;
i_ret = VLC_ENOITEM;
}
* Override default configuration with config file settings
*/
if( !var_InheritBool( p_libvlc, "ignore-config" ) )
- config_LoadConfigFile( p_libvlc, NULL );
+ config_LoadConfigFile( p_libvlc );
/*
* Override configuration with command line settings
for( i_input = vlc_optind; i_input < i_argc;i_input++ )
{
+ /* Skip input options, we can't pass them through D-Bus */
+ if( ppsz_argv[i_input][0] == ':' )
+ {
+ msg_Warn( p_libvlc, "Ignoring option %s",
+ ppsz_argv[i_input] );
+ continue;
+ }
+
+ /* We need to resolve relative paths in this instance */
+ char *psz_mrl = make_URI( ppsz_argv[i_input], NULL );
+ if( psz_mrl == NULL )
+ continue;
msg_Dbg( p_libvlc, "Adds %s to the running Media Player",
- ppsz_argv[i_input] );
+ psz_mrl );
p_dbus_msg = dbus_message_new_method_call(
"org.mpris.vlc", "/TrackList",
if ( NULL == p_dbus_msg )
{
msg_Err( p_libvlc, "D-Bus problem" );
+ free( psz_mrl );
system_End( p_libvlc );
exit( 1 );
}
/* append MRLs */
dbus_message_iter_init_append( p_dbus_msg, &dbus_args );
if ( !dbus_message_iter_append_basic( &dbus_args,
- DBUS_TYPE_STRING, &ppsz_argv[i_input] ) )
+ DBUS_TYPE_STRING, &psz_mrl ) )
{
dbus_message_unref( p_dbus_msg );
+ free( psz_mrl );
system_End( p_libvlc );
exit( 1 );
}
+ free( psz_mrl );
b_play = TRUE;
if( var_InheritBool( p_libvlc, "playlist-enqueue" ) )
b_play = FALSE;
/*
* Initialize hotkey handling
*/
- vlc_InitActions( p_libvlc );
+ priv->actions = vlc_InitActions( p_libvlc );
/* Create a variable for showing the fullscreen interface */
var_Create( p_libvlc, "intf-show", VLC_VAR_BOOL );
#if defined(MEDIA_LIBRARY)
/* Get the ML */
- if( var_GetBool( p_libvlc, "load-media-library-on-startup" ) == true )
+ if( var_GetBool( p_libvlc, "load-media-library-on-startup" ) )
{
priv->p_ml = ml_Create( VLC_OBJECT( p_libvlc ), NULL );
if( !priv->p_ml )
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 );
+ var_Create( p_libvlc, "drawable-nsobject", VLC_VAR_ADDRESS );
#endif
#ifdef WIN32
var_Create( p_libvlc, "drawable-hwnd", VLC_VAR_ADDRESS );
}
#endif
- /* Free playlist now, all threads are gone */
- playlist_Destroy( p_playlist );
-
#if defined(MEDIA_LIBRARY)
media_library_t* p_ml = priv->p_ml;
if( p_ml )
}
#endif
+ /* Free playlist now, all threads are gone */
+ playlist_Destroy( p_playlist );
stats_TimersDumpAll( p_libvlc );
stats_TimersCleanAll( p_libvlc );
/* Free module bank. It is refcounted, so we call this each time */
module_EndBank( p_libvlc, true );
- vlc_DeinitActions( p_libvlc );
+ vlc_DeinitActions( p_libvlc, priv->actions );
}
/**
* the language at runtime under eg. Windows. Beware that this
* makes the environment unconsistent when libvlc is unloaded and
* should probably be moved to a safer place like vlc.c. */
- static char psz_lcall[20];
- snprintf( psz_lcall, sizeof(psz_lcall), "LC_ALL=%s", psz_lang );
- putenv( psz_lcall );
+ setenv( "LC_ALL", psz_lang, 1 );
+
#endif
setlocale( LC_ALL, psz_lang );
case CONFIG_ITEM_LOADFILE:
case CONFIG_ITEM_SAVEFILE:
case CONFIG_ITEM_DIRECTORY:
+ case CONFIG_ITEM_KEY:
case CONFIG_ITEM_MODULE: /* We could also have "=<" here */
case CONFIG_ITEM_MODULE_CAT:
case CONFIG_ITEM_MODULE_LIST:
}
break;
case CONFIG_ITEM_INTEGER:
- case CONFIG_ITEM_KEY: /* FIXME: do something a bit more clever */
print_help_section( p_parser, p_section, b_color,
b_description );
p_section = NULL;
ShowConsole( true );
#endif
- utf8_fprintf( stdout, _("VLC version %s (%s)\n"), VLC_Version(),
+ utf8_fprintf( stdout, _("VLC version %s (%s)\n"), VERSION_MESSAGE,
psz_vlc_changeset );
utf8_fprintf( stdout, _("Compiled by %s on %s (%s)\n"),
VLC_CompileBy(), VLC_CompileHost(), __DATE__" "__TIME__ );