Commit cecb7e86 authored by Gildas Bazin's avatar Gildas Bazin

* ./include/configuration.h: renamed MODULE_CONFIG_* macros into
CONFIG_*.
* ./include/configuration.h, ./plugins/gtk/gtk_preferences.c,
./plugins/filter/transform.c, ./plugins/filter/distort.c,
./plugins/filter/deinterlace.c: added an ADD_STRING_FROM_LIST()
configuration macro.
* ./include/modules.h, ./include/video_output.h,
./src/video_output/video_output.c, ./plugins/filters/*: added a
VOUT_FILTER capability. Having a clear distinction between VOUTs and
VOUT_FILTERs allows us to get rid of ugly hacks. The filters are also
stackable now (use --filter=foo:bar:foo etc..).
* ./include/configuration.h, ./src/libvlc.h, ./src/libvlc.c: clean-up +
added an ADD_USAGE_HINT() configuration macro.
parent 4d2ae9f0
......@@ -89,7 +89,7 @@ ac_help="$ac_help
ac_help="$ac_help
--enable-directx Win32 DirectX support (default enabled on Win32)"
ac_help="$ac_help
--with-directx=PATH Win32 DirectX headers and libraries"
--with-directx=PATH Win32 DirectX headers"
ac_help="$ac_help
--enable-fb Linux framebuffer support (default enabled on Linux)"
ac_help="$ac_help
......@@ -7388,7 +7388,7 @@ echo "configure:7388: checking for directX headers in ${with_directx}" >&5
if test -f ${with_directx}/ddraw.h
then
PLUGINS="${PLUGINS} directx"
directx_LDFLAGS="${directx_LDFLAGS} -L${with_directx}/lib -lgdi32"
directx_LDFLAGS="${directx_LDFLAGS} -lgdi32"
directx_CFLAGS="${directx_CFLAGS} -I${with_directx}"
echo "$ac_t""yes" 1>&6
else
......
......@@ -1158,7 +1158,7 @@ then
if test x$SYS = xmingw32
then
AC_ARG_WITH(directx,
[ --with-directx=PATH Win32 DirectX headers and libraries])
[ --with-directx=PATH Win32 DirectX headers])
if test "x$with_directx" = "x"
then
AC_CHECK_HEADERS(ddraw.h,
......@@ -1169,7 +1169,7 @@ then
if test -f ${with_directx}/ddraw.h
then
PLUGINS="${PLUGINS} directx"
directx_LDFLAGS="${directx_LDFLAGS} -L${with_directx}/lib -lgdi32"
directx_LDFLAGS="${directx_LDFLAGS} -lgdi32"
directx_CFLAGS="${directx_CFLAGS} -I${with_directx}"
AC_MSG_RESULT(yes)
else
......
......@@ -4,7 +4,7 @@
* It includes functions allowing to declare, get or set configuration options.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: configuration.h,v 1.13 2002/06/01 18:04:48 sam Exp $
* $Id: configuration.h,v 1.14 2002/06/11 09:44:21 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -28,22 +28,23 @@
*****************************************************************************/
/* Configuration hint types */
#define MODULE_CONFIG_HINT_END 0x0001 /* End of config */
#define MODULE_CONFIG_HINT_CATEGORY 0x0002 /* Start of new category */
#define MODULE_CONFIG_HINT_SUBCATEGORY 0x0003 /* Start of sub-category */
#define MODULE_CONFIG_HINT_SUBCATEGORY_END 0x0004 /* End of sub-category */
#define CONFIG_HINT_END 0x0001 /* End of config */
#define CONFIG_HINT_CATEGORY 0x0002 /* Start of new category */
#define CONFIG_HINT_SUBCATEGORY 0x0003 /* Start of sub-category */
#define CONFIG_HINT_SUBCATEGORY_END 0x0004 /* End of sub-category */
#define CONFIG_HINT_USAGE 0x0005 /* Usage information */
#define MODULE_CONFIG_HINT 0x000F
#define CONFIG_HINT 0x000F
/* Configuration item types */
#define MODULE_CONFIG_ITEM_STRING 0x0010 /* String option */
#define MODULE_CONFIG_ITEM_FILE 0x0020 /* File option */
#define MODULE_CONFIG_ITEM_MODULE 0x0030 /* Module option */
#define MODULE_CONFIG_ITEM_INTEGER 0x0040 /* Integer option */
#define MODULE_CONFIG_ITEM_BOOL 0x0050 /* Bool option */
#define MODULE_CONFIG_ITEM_FLOAT 0x0060 /* Float option */
#define CONFIG_ITEM_STRING 0x0010 /* String option */
#define CONFIG_ITEM_FILE 0x0020 /* File option */
#define CONFIG_ITEM_MODULE 0x0030 /* Module option */
#define CONFIG_ITEM_INTEGER 0x0040 /* Integer option */
#define CONFIG_ITEM_BOOL 0x0050 /* Bool option */
#define CONFIG_ITEM_FLOAT 0x0060 /* Float option */
#define MODULE_CONFIG_ITEM 0x00F0
#define CONFIG_ITEM 0x00F0
struct module_config_s
{
......@@ -59,7 +60,9 @@ struct module_config_s
/* Function to call when commiting a change */
void ( * pf_callback ) ( vlc_object_t * );
vlc_mutex_t *p_lock; /* lock to use when modifying the config */
char **ppsz_list; /* List of possible values for the option */
vlc_mutex_t *p_lock; /* Lock to use when modifying the config */
vlc_bool_t b_dirty; /* Dirty flag to indicate a config change */
};
......@@ -100,64 +103,71 @@ VLC_EXPORT( void, config_UnsetCallbacks, ( module_config_t * ) );
/*****************************************************************************
* Macros used to build the configuration structure.
*
* Note that internally we support only 2 types of config data: int and string.
* The other types declared here just map to one of these 2 basic types but
* Note that internally we support only 3 types of config data: int , float
* and string.
* The other types declared here just map to one of these 3 basic types but
* have the advantage of also providing very good hints to a configuration
* interface so as to make it more user friendly.
* The configuration structure also includes category hints. These hints can
* provide a configuration inteface with some very useful data and also allow
* for a more user friendly interface.
* provide a configuration interface with some very useful data and again
* allow for a more user friendly interface.
*****************************************************************************/
#define MODULE_CONFIG_START \
static module_config_t p_config[] = {
#define MODULE_CONFIG_STOP \
{ MODULE_CONFIG_HINT_END, NULL, '\0', NULL, NULL, NULL, 0, 0, NULL, 0 } };
{ CONFIG_HINT_END, NULL, '\0' } };
#define ADD_CATEGORY_HINT( text, longtext ) \
{ MODULE_CONFIG_HINT_CATEGORY, NULL, '\0', text, longtext, NULL, 0, 0, \
NULL, NULL, 0 },
{ CONFIG_HINT_CATEGORY, NULL, '\0', text, longtext },
#define ADD_SUBCATEGORY_HINT( text, longtext ) \
{ MODULE_CONFIG_HINT_SUBCATEGORY, NULL, '\0', text, longtext, NULL, 0, 0, \
NULL, NULL, 0 },
{ CONFIG_HINT_SUBCATEGORY, NULL, '\0', text, longtext },
#define END_SUBCATEGORY_HINT \
{ MODULE_CONFIG_HINT_SUBCATEGORY_END, NULL, '\0', NULL, NULL, NULL, 0, 0, \
NULL, NULL, 0 },
#define ADD_STRING( name, value, p_callback, text, longtext ) \
{ MODULE_CONFIG_ITEM_STRING, name, '\0', text, longtext, value, 0, 0, \
p_callback, NULL, 0 },
{ CONFIG_HINT_SUBCATEGORY_END, NULL, '\0' },
#define ADD_USAGE_HINT( text ) \
{ CONFIG_HINT_USAGE, NULL, '\0', text },
#define ADD_STRING( name, psz_value, p_callback, text, longtext ) \
{ CONFIG_ITEM_STRING, name, '\0', text, longtext, psz_value, 0, 0, \
p_callback },
#define ADD_STRING_FROM_LIST( name, psz_value, ppsz_list, p_callback, text, \
longtext ) \
{ CONFIG_ITEM_STRING, name, '\0', text, longtext, psz_value, 0, 0, \
p_callback, ppsz_list },
#define ADD_FILE( name, psz_value, p_callback, text, longtext ) \
{ MODULE_CONFIG_ITEM_FILE, name, '\0', text, longtext, psz_value, 0, 0, \
p_callback, NULL, 0 },
#define ADD_MODULE( name, i_capability, psz_value, p_callback, text, longtext)\
{ MODULE_CONFIG_ITEM_MODULE, name, '\0', text, longtext, psz_value, \
i_capability, 0, p_callback, NULL, 0 },
{ CONFIG_ITEM_FILE, name, '\0', text, longtext, psz_value, 0, 0, \
p_callback },
#define ADD_MODULE( name, i_caps, psz_value, p_callback, text, longtext ) \
{ CONFIG_ITEM_MODULE, name, '\0', text, longtext, psz_value, i_caps, 0, \
p_callback },
#define ADD_INTEGER( name, i_value, p_callback, text, longtext ) \
{ MODULE_CONFIG_ITEM_INTEGER, name, '\0', text, longtext, NULL, i_value, \
0, p_callback, NULL, 0 },
{ CONFIG_ITEM_INTEGER, name, '\0', text, longtext, NULL, i_value, 0, \
p_callback },
#define ADD_FLOAT( name, f_value, p_callback, text, longtext ) \
{ MODULE_CONFIG_ITEM_FLOAT, name, '\0', text, longtext, NULL, 0, f_value, \
p_callback, NULL, 0 },
{ CONFIG_ITEM_FLOAT, name, '\0', text, longtext, NULL, 0, f_value, \
p_callback },
#define ADD_BOOL( name, b_value, p_callback, text, longtext ) \
{ MODULE_CONFIG_ITEM_BOOL, name, '\0', text, longtext, NULL, b_value, 0, \
p_callback, NULL, 0 },
{ CONFIG_ITEM_BOOL, name, '\0', text, longtext, NULL, b_value, 0, \
p_callback },
/* These should be seldom used. They were added just to provide easy shortcuts
* for the command line interface */
#define ADD_STRING_WITH_SHORT( name, ch, psz_value, p_callback, text, ltext ) \
{ MODULE_CONFIG_ITEM_STRING, name, ch, text, ltext, psz_value, 0, 0, \
p_callback, NULL, 0 },
{ CONFIG_ITEM_STRING, name, ch, text, ltext, psz_value, 0, 0, \
p_callback },
#define ADD_FILE_WITH_SHORT( name, ch, psz_value, p_callback, text, ltext ) \
{ MODULE_CONFIG_ITEM_FILE, name, ch, text, ltext, psz_value, 0, 0, \
p_callback, NULL, 0 },
{ CONFIG_ITEM_FILE, name, ch, text, ltext, psz_value, 0, 0, \
p_callback },
#define ADD_MODULE_WITH_SHORT( name, ch, i_capability, psz_value, p_callback, \
text, ltext) \
{ MODULE_CONFIG_ITEM_MODULE, name, ch, text, ltext, psz_value, \
i_capability, 0, p_callback, NULL, 0 },
{ CONFIG_ITEM_MODULE, name, ch, text, ltext, psz_value, i_capability, 0, \
p_callback },
#define ADD_INTEGER_WITH_SHORT( name, ch, i_value, p_callback, text, ltext ) \
{ MODULE_CONFIG_ITEM_INTEGER, name, ch, text, ltext, NULL, i_value, 0, \
p_callback, NULL, 0 },
{ CONFIG_ITEM_INTEGER, name, ch, text, ltext, NULL, i_value, 0, \
p_callback },
#define ADD_FLOAT_WITH_SHORT( name, ch, f_value, p_callback, text, ltext ) \
{ MODULE_CONFIG_ITEM_FLOAT, name, ch, text, ltext, NULL, 0, f_value, \
p_callback, NULL, 0 },
{ CONFIG_ITEM_FLOAT, name, ch, text, ltext, NULL, 0, f_value, \
p_callback },
#define ADD_BOOL_WITH_SHORT( name, ch, b_value, p_callback, text, ltext ) \
{ MODULE_CONFIG_ITEM_BOOL, name, ch, text, ltext, NULL, b_value, 0, \
p_callback, NULL, 0 },
{ CONFIG_ITEM_BOOL, name, ch, text, ltext, NULL, b_value, 0, \
p_callback },
......@@ -2,7 +2,7 @@
* modules.h : Module management functions.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules.h,v 1.54 2002/06/04 00:11:12 sam Exp $
* $Id: modules.h,v 1.55 2002/06/11 09:44:21 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -39,21 +39,23 @@ typedef void * module_handle_t;
/*****************************************************************************
* Module capabilities.
*****************************************************************************/
#define MODULE_CAPABILITY_MAIN 0 /* Main */
#define MODULE_CAPABILITY_INTF 1 /* Interface */
#define MODULE_CAPABILITY_ACCESS 2 /* Input */
#define MODULE_CAPABILITY_DEMUX 3 /* Input */
#define MODULE_CAPABILITY_NETWORK 4 /* Network */
#define MODULE_CAPABILITY_DECODER 5 /* Audio or video decoder */
#define MODULE_CAPABILITY_MOTION 6 /* Motion compensation */
#define MODULE_CAPABILITY_IDCT 7 /* IDCT transformation */
#define MODULE_CAPABILITY_AOUT 8 /* Audio output */
#define MODULE_CAPABILITY_VOUT 9 /* Video output */
#define MODULE_CAPABILITY_CHROMA 10 /* colorspace conversion */
#define MODULE_CAPABILITY_IMDCT 11 /* IMDCT transformation */
#define MODULE_CAPABILITY_DOWNMIX 12 /* AC3 downmix */
#define MODULE_CAPABILITY_MEMCPY 13 /* memcpy */
#define MODULE_CAPABILITY_MAX 14 /* Total number of capabilities */
#define MODULE_CAPABILITY_MAIN 0 /* Main */
#define MODULE_CAPABILITY_INTF 1 /* Interface */
#define MODULE_CAPABILITY_ACCESS 2 /* Input */
#define MODULE_CAPABILITY_DEMUX 3 /* Input */
#define MODULE_CAPABILITY_NETWORK 4 /* Network */
#define MODULE_CAPABILITY_DECODER 5 /* Audio or video decoder */
#define MODULE_CAPABILITY_MOTION 6 /* Motion compensation */
#define MODULE_CAPABILITY_IDCT 7 /* IDCT transformation */
#define MODULE_CAPABILITY_AOUT 8 /* Audio output */
#define MODULE_CAPABILITY_AOUT_FILTER 9 /* Audio output filter */
#define MODULE_CAPABILITY_VOUT 10 /* Video output */
#define MODULE_CAPABILITY_VOUT_FILTER 11 /* Video output filter */
#define MODULE_CAPABILITY_CHROMA 12 /* colorspace conversion */
#define MODULE_CAPABILITY_IMDCT 13 /* IMDCT transformation */
#define MODULE_CAPABILITY_DOWNMIX 14 /* AC3 downmix */
#define MODULE_CAPABILITY_MEMCPY 15 /* memcpy */
#define MODULE_CAPABILITY_MAX 16 /* Total number of capabilities */
#define DECLARE_MODULE_CAPABILITY_TABLE \
static const char *ppsz_capabilities[] = \
......@@ -67,7 +69,9 @@ typedef void * module_handle_t;
"motion", \
"iDCT", \
"audio output", \
"audio output filter", \
"video output", \
"video output filter", \
"chroma transformation", \
"iMDCT", \
"downmix", \
......
......@@ -5,7 +5,7 @@
* thread, and destroy a previously opened video output thread.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_output.h,v 1.78 2002/06/05 18:07:03 stef Exp $
* $Id: video_output.h,v 1.79 2002/06/11 09:44:21 gbazin Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -136,8 +136,11 @@ struct vout_thread_s
count_t c_jitter_samples; /* number of samples used for the *
* calculation of the jitter */
int i_mouse_x, i_mouse_y, i_mouse_button;
/* Mouse */
int i_mouse_x, i_mouse_y, i_mouse_button;
/* Filter chain */
char *psz_filter_chain;
};
#define I_OUTPUTPICTURES p_vout->output.i_pictures
......@@ -194,4 +197,3 @@ VLC_EXPORT( void, vout_DisplaySubPicture, ( vout_thread_t *, subpict
subpicture_t * vout_SortSubPictures ( vout_thread_t *, mtime_t );
void vout_RenderSubPictures ( vout_thread_t *, picture_t *,
subpicture_t * );
......@@ -2,7 +2,7 @@
* dummy.c : dummy plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: dummy.c,v 1.21 2002/06/01 12:31:58 sam Exp $
* $Id: dummy.c,v 1.22 2002/06/11 09:44:21 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -48,8 +48,8 @@ void _M( intf_getfunctions ) ( function_list_t * p_function_list );
"efficient one.")
MODULE_CONFIG_START
ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
ADD_STRING ( "dummy-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT )
ADD_CATEGORY_HINT( N_("Video"), NULL )
ADD_STRING ( "dummy-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT )
MODULE_CONFIG_STOP
......
......@@ -2,7 +2,7 @@
* clone.c : Clone video plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: clone.c,v 1.6 2002/06/01 18:04:48 sam Exp $
* $Id: clone.c,v 1.7 2002/06/11 09:44:21 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -41,17 +41,20 @@ static void vout_getfunctions( function_list_t * p_function_list );
/*****************************************************************************
* Build configuration tree.
*****************************************************************************/
#define COUNT_TEXT N_("Number of clones")
#define COUNT_LONGTEXT N_("Select the number of video windows in which to "\
"clone the video")
MODULE_CONFIG_START
ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
ADD_INTEGER ( "clone-count", 2, NULL, N_("Number of clones"),
N_("Select the number of videowindows in which to clone the video") )
ADD_INTEGER ( "clone-count", 2, NULL, COUNT_TEXT, COUNT_LONGTEXT )
MODULE_CONFIG_STOP
MODULE_INIT_START
SET_DESCRIPTION( _("image clone video module") )
/* Capability score set to 0 because we don't want to be spawned
* as a video output unless explicitly requested to */
ADD_CAPABILITY( VOUT, 0 )
ADD_CAPABILITY( VOUT_FILTER, 0 )
ADD_SHORTCUT( "clone" )
MODULE_INIT_STOP
......@@ -143,7 +146,6 @@ static int vout_Create( vout_thread_t *p_vout )
static int vout_Init( vout_thread_t *p_vout )
{
int i_index, i_vout;
char *psz_filter;
picture_t *p_pic;
I_OUTPUTPICTURES = 0;
......@@ -155,9 +157,6 @@ static int vout_Init( vout_thread_t *p_vout )
p_vout->output.i_aspect = p_vout->render.i_aspect;
/* Try to open the real video output */
psz_filter = config_GetPsz( p_vout, "filter" );
config_PutPsz( p_vout, "filter", NULL );
msg_Dbg( p_vout, "spawning the real video outputs" );
for( i_vout = 0; i_vout < p_vout->p_sys->i_clones; i_vout++ )
......@@ -172,15 +171,10 @@ static int vout_Init( vout_thread_t *p_vout )
p_vout->p_sys->i_clones );
p_vout->p_sys->i_clones = i_vout;
RemoveAllVout( p_vout );
config_PutPsz( p_vout, "filter", psz_filter );
if( psz_filter ) free( psz_filter );
return 0;
}
}
config_PutPsz( p_vout, "filter", psz_filter );
if( psz_filter ) free( psz_filter );
ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );
return( 0 );
......
......@@ -2,7 +2,7 @@
* crop.c : Crop video plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: crop.c,v 1.2 2002/06/02 09:03:54 sam Exp $
* $Id: crop.c,v 1.3 2002/06/11 09:44:21 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -41,17 +41,23 @@ static void vout_getfunctions( function_list_t * p_function_list );
/*****************************************************************************
* Build configuration tree.
*****************************************************************************/
#define GEOMETRY_TEXT N_("Crop geometry")
#define GEOMETRY_LONGTEXT N_("Set the geometry of the zone to crop")
#define AUTOCROP_TEXT N_("Automatic cropping")
#define AUTOCROP_LONGTEXT N_("Activate automatic black border cropping")
MODULE_CONFIG_START
ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
ADD_STRING ( "crop-geometry", NULL, NULL, N_("Crop geometry"), N_("Set the geometry of the zone to crop") )
ADD_BOOL ( "autocrop", 0, NULL, N_("Automatic cropping"), N_("Activate automatic black border cropping") )
ADD_STRING ( "crop-geometry", NULL, NULL, GEOMETRY_TEXT, GEOMETRY_LONGTEXT )
ADD_BOOL ( "autocrop", 0, NULL, AUTOCROP_TEXT, AUTOCROP_LONGTEXT )
MODULE_CONFIG_STOP
MODULE_INIT_START
SET_DESCRIPTION( _("image crop video module") )
/* Capability score set to 0 because we don't want to be spawned
* as a video output unless explicitly requested to */
ADD_CAPABILITY( VOUT, 0 )
ADD_CAPABILITY( VOUT_FILTER, 0 )
ADD_SHORTCUT( "crop" )
MODULE_INIT_STOP
......@@ -250,9 +256,6 @@ static int vout_Init( vout_thread_t *p_vout )
* p_vout->p_sys->i_width / p_vout->output.i_width;
/* Try to open the real video output */
psz_var = config_GetPsz( p_vout, "filter" );
config_PutPsz( p_vout, "filter", NULL );
p_vout->p_sys->p_vout =
vout_CreateThread( p_vout,
p_vout->p_sys->i_width, p_vout->p_sys->i_height,
......@@ -260,14 +263,9 @@ static int vout_Init( vout_thread_t *p_vout )
if( p_vout->p_sys->p_vout == NULL )
{
msg_Err( p_vout, "failed to create vout" );
config_PutPsz( p_vout, "filter", psz_var );
if( psz_var ) free( psz_var );
return 0;
}
config_PutPsz( p_vout, "filter", psz_var );
if( psz_var ) free( psz_var );
ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );
return 0;
......@@ -494,4 +492,3 @@ static void UpdateStats( vout_thread_t *p_vout, picture_t *p_pic )
p_vout->p_sys->b_changed = 1;
}
......@@ -2,7 +2,7 @@
* deinterlace.c : deinterlacer plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: deinterlace.c,v 1.16 2002/06/10 00:41:08 sam Exp $
* $Id: deinterlace.c,v 1.17 2002/06/11 09:44:21 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -54,17 +54,22 @@ static void Merge ( void *, const void *, const void *, size_t );
/*****************************************************************************
* Build configuration tree.
*****************************************************************************/
#define MODE_TEXT N_("Deinterlace mode")
#define MODE_LONGTEXT N_("one of \"discard\", \"blend\", \"mean\", \"bob\" or \"linear\"")
static char *mode_list[] = { "discard", "blend", "mean", "bob", "linear", NULL };
MODULE_CONFIG_START
ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
ADD_STRING ( "deinterlace-mode", "discard", NULL, N_("Deinterlace mode"),
N_("one of \"discard\", \"blend\", \"mean\", \"bob\" or \"linear\"") )
ADD_STRING_FROM_LIST ( "deinterlace-mode", "discard", mode_list, NULL, \
MODE_TEXT, MODE_LONGTEXT )
MODULE_CONFIG_STOP
MODULE_INIT_START
SET_DESCRIPTION( _("deinterlacing module") )
/* Capability score set to 0 because we don't want to be spawned
* as a video output unless explicitly requested to */
ADD_CAPABILITY( VOUT, 0 )
ADD_CAPABILITY( VOUT_FILTER, 0 )
ADD_SHORTCUT( "deinterlace" )
MODULE_INIT_STOP
......@@ -193,7 +198,6 @@ static int vout_Create( vout_thread_t *p_vout )
static int vout_Init( vout_thread_t *p_vout )
{
int i_index;
char *psz_filter;
picture_t *p_pic;
I_OUTPUTPICTURES = 0;
......@@ -218,9 +222,6 @@ static int vout_Init( vout_thread_t *p_vout )
}
/* Try to open the real video output, with half the height our images */
psz_filter = config_GetPsz( p_vout, "filter" );
config_PutPsz( p_vout, "filter", NULL );
msg_Dbg( p_vout, "spawning the real video output" );
switch( p_vout->render.i_chroma )
......@@ -260,9 +261,6 @@ static int vout_Init( vout_thread_t *p_vout )
break;
}
config_PutPsz( p_vout, "filter", psz_filter );
if( psz_filter ) free( psz_filter );
/* Everything failed */
if( p_vout->p_sys->p_vout == NULL )
{
......@@ -623,4 +621,3 @@ static void Merge( void *p_dest, const void *p_s1,
*(u8*)p_dest++ = ( (u16)(*(u8*)p_s1++) + (u16)(*(u8*)p_s2++) ) >> 1;
}
}
......@@ -2,7 +2,7 @@
* distort.c : Misc video effects plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: distort.c,v 1.15 2002/06/01 18:04:48 sam Exp $
* $Id: distort.c,v 1.16 2002/06/11 09:44:21 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -46,17 +46,21 @@ static void vout_getfunctions( function_list_t * p_function_list );
/*****************************************************************************
* Build configuration tree.
*****************************************************************************/
#define MODE_TEXT N_("Distort mode")
#define MODE_LONGTEXT N_("one of \"wave\" and \"ripple\"")
static char *mode_list[] = { "wave", "ripple", NULL };
MODULE_CONFIG_START
ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
ADD_STRING ( "distort-mode", "wave", NULL, N_("distort mode"),
N_("one of \"wave\" and \"ripple\"") )
ADD_STRING_FROM_LIST( "distort-mode", "wave", mode_list, NULL, MODE_TEXT, MODE_LONGTEXT )
MODULE_CONFIG_STOP
MODULE_INIT_START
SET_DESCRIPTION( _("miscellaneous video effects module") )
/* Capability score set to 0 because we don't want to be spawned
* as a video output unless explicitly requested to */
ADD_CAPABILITY( VOUT, 0 )
ADD_CAPABILITY( VOUT_FILTER, 0 )
ADD_SHORTCUT( "distort" )
MODULE_INIT_STOP
......@@ -190,7 +194,6 @@ static int vout_Create( vout_thread_t *p_vout )
static int vout_Init( vout_thread_t *p_vout )
{
int i_index;
char *psz_filter;
picture_t *p_pic;
I_OUTPUTPICTURES = 0;
......@@ -202,9 +205,6 @@ static int vout_Init( vout_thread_t *p_vout )
p_vout->output.i_aspect = p_vout->render.i_aspect;
/* Try to open the real video output */
psz_filter = config_GetPsz( p_vout, "filter" );
config_PutPsz( p_vout, "filter", NULL );
msg_Dbg( p_vout, "spawning the real video output" );
p_vout->p_sys->p_vout =
......@@ -212,9 +212,6 @@ static int vout_Init( vout_thread_t *p_vout )
p_vout->render.i_width, p_vout->render.i_height,
p_vout->render.i_chroma, p_vout->render.i_aspect );
config_PutPsz( p_vout, "filter", psz_filter );
if( psz_filter ) free( psz_filter );
/* Everything failed */
if( p_vout->p_sys->p_vout == NULL )
{
......@@ -466,4 +463,3 @@ static void DistortRipple( vout_thread_t *p_vout, picture_t *p_inpic,
}
}
}
......@@ -2,7 +2,7 @@
* invert.c : Invert video plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: invert.c,v 1.13 2002/06/01 18:04:48 sam Exp $
* $Id: invert.c,v 1.14 2002/06/11 09:44:21 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -48,7 +48,7 @@ MODULE_INIT_START
SET_DESCRIPTION( _("invert video module") )
/* Capability score set to 0 because we don't want to be spawned
* as a video output unless explicitly requested to */
ADD_CAPABILITY( VOUT, 0 )
ADD_CAPABILITY( VOUT_FILTER, 0 )
ADD_SHORTCUT( "invert" )
MODULE_INIT_STOP
......@@ -120,7 +120,6 @@ static int vout_Create( vout_thread_t *p_vout )
static int vout_Init( vout_thread_t *p_vout )
{
int i_index;
char *psz_filter;
picture_t *p_pic;
I_OUTPUTPICTURES = 0;
......@@ -132,9 +131,6 @@ static int vout_Init( vout_thread_t *p_vout )
p_vout->output.i_aspect = p_vout->render.i_aspect;
/* Try to open the real video output */
psz_filter = config_GetPsz( p_vout, "filter" );
config_PutPsz( p_vout, "filter", NULL );
msg_Dbg( p_vout, "spawning the real video output" );
p_vout->p_sys->p_vout =
......@@ -142,9 +138,6 @@ static int vout_Init( vout_thread_t *p_vout )
p_vout->render.i_width, p_vout->render.i_height,
p_vout->render.i_chroma, p_vout->render.i_aspect );
config_PutPsz( p_vout, "filter", psz_filter );
if( psz_filter ) free( psz_filter );
/* Everything failed */
if( p_vout->p_sys->p_vout == NULL )
{
......
......@@ -2,7 +2,7 @@
* transform.c : transform image plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: transform.c,v 1.14 2002/06/01 18:04:48 sam Exp $
* $Id: transform.c,v 1.15 2002/06/11 09:44:21 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -47,17 +47,21 @@ static void vout_getfunctions( function_list_t * p_function_list );
/*****************************************************************************
* Build configuration tree.
*****************************************************************************/
#define TYPE_TEXT N_("Transform type")
#define TYPE_LONGTEXT N_("One of '90', '180', '270', 'hflip' and 'vflip'")
static char *type_list[] = { "90", "180", "270", "hflip", "vflip", NULL };
MODULE_CONFIG_START
ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
ADD_STRING("transform-type", "90", NULL, N_("Transform type"),
N_("One of '90', '180', '270', 'hflip' and 'vflip'"))
ADD_STRING_FROM_LIST("transform-type", "90", type_list, NULL, TYPE_TEXT, TYPE_LONGTEXT)
MODULE_CONFIG_STOP
MODULE_INIT_START
SET_DESCRIPTION( _("image transformation module") )
/* Capability score set to 0 because we don't want to be spawned
* as a video output unless explicitly requested to */
ADD_CAPABILITY( VOUT, 0 )
ADD_CAPABILITY( VOUT_FILTER, 0 )
ADD_SHORTCUT( "transform" )
MODULE_INIT_STOP
......@@ -180,7 +184,6 @@ static int vout_Create( vout_thread_t *p_vout )
static int vout_Init( vout_thread_t *p_vout )
{
int i_index;
char *psz_filter;
picture_t *p_pic;
I_OUTPUTPICTURES = 0;
......@@ -192,9 +195,6 @@ static int vout_Init( vout_thread_t *p_vout )
p_vout->output.i_aspect = p_vout->render.i_aspect;
/* Try to open the real video output */
psz_filter = config_GetPsz( p_vout, "filter" );
config_PutPsz( p_vout, "filter", NULL );
msg_Dbg( p_vout, "spawning the real video output" );
if( p_vout->p_sys->b_rotation )
......@@ -214,9 +214,6 @@ static int vout_Init( vout_thread_t *p_vout )
p_vout->render.i_chroma, p_vout->render.i_aspect );
}
config_PutPsz( p_vout, "filter", psz_filter );
if( psz_filter ) free( psz_filter );
/* Everything failed */
if( p_vout->p_sys->p_vout == NULL )
{
......@@ -431,4 +428,3 @@ static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
{
;
}
......@@ -2,7 +2,7 @@
* wall.c : Wall video plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: wall.c,v 1.22 2002/06/01 18:04:48 sam Exp $
* $Id: wall.c,v 1.23 2002/06/11 09:44:21 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -41,23 +41,30 @@ static void vout_getfunctions( function_list_t * p_function_list );
/*****************************************************************************
* Build configuration tree.
*****************************************************************************/
#define COLS_TEXT N_("Number of columns")
#define COLS_LONGTEXT N_("Select the number of horizontal videowindows in " \
"which to split the video")
#define ROWS_TEXT N_("Number of rows")
#define ROWS_LONGTEXT N_("Select the number of vertical videowindows in " \
"which to split the video")
#define ACTIVE_TEXT N_("Active windows")
#define ACTIVE_LONGTEXT N_("comma separated list of active windows, " \
"defaults to all")
MODULE_CONFIG_START
ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )