vlc_t * p_vlc = vlc_current_object( i_object );
module_t *p_help_module;
playlist_t *p_playlist;
+ vlc_value_t val;
if( !p_vlc )
{
var_Create( p_vlc, "verbose", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
if( config_GetInt( p_vlc, "quiet" ) )
{
- vlc_value_t val;
val.i_int = -1;
var_Set( p_vlc, "verbose", val );
}
if( !config_GetInt( p_vlc, "fpu" ) )
libvlc.i_cpu &= ~CPU_CAPABILITY_FPU;
-#if defined( __i386__ )
+#if defined( __i386__ ) || defined( __x86_64__ )
if( !config_GetInt( p_vlc, "mmx" ) )
libvlc.i_cpu &= ~CPU_CAPABILITY_MMX;
if( !config_GetInt( p_vlc, "3dn" ) )
{
psz_modules = (char *)realloc( psz_modules, strlen( psz_modules ) +
strlen( psz_control ) + 1 );
- sprintf( psz_modules, "%s,%s", psz_modules, psz_control );
+ sprintf( psz_modules, "%s:%s", psz_modules, psz_control );
}
else if( psz_control && *psz_control )
{
{
char *psz_module, *psz_temp;
psz_module = psz_parser;
- psz_parser = strchr( psz_module, ',' );
+ psz_parser = strchr( psz_module, ':' );
if ( psz_parser )
{
*psz_parser = '\0';
*/
GetFilenames( p_vlc, i_argc, ppsz_argv );
+ /*
+ * Get --open argument
+ */
+ var_Create( p_vlc, "open", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
+ var_Get( p_vlc, "open", &val );
+ if ( val.psz_string != NULL && *val.psz_string )
+ {
+ VLC_AddTarget( p_vlc->i_object_id, val.psz_string, NULL, 0,
+ PLAYLIST_INSERT, 0 );
+ }
+ if ( val.psz_string != NULL ) free( val.psz_string );
+
if( i_object ) vlc_object_release( p_vlc );
return VLC_SUCCESS;
}
return i_ret;
}
+/*****************************************************************************
+ * VLC_VariableType: get a vlc variable type
+ *****************************************************************************/
+int VLC_VariableType( int i_object, char const *psz_var, int *pi_type )
+{
+ int i_type;
+ vlc_t *p_vlc = vlc_current_object( i_object );
+
+ if( !p_vlc )
+ {
+ return VLC_ENOOBJ;
+ }
+
+ /* FIXME: Temporary hack for Mozilla, if variable starts with conf:: then
+ * we handle it as a configuration variable. Don't tell Gildas :) -- sam */
+ if( !strncmp( psz_var, "conf::", 6 ) )
+ {
+ module_config_t *p_item;
+ char const *psz_newvar = psz_var + 6;
+
+ p_item = config_FindConfig( VLC_OBJECT(p_vlc), psz_newvar );
+
+ if( p_item )
+ {
+ switch( p_item->i_type )
+ {
+ case CONFIG_ITEM_BOOL:
+ i_type = VLC_VAR_BOOL;
+ break;
+ case CONFIG_ITEM_INTEGER:
+ i_type = VLC_VAR_INTEGER;
+ break;
+ case CONFIG_ITEM_FLOAT:
+ i_type = VLC_VAR_FLOAT;
+ break;
+ default:
+ i_type = VLC_VAR_STRING;
+ break;
+ }
+ }
+ else
+ i_type = 0;
+ }
+ else
+ i_type = VLC_VAR_TYPE & var_Type( p_vlc , psz_var );
+
+ if( i_object ) vlc_object_release( p_vlc );
+
+ if( i_type > 0 )
+ {
+ *pi_type = i_type;
+ return VLC_SUCCESS;
+ }
+ return VLC_ENOVAR;
+}
+
/*****************************************************************************
* VLC_AddTarget: adds a target for playing.
*****************************************************************************
char *psz_suf = "", *psz_prefix = NULL;
int i;
+ /* Skip deprecated options */
+ if( p_item->psz_current )
+ {
+ continue;
+ }
/* Skip advanced options if requested */
if( p_item->b_advanced && !b_advanced )
{
if( p_item->i_type == CONFIG_ITEM_BOOL && !b_help_module )
{
- /* If option is of type --foo-bar, we print its counterpart
- * as --no-foo-bar, but if it is of type --foobar (without
- * dashes in the name) we print it as --nofoobar. Both
- * values are of course valid, only the display changes. */
- psz_prefix = strchr( p_item->psz_name, '-' ) ? ", --no-"
- : ", --no";
+ psz_prefix = ", --no-";
i -= strlen( p_item->psz_name ) + strlen( psz_prefix );
}
hal_free_string( block_dev );
}
+ hal_free_string_array( devices );
}
hal_shutdown( ctx );