/*****************************************************************************
* adjust.c : Contrast/Hue/Saturation/Brightness video plugin for vlc
*****************************************************************************
- * Copyright (C) 2000, 2001 VideoLAN
- * $Id: adjust.c,v 1.8 2003/01/09 17:47:05 sam Exp $
+ * Copyright (C) 2000, 2001, 2002, 2003 VideoLAN
+ * $Id: adjust.c,v 1.13 2003/05/26 01:25:12 hartman Exp $
*
- * Authors: Simon Latapie <garf@via.ecp.fr>, Samuel Hocevar <sam@zoy.org>
+ * Authors: Simon Latapie <garf@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
static void End ( vout_thread_t * );
static void Render ( vout_thread_t *, picture_t * );
+static int SendEvents( vlc_object_t *, char const *,
+ vlc_value_t, vlc_value_t, void * );
+
/*****************************************************************************
* Module descriptor
*****************************************************************************/
-#define CONT_TEXT N_("set image contrast")
-#define CONT_LONGTEXT N_("Set the image contrast. Defaults to 1")
-#define HUE_TEXT N_("set image hue")
+#define CONT_TEXT N_("Set image contrast")
+#define CONT_LONGTEXT N_("Set the image contrast, between 0 and 2. Defaults to 1")
+#define HUE_TEXT N_("Set image hue")
#define HUE_LONGTEXT N_("Set the image hue, between 0 and 360. Defaults to 0")
-#define SAT_TEXT N_("set image saturation")
-#define SAT_LONGTEXT N_("Set the image saturation. Defaults to 1")
-#define LUM_TEXT N_("set image brightness")
-#define LUM_LONGTEXT N_("Set the image brightness. Defaults to 1")
+#define SAT_TEXT N_("Set image saturation")
+#define SAT_LONGTEXT N_("Set the image saturation, between 0 and 3. Defaults to 1")
+#define LUM_TEXT N_("Set image brightness")
+#define LUM_LONGTEXT N_("Set the image brightness, between 0 and 2. Defaults to 1")
vlc_module_begin();
- add_category_hint( N_("Adjust"), NULL );
- add_float_with_range( "contrast", 1.0, 0.0, 2.0, NULL, CONT_TEXT, CONT_LONGTEXT );
- add_float_with_range( "brightness", 1.0, 0.0, 2.0, NULL, LUM_TEXT, LUM_LONGTEXT );
- add_integer_with_range( "hue", 0, 0, 360, NULL, HUE_TEXT, HUE_LONGTEXT );
- add_float_with_range( "saturation", 1.0, 0.0, 3.0, NULL, SAT_TEXT, SAT_LONGTEXT );
+ add_category_hint( N_("Adjust"), NULL, VLC_FALSE );
+ add_float_with_range( "contrast", 1.0, 0.0, 2.0, NULL, CONT_TEXT, CONT_LONGTEXT, VLC_FALSE );
+ add_float_with_range( "brightness", 1.0, 0.0, 2.0, NULL, LUM_TEXT, LUM_LONGTEXT, VLC_FALSE );
+ add_integer_with_range( "hue", 0, 0, 360, NULL, HUE_TEXT, HUE_LONGTEXT, VLC_FALSE );
+ add_float_with_range( "saturation", 1.0, 0.0, 3.0, NULL, SAT_TEXT, SAT_LONGTEXT, VLC_FALSE );
set_description( _("contrast/hue/saturation/brightness filter") );
set_capability( "video filter", 0 );
add_shortcut( "adjust" );
ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );
+ ADD_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
+
return VLC_SUCCESS;
}
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
+ DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
+ vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
free( p_vout->p_sys );
vout_DisplayPicture( p_vout->p_sys->p_vout, p_outpic );
}
+/*****************************************************************************
+ * SendEvents: forward mouse and keyboard events to the parent p_vout
+ *****************************************************************************/
+static int SendEvents( vlc_object_t *p_this, char const *psz_var,
+ vlc_value_t oldval, vlc_value_t newval, void *p_data )
+{
+ var_Set( (vlc_object_t *)p_data, psz_var, newval );
+
+ return VLC_SUCCESS;
+}
+