Commit 0aeed985 authored by Sam Hocevar's avatar Sam Hocevar

* ./plugins/filters/*: fixed inconsistencies.

parent e9577415
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* clone.c : Clone video plugin for vlc * clone.c : Clone video plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: clone.c,v 1.3 2002/05/27 19:35:41 sam Exp $ * $Id: clone.c,v 1.4 2002/05/28 22:49:25 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -45,7 +45,7 @@ static void vout_getfunctions( function_list_t * p_function_list ); ...@@ -45,7 +45,7 @@ static void vout_getfunctions( function_list_t * p_function_list );
*****************************************************************************/ *****************************************************************************/
MODULE_CONFIG_START MODULE_CONFIG_START
ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL ) ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
ADD_INTEGER ( "clone_count", 2, NULL, N_("Number of clones"), ADD_INTEGER ( "clone-count", 2, NULL, N_("Number of clones"),
N_("Select the number of videowindows in which to clone the video") ) N_("Select the number of videowindows in which to clone the video") )
MODULE_CONFIG_STOP MODULE_CONFIG_STOP
...@@ -122,7 +122,7 @@ static int vout_Create( vout_thread_t *p_vout ) ...@@ -122,7 +122,7 @@ static int vout_Create( vout_thread_t *p_vout )
} }
/* Look what method was requested */ /* Look what method was requested */
p_vout->p_sys->i_clones = config_GetIntVariable( "clone_count" ); p_vout->p_sys->i_clones = config_GetIntVariable( "clone-count" );
p_vout->p_sys->i_clones = __MAX( 1, __MIN( 99, p_vout->p_sys->i_clones ) ); p_vout->p_sys->i_clones = __MAX( 1, __MIN( 99, p_vout->p_sys->i_clones ) );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* deinterlace.c : deinterlacer plugin for vlc * deinterlace.c : deinterlacer plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: deinterlace.c,v 1.11 2002/05/27 19:35:41 sam Exp $ * $Id: deinterlace.c,v 1.12 2002/05/28 22:49:25 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -50,7 +50,7 @@ static void *memblend( void *, const void *, const void *, size_t ); ...@@ -50,7 +50,7 @@ static void *memblend( void *, const void *, const void *, size_t );
*****************************************************************************/ *****************************************************************************/
MODULE_CONFIG_START MODULE_CONFIG_START
ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL ) ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
ADD_STRING ( "deinterlace_mode", "bob", NULL, N_("Deinterlace mode"), ADD_STRING ( "deinterlace-mode", "bob", NULL, N_("Deinterlace mode"),
N_("one of 'bob' and 'blend'") ) N_("one of 'bob' and 'blend'") )
MODULE_CONFIG_STOP MODULE_CONFIG_STOP
...@@ -127,26 +127,32 @@ static int vout_Create( vout_thread_t *p_vout ) ...@@ -127,26 +127,32 @@ static int vout_Create( vout_thread_t *p_vout )
} }
/* Look what method was requested */ /* Look what method was requested */
if( !(psz_method = config_GetPszVariable( "filter" )) ) psz_method = config_GetPszVariable( "deinterlace-mode" );
{
intf_ErrMsg( "vout error: configuration variable %s empty",
"filter" );
return( 1 );
}
if( !strcmp( psz_method, "bob" ) ) if( psz_method == NULL )
{ {
intf_ErrMsg( "vout error: configuration variable %s empty",
"deinterlace-mode" );
intf_ErrMsg( "filter error: no valid deinterlace mode provided, "
"using deinterlace:bob" );
p_vout->p_sys->i_mode = DEINTERLACE_MODE_BOB; p_vout->p_sys->i_mode = DEINTERLACE_MODE_BOB;
} }
else if( !strcmp( psz_method, "blend" ) )
{
p_vout->p_sys->i_mode = DEINTERLACE_MODE_BLEND;
}
else else
{ {
intf_ErrMsg( "filter error: no valid deinterlace mode provided, " if( !strcmp( psz_method, "bob" ) )
"using deinterlace:bob" ); {
p_vout->p_sys->i_mode = DEINTERLACE_MODE_BOB; p_vout->p_sys->i_mode = DEINTERLACE_MODE_BOB;
}
else if( !strcmp( psz_method, "blend" ) )
{
p_vout->p_sys->i_mode = DEINTERLACE_MODE_BLEND;
}
else
{
intf_ErrMsg( "filter error: no valid deinterlace mode provided, "
"using deinterlace:bob" );
p_vout->p_sys->i_mode = DEINTERLACE_MODE_BOB;
}
} }
free( psz_method ); free( psz_method );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* distort.c : Misc video effects plugin for vlc * distort.c : Misc video effects plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: distort.c,v 1.12 2002/05/27 19:35:41 sam Exp $ * $Id: distort.c,v 1.13 2002/05/28 22:49:25 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -50,7 +50,7 @@ static void vout_getfunctions( function_list_t * p_function_list ); ...@@ -50,7 +50,7 @@ static void vout_getfunctions( function_list_t * p_function_list );
*****************************************************************************/ *****************************************************************************/
MODULE_CONFIG_START MODULE_CONFIG_START
ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL ) ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
ADD_STRING ( "distort_mode", "wave", NULL, N_("distort mode"), ADD_STRING ( "distort-mode", "wave", NULL, N_("distort mode"),
N_("one of \"wave\" and \"ripple\"") ) N_("one of \"wave\" and \"ripple\"") )
MODULE_CONFIG_STOP MODULE_CONFIG_STOP
...@@ -161,11 +161,11 @@ static int vout_Create( vout_thread_t *p_vout ) ...@@ -161,11 +161,11 @@ static int vout_Create( vout_thread_t *p_vout )
/* No method given in commandline. Look what method was /* No method given in commandline. Look what method was
requested in configuration system */ requested in configuration system */
if( !(psz_method = psz_method_tmp if( !(psz_method = psz_method_tmp
= config_GetPszVariable( "distort_mode" )) ) = config_GetPszVariable( "distort-mode" )) )
{ {
intf_ErrMsg( "vout error: configuration variable %s empty " intf_ErrMsg( "vout error: configuration variable %s empty "
"using wave", "using wave",
"distort_mode" ); "distort-mode" );
p_vout->p_sys->i_mode = DISTORT_MODE_WAVE; p_vout->p_sys->i_mode = DISTORT_MODE_WAVE;
} }
else { else {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* transform.c : transform image plugin for vlc * transform.c : transform image plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: transform.c,v 1.11 2002/05/27 19:35:41 sam Exp $ * $Id: transform.c,v 1.12 2002/05/28 22:49:25 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -51,7 +51,7 @@ static void vout_getfunctions( function_list_t * p_function_list ); ...@@ -51,7 +51,7 @@ static void vout_getfunctions( function_list_t * p_function_list );
*****************************************************************************/ *****************************************************************************/
MODULE_CONFIG_START MODULE_CONFIG_START
ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL ) ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
ADD_STRING("transform_type", "90", NULL, N_("Transform type"), ADD_STRING("transform-type", "90", NULL, N_("Transform type"),
N_("One of '90', '180', '270', 'hflip' and 'vflip'")) N_("One of '90', '180', '270', 'hflip' and 'vflip'"))
MODULE_CONFIG_STOP MODULE_CONFIG_STOP
...@@ -117,7 +117,7 @@ static void vout_getfunctions( function_list_t * p_function_list ) ...@@ -117,7 +117,7 @@ static void vout_getfunctions( function_list_t * p_function_list )
*****************************************************************************/ *****************************************************************************/
static int vout_Create( vout_thread_t *p_vout ) static int vout_Create( vout_thread_t *p_vout )
{ {
char *psz_method, *psz_method_tmp; char *psz_method;
/* Allocate structure */ /* Allocate structure */
p_vout->p_sys = malloc( sizeof( vout_sys_t ) ); p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
...@@ -128,11 +128,12 @@ static int vout_Create( vout_thread_t *p_vout ) ...@@ -128,11 +128,12 @@ static int vout_Create( vout_thread_t *p_vout )
} }
/* Look what method was requested */ /* Look what method was requested */
if( !(psz_method = psz_method_tmp psz_method = config_GetPszVariable( "transform-type" );
= config_GetPszVariable( "transform_type" )) )
if( psz_method == NULL )
{ {
intf_ErrMsg( "vout error: configuration variable %s empty", intf_ErrMsg( "vout error: configuration variable %s empty",
"transform_type" ); "transform-type" );
intf_ErrMsg( "filter error: no valid transform mode provided, " intf_ErrMsg( "filter error: no valid transform mode provided, "
"using '90'" ); "using '90'" );
p_vout->p_sys->i_mode = TRANSFORM_MODE_90; p_vout->p_sys->i_mode = TRANSFORM_MODE_90;
...@@ -172,10 +173,10 @@ static int vout_Create( vout_thread_t *p_vout ) ...@@ -172,10 +173,10 @@ static int vout_Create( vout_thread_t *p_vout )
p_vout->p_sys->i_mode = TRANSFORM_MODE_90; p_vout->p_sys->i_mode = TRANSFORM_MODE_90;
p_vout->p_sys->b_rotation = 1; p_vout->p_sys->b_rotation = 1;
} }
free( psz_method );
} }
free( psz_method_tmp );
return( 0 ); return( 0 );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* wall.c : Wall video plugin for vlc * wall.c : Wall video plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: wall.c,v 1.18 2002/05/27 19:35:41 sam Exp $ * $Id: wall.c,v 1.19 2002/05/28 22:49:25 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -45,13 +45,13 @@ static void vout_getfunctions( function_list_t * p_function_list ); ...@@ -45,13 +45,13 @@ static void vout_getfunctions( function_list_t * p_function_list );
*****************************************************************************/ *****************************************************************************/
MODULE_CONFIG_START MODULE_CONFIG_START
ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL ) ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
ADD_INTEGER ( "wall_cols", 3, NULL, N_("Number of columns"), ADD_INTEGER ( "wall-cols", 3, NULL, N_("Number of columns"),
N_("Select the number of horizontal videowindows in which " N_("Select the number of horizontal videowindows in which "
"to split the video") ) "to split the video") )
ADD_INTEGER ( "wall_rows", 3, NULL, N_("Number of rows"), ADD_INTEGER ( "wall-rows", 3, NULL, N_("Number of rows"),
N_("Select the number of vertical videowindows in which " N_("Select the number of vertical videowindows in which "
"to split the video") ) "to split the video") )
ADD_STRING ( "wall_active", NULL, NULL, N_("Active windows"), ADD_STRING ( "wall-active", NULL, NULL, N_("Active windows"),
N_("comma separated list of active windows, defaults to all") ) N_("comma separated list of active windows, defaults to all") )
MODULE_CONFIG_STOP MODULE_CONFIG_STOP
...@@ -138,8 +138,8 @@ static int vout_Create( vout_thread_t *p_vout ) ...@@ -138,8 +138,8 @@ static int vout_Create( vout_thread_t *p_vout )
} }
/* Look what method was requested */ /* Look what method was requested */
p_vout->p_sys->i_col = config_GetIntVariable( "wall_cols" ); p_vout->p_sys->i_col = config_GetIntVariable( "wall-cols" );
p_vout->p_sys->i_row = config_GetIntVariable( "wall_rows" ); p_vout->p_sys->i_row = config_GetIntVariable( "wall-rows" );
p_vout->p_sys->i_col = __MAX( 1, __MIN( 15, p_vout->p_sys->i_col ) ); p_vout->p_sys->i_col = __MAX( 1, __MIN( 15, p_vout->p_sys->i_col ) );
p_vout->p_sys->i_row = __MAX( 1, __MIN( 15, p_vout->p_sys->i_row ) ); p_vout->p_sys->i_row = __MAX( 1, __MIN( 15, p_vout->p_sys->i_row ) );
...@@ -158,7 +158,7 @@ static int vout_Create( vout_thread_t *p_vout ) ...@@ -158,7 +158,7 @@ static int vout_Create( vout_thread_t *p_vout )
return( 1 ); return( 1 );
} }
psz_method_tmp = psz_method = config_GetPszVariable( "wall_active" ); psz_method_tmp = psz_method = config_GetPszVariable( "wall-active" );
/* If no trailing vout are specified, take them all */ /* If no trailing vout are specified, take them all */
if( psz_method == NULL ) if( psz_method == NULL )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment