selection string. "any" matches any module, and "none" always fails.
You can for instance use "--vout none" to disable video output, or
"--intf gtk,any" to use the gtk interface or any other one if gtk isn't
available. Hope it's clear :)
* modules.c : Builtin and plugin modules management functions
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* modules.c : Builtin and plugin modules management functions
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.72 2002/07/20 18:01:43 sam Exp $
+ * $Id: modules.c,v 1.73 2002/07/22 22:19:49 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com>
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com>
msg_Dbg( p_this, "looking for %s module",
MODULE_CAPABILITY( i_capability ) );
msg_Dbg( p_this, "looking for %s module",
MODULE_CAPABILITY( i_capability ) );
- /* We take the global lock */
- vlc_mutex_lock( &p_this->p_vlc->module_bank.lock );
-
/* Count how many different shortcuts were asked for */
if( psz_name && *psz_name )
{
char *psz_parser;
/* Count how many different shortcuts were asked for */
if( psz_name && *psz_name )
{
char *psz_parser;
+ /* If the user wants none, give him none. */
+ if( !strcmp( psz_name, "none" ) )
+ {
+ return NULL;
+ }
+
i_shortcuts++;
psz_shortcuts = strdup( psz_name );
i_shortcuts++;
psz_shortcuts = strdup( psz_name );
+ /* We take the global lock */
+ vlc_mutex_lock( &p_this->p_vlc->module_bank.lock );
+
/* Sort the modules and test them */
p_list = malloc( p_this->p_vlc->module_bank.i_count
* sizeof( module_list_t ) );
/* Sort the modules and test them */
p_list = malloc( p_this->p_vlc->module_bank.i_count
* sizeof( module_list_t ) );
b_trash && p_module->pp_shortcuts[i_dummy];
i_dummy++ )
{
b_trash && p_module->pp_shortcuts[i_dummy];
i_dummy++ )
{
- b_trash = strcmp( psz_name,
- p_module->pp_shortcuts[i_dummy] );
+ b_trash = strcmp( psz_name, "any" )
+ && strcmp( psz_name, p_module->pp_shortcuts[i_dummy] );
+ /* Go to the next shortcut... This is so lame! */
while( *psz_name )
{
psz_name++;
while( *psz_name )
{
psz_name++;