X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvisualization%2Fvisual%2Fvisual.c;h=818c9196db4c577dc8302b76bf1cd8c5f85becc6;hb=fa4bde0b26a6c7a2a617362ea0b17144686e39fe;hp=120bb9e97557dfebea3f10b0e5620fa2c7078fbb;hpb=6db0571780959d6dbf1071db895e5fa76f9b55e8;p=vlc diff --git a/modules/visualization/visual/visual.c b/modules/visualization/visual/visual.c index 120bb9e975..818c9196db 100644 --- a/modules/visualization/visual/visual.c +++ b/modules/visualization/visual/visual.c @@ -1,16 +1,16 @@ /***************************************************************************** * visual.c : Visualisation system ***************************************************************************** - * Copyright (C) 2002 VideoLAN - * $Id: visual.c,v 1.1 2003/08/19 21:20:00 zorglub Exp $ + * Copyright (C) 2002-2006 the VideoLAN team + * $Id$ * - * Authors: Clément Stenac + * Authors: Clément Stenac * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -18,204 +18,313 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ /***************************************************************************** * Preamble *****************************************************************************/ -#include "visual.h" +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif -#include - -/***************************************************************************** - * Local prototypes - *****************************************************************************/ -static int Open ( vlc_object_t * ); -static void Close ( vlc_object_t * ); +#include +#include +#include +#include -static void DoWork ( aout_instance_t *, aout_filter_t *, aout_buffer_t *, - aout_buffer_t * ); +#include "visual.h" /***************************************************************************** * Module descriptor *****************************************************************************/ #define ELIST_TEXT N_( "Effects list" ) #define ELIST_LONGTEXT N_( \ - "A list of visual effect, separated by semi-commas." \ - "Arguments may be passed to effects using syntax " \ - " effect={arg=val,arg=val};effect={arg=val,arg=val},..." ) + "A list of visual effect, separated by commas.\n" \ + "Current effects include: dummy, scope, spectrum." ) #define WIDTH_TEXT N_( "Video width" ) -#define HEIGHT_LONGTEXT N_( \ - "The width of the effects video window, in pixels." ) - -#define HEIGHT_TEXT N_( "Video width" ) #define WIDTH_LONGTEXT N_( \ "The width of the effects video window, in pixels." ) -vlc_module_begin(); - add_category_hint( N_("visualizer") , NULL , VLC_FALSE); - set_description( _("visualizer filter") ); - add_string("effect-list", "dummy", NULL, - ELIST_TEXT, ELIST_LONGTEXT, VLC_TRUE ); +#define HEIGHT_TEXT N_( "Video height" ) +#define HEIGHT_LONGTEXT N_( \ + "The height of the effects video window, in pixels." ) + +#define NBBANDS_TEXT N_( "Number of bands" ) +#define NBBANDS_LONGTEXT N_( \ + "Number of bands used by spectrum analyzer, should be 20 or 80." ) +#define SPNBBANDS_LONGTEXT N_( \ + "Number of bands used by the spectrometer, from 20 to 80." ) + +#define SEPAR_TEXT N_( "Band separator" ) +#define SEPAR_LONGTEXT N_( \ + "Number of blank pixels between bands.") + +#define AMP_TEXT N_( "Amplification" ) +#define AMP_LONGTEXT N_( \ + "This is a coefficient that modifies the height of the bands.") + +#define PEAKS_TEXT N_( "Enable peaks" ) +#define PEAKS_LONGTEXT N_( \ + "Draw \"peaks\" in the spectrum analyzer." ) + +#define ORIG_TEXT N_( "Enable original graphic spectrum" ) +#define ORIG_LONGTEXT N_( \ + "Enable the \"flat\" spectrum analyzer in the spectrometer." ) + +#define BANDS_TEXT N_( "Enable bands" ) +#define BANDS_LONGTEXT N_( \ + "Draw bands in the spectrometer." ) + +#define BASE_TEXT N_( "Enable base" ) +#define BASE_LONGTEXT N_( \ + "Defines whether to draw the base of the bands." ) + +#define RADIUS_TEXT N_( "Base pixel radius" ) +#define RADIUS_LONGTEXT N_( \ + "Defines radius size in pixels, of base of bands(beginning)." ) + +#define SSECT_TEXT N_( "Spectral sections" ) +#define SSECT_LONGTEXT N_( \ + "Determines how many sections of spectrum will exist." ) + +#define PEAK_HEIGHT_TEXT N_( "Peak height" ) +#define PEAK_HEIGHT_LONGTEXT N_( \ + "Total pixel height of the peak items." ) + +#define PEAK_WIDTH_TEXT N_( "Peak extra width" ) +#define PEAK_WIDTH_LONGTEXT N_( \ + "Additions or subtractions of pixels on the peak width." ) + +#define COLOR1_TEXT N_( "V-plane color" ) +#define COLOR1_LONGTEXT N_( \ + "YUV-Color cube shifting across the V-plane ( 0 - 127 )." ) + +#define STARS_TEXT N_( "Number of stars" ) +#define STARS_LONGTEXT N_( \ + "Number of stars to draw with random effect." ) + +static int Open ( vlc_object_t * ); +static void Close ( vlc_object_t * ); + +vlc_module_begin () + set_shortname( N_("Visualizer")) + set_category( CAT_AUDIO ) + set_subcategory( SUBCAT_AUDIO_VISUAL ) + set_description( N_("Visualizer filter") ) + set_section( N_( "General") , NULL ) + add_string("effect-list", "spectrum", NULL, + ELIST_TEXT, ELIST_LONGTEXT, true ) add_integer("effect-width",VOUT_WIDTH,NULL, - WIDTH_TEXT, WIDTH_LONGTEXT, VLC_FALSE ); + WIDTH_TEXT, WIDTH_LONGTEXT, false ) add_integer("effect-height" , VOUT_HEIGHT , NULL, - HEIGHT_TEXT, HEIGHT_LONGTEXT, VLC_FALSE ); - set_capability( "audio filter", 0 ); - set_callbacks( Open, Close ); - add_shortcut( "visualizer"); -vlc_module_end(); + HEIGHT_TEXT, HEIGHT_LONGTEXT, false ) + set_section( N_("Spectrum analyser") , NULL ) + add_integer("visual-nbbands", 80, NULL, + NBBANDS_TEXT, NBBANDS_LONGTEXT, true ) + add_integer("visual-separ", 1, NULL, + SEPAR_TEXT, SEPAR_LONGTEXT, true ) + add_integer("visual-amp", 3, NULL, + AMP_TEXT, AMP_LONGTEXT, true ) + add_bool("visual-peaks", true, NULL, + PEAKS_TEXT, PEAKS_LONGTEXT, true ) + set_section( N_("Spectrometer") , NULL ) + add_bool("spect-show-original", false, NULL, + ORIG_TEXT, ORIG_LONGTEXT, true ) + add_bool("spect-show-base", true, NULL, + BASE_TEXT, BASE_LONGTEXT, true ) + add_integer("spect-radius", 42, NULL, + RADIUS_TEXT, RADIUS_LONGTEXT, true ) + add_integer("spect-sections", 3, NULL, + SSECT_TEXT, SSECT_LONGTEXT, true ) + add_integer("spect-color", 80, NULL, + COLOR1_TEXT, COLOR1_LONGTEXT, true ) + add_bool("spect-show-bands", true, NULL, + BANDS_TEXT, BANDS_LONGTEXT, true ) + add_integer("spect-nbbands", 32, NULL, + NBBANDS_TEXT, SPNBBANDS_LONGTEXT, true ) + add_integer("spect-separ", 1, NULL, + SEPAR_TEXT, SEPAR_LONGTEXT, true ) + add_integer("spect-amp", 8, NULL, + AMP_TEXT, AMP_LONGTEXT, true ) + add_bool("spect-show-peaks", true, NULL, + PEAKS_TEXT, PEAKS_LONGTEXT, true ) + add_integer("spect-peak-width", 61, NULL, + PEAK_WIDTH_TEXT, PEAK_WIDTH_LONGTEXT, true ) + add_integer("spect-peak-height", 1, NULL, + PEAK_HEIGHT_TEXT, PEAK_HEIGHT_LONGTEXT, true ) + set_capability( "visualization", 0 ) + set_callbacks( Open, Close ) + add_shortcut( "visualizer") +vlc_module_end () + + +/***************************************************************************** + * Local prototypes + *****************************************************************************/ +static void DoWork( aout_instance_t *, aout_filter_t *, + aout_buffer_t *, aout_buffer_t * ); +static int FilterCallback( vlc_object_t *, char const *, + vlc_value_t, vlc_value_t, void * ); +static const struct +{ + const char *psz_name; + int (*pf_run)( visual_effect_t *, aout_instance_t *, + aout_buffer_t *, picture_t *); +} pf_effect_run[]= +{ + { "scope", scope_Run }, + { "vuMeter", vuMeter_Run }, + { "spectrum", spectrum_Run }, + { "spectrometer", spectrometer_Run }, + { "dummy", dummy_Run}, + { NULL, dummy_Run} +}; /***************************************************************************** * Open: open the visualizer *****************************************************************************/ static int Open( vlc_object_t *p_this ) { - aout_filter_t *p_filter = (aout_filter_t *)p_this; - - char *psz_effects; - char *psz_eof; /* Used to parse effect list */ - char *psz_eoa, *psz_boa; /* Used to parse arg lists */ - - vlc_bool_t b_end = VLC_FALSE; - - visual_effect_t *p_current_effect = NULL; - - if( (p_filter->input.i_format != VLC_FOURCC('f','l','3','2') - && p_filter->input.i_format != VLC_FOURCC('f','i','3','2')) ) - { - return -1; - } + aout_filter_t *p_filter = (aout_filter_t *)p_this; + aout_filter_sys_t *p_sys; + vlc_value_t val; + + char *psz_effects, *psz_parser; + video_format_t fmt; - p_filter->p_sys = malloc(sizeof(struct aout_filter_sys_t)); - if ( p_filter->p_sys == NULL ) + + if( ( p_filter->input.i_format != VLC_FOURCC('f','l','3','2') && + p_filter->input.i_format != VLC_FOURCC('f','i','3','2') ) ) { - msg_Err( p_filter, "out of memory" ); - return -1; + return VLC_EGENERIC; } - p_filter->p_sys->i_height = config_GetInt( p_filter , "effect-height"); - p_filter->p_sys->i_width = config_GetInt( p_filter , "effect-width"); - + p_sys = p_filter->p_sys = malloc( sizeof( aout_filter_sys_t ) ); + if( p_sys == NULL ) + return VLC_EGENERIC; + + p_sys->i_height = config_GetInt( p_filter , "effect-height"); + p_sys->i_width = config_GetInt( p_filter , "effect-width"); + + if( p_sys->i_height < 20 ) p_sys->i_height = 20; + if( p_sys->i_width < 20 ) p_sys->i_width = 20; + if( (p_sys->i_height % 2 ) != 0 ) p_sys->i_height--; + if( (p_sys->i_width % 2 ) != 0 ) p_sys->i_width--; + + p_sys->i_effect = 0; + p_sys->effect = NULL; + /* Parse the effect list */ - psz_effects = config_GetPsz( p_filter, "effect-list" ); - msg_Dbg( p_filter , "Building list of effects" ); - - p_filter->p_sys->p_first_effect = - (visual_effect_t *)malloc( sizeof( visual_effect_t ) ); - if( !p_filter->p_sys->p_first_effect ) - { - msg_Err( p_filter, "Out of memory" ); - return -1; - } + var_Create( p_filter, "effect-list", VLC_VAR_STRING | VLC_VAR_DOINHERIT ); + var_Get( p_filter, "effect-list", &val); + psz_parser = psz_effects = strdup( val.psz_string ); + free( val.psz_string ); - p_current_effect = p_filter->p_sys->p_first_effect; - p_current_effect->p_next = NULL; - -#define SEARCH(name , function ) \ - if(!strncmp( psz_effects , name, strlen(name) ) ) \ - { \ - p_current_effect->p_next = \ - (visual_effect_t *)malloc( sizeof( visual_effect_t ) ); \ - if( !p_current_effect ) \ - { \ - msg_Err( p_filter, "Out of memory" ); \ - } \ - p_current_effect = p_current_effect -> p_next; \ - p_current_effect->pf_run = NULL; \ - p_current_effect->p_next = NULL; \ - p_current_effect->i_width = p_filter->p_sys->i_width; \ - p_current_effect->i_height = p_filter->p_sys->i_height; \ - p_current_effect->pf_run = function ; \ - p_current_effect->psz_args = NULL; \ - psz_boa = strchr( psz_effects, '{' ); \ - if( psz_boa ) \ - { \ - psz_eoa = strchr( psz_effects, '}'); \ - if( ! psz_eoa ) \ - { \ - msg_Err( p_filter, "Unable to parse effect list. Aborting"); \ - return -1; \ - } \ - *psz_eoa = '\0'; \ - p_current_effect->psz_args = strdup(++psz_boa); \ - psz_effects = psz_eoa; \ - } \ - msg_Dbg(p_filter, "Adding filter: %s ( %s )",name, \ - p_current_effect->psz_args); \ - } - - while(1) + var_AddCallback( p_filter, "effect-list", FilterCallback, NULL ); + + while( psz_parser && *psz_parser != '\0' ) { - psz_eof = strchr( psz_effects , ';' ); - if( !psz_eof ) + visual_effect_t *p_effect; + int i; + + p_effect = malloc( sizeof( visual_effect_t ) ); + if( !p_effect ) + break; + p_effect->i_width = p_sys->i_width; + p_effect->i_height= p_sys->i_height; + p_effect->i_nb_chans = aout_FormatNbChannels( &p_filter->input); + p_effect->psz_args = NULL; + p_effect->p_data = NULL; + + p_effect->pf_run = NULL; + p_effect->psz_name = NULL; + + for( i = 0; pf_effect_run[i].psz_name != NULL; i++ ) { - b_end = VLC_TRUE; - psz_eof = strchr( psz_effects,'\0'); + if( !strncasecmp( psz_parser, + pf_effect_run[i].psz_name, + strlen( pf_effect_run[i].psz_name ) ) ) + { + p_effect->pf_run = pf_effect_run[i].pf_run; + p_effect->psz_name = strdup( pf_effect_run[i].psz_name ); + break; + } } - if( psz_eof ) + + if( p_effect->psz_name ) { - *psz_eof = '\0'; - } - + psz_parser += strlen( p_effect->psz_name ); + + if( *psz_parser == '{' ) + { + char *psz_eoa; + + psz_parser++; - SEARCH("dummy",dummy_Run); - SEARCH("scope",scope_Run); - SEARCH("random",random_Run); - SEARCH("spectrum",spectrum_Run); - - psz_effects = psz_eof; - psz_effects ++; + if( ( psz_eoa = strchr( psz_parser, '}') ) == NULL ) + { + msg_Err( p_filter, "unable to parse effect list. Aborting"); + break; + } + p_effect->psz_args = + strndup( psz_parser, psz_eoa - psz_parser); + } + TAB_APPEND( p_sys->i_effect, p_sys->effect, p_effect ); + } + else + { + msg_Err( p_filter, "unknown visual effect: %s", psz_parser ); + free( p_effect ); + } - if( !* psz_effects || b_end == VLC_TRUE ) + if( strchr( psz_parser, ',' ) ) + { + psz_parser = strchr( psz_parser, ',' ) + 1; + } + else if( strchr( psz_parser, ':' ) ) + { + psz_parser = strchr( psz_parser, ':' ) + 1; + } + else + { break; + } } - - p_filter->pf_do_work = DoWork; - p_filter->b_in_place= 0; - /* Open the video output */ - p_filter->p_sys->p_vout = - vout_Create( p_filter, p_filter->p_sys->i_width, - p_filter->p_sys->i_height, - VLC_FOURCC('I','4','2','0'), - VOUT_ASPECT_FACTOR * p_filter->p_sys->i_width/ - p_filter->p_sys->i_height ); - - if( p_filter->p_sys->p_vout == NULL ) + free( psz_effects ); + + if( !p_sys->i_effect ) { - msg_Err( p_filter, "no suitable vout module" ); - if(p_filter->p_sys) - free( p_filter->p_sys ); - return -1; + msg_Err( p_filter, "no effects found" ); + free( p_sys ); + return VLC_EGENERIC; } - - msg_Dbg(p_filter,"Visualizer initialized"); - return 0 ; -} -/****************************************************************************** - * SparseCopy: trivially downmix or upmix a buffer - ****************************************************************************** - * Pasted from trivial.c * - *****************************************************************************/ -static void SparseCopy( s32 * p_dest, const s32 * p_src, size_t i_len, - int i_output_stride, int i_input_stride ) -{ - int i; - for ( i = i_len; i--; ) + /* Open the video output */ + memset( &fmt, 0, sizeof(video_format_t) ); + + fmt.i_width = fmt.i_visible_width = p_sys->i_width; + fmt.i_height = fmt.i_visible_height = p_sys->i_height; + fmt.i_chroma = VLC_FOURCC('I','4','2','0'); + fmt.i_aspect = VOUT_ASPECT_FACTOR * p_sys->i_width/p_sys->i_height; + fmt.i_sar_num = fmt.i_sar_den = 1; + + p_sys->p_vout = aout_filter_RequestVout( p_filter, NULL, &fmt ); + if( p_sys->p_vout == NULL ) { - int j; - for ( j = 0; j < i_output_stride; j++ ) - { - p_dest[j] = p_src[j % i_input_stride]; - } - p_src += i_input_stride; - p_dest += i_output_stride; + msg_Err( p_filter, "no suitable vout module" ); + free( p_sys ); + return VLC_EGENERIC; } + + p_filter->pf_do_work = DoWork; + p_filter->b_in_place= 1; + + return VLC_SUCCESS; } + /***************************************************************************** * DoWork: convert a buffer ***************************************************************************** @@ -224,126 +333,46 @@ static void SparseCopy( s32 * p_dest, const s32 * p_src, size_t i_len, static void DoWork( aout_instance_t *p_aout, aout_filter_t *p_filter, aout_buffer_t *p_in_buf, aout_buffer_t *p_out_buf ) { + aout_filter_sys_t *p_sys = p_filter->p_sys; picture_t *p_outpic; - - visual_effect_t *p_current_effect; - - int i_input_nb = aout_FormatNbChannels( &p_filter->input ); - int i_output_nb = aout_FormatNbChannels( &p_filter->output ); - s32 * p_dest = (s32 *)p_out_buf->p_buffer; - s32 * p_src = (s32 *)p_in_buf->p_buffer; - int i_index; - + int i; + p_out_buf->i_nb_samples = p_in_buf->i_nb_samples; - p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * i_output_nb / i_input_nb; + p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * + aout_FormatNbChannels( &p_filter->output ) / + aout_FormatNbChannels( &p_filter->input ); - /* First, output the sound */ - if ( (p_filter->output.i_original_channels & AOUT_CHAN_PHYSMASK) - != (p_filter->input.i_original_channels & AOUT_CHAN_PHYSMASK) - && (p_filter->input.i_original_channels & AOUT_CHAN_PHYSMASK) - == (AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT) ) - { - int i; - /* This is a bit special. */ - if ( !(p_filter->output.i_original_channels & AOUT_CHAN_LEFT) ) - { - p_src++; - } - if ( p_filter->output.i_physical_channels == AOUT_CHAN_CENTER ) - { - /* Mono mode */ - for ( i = p_in_buf->i_nb_samples; i--; ) - { - *p_dest = *p_src; - p_dest++; - p_src += 2; - } - } - else - { - /* Fake-stereo mode */ - for ( i = p_in_buf->i_nb_samples; i--; ) - { - *p_dest = *p_src; - p_dest++; - *p_dest = *p_src; - p_dest++; - p_src += 2; - } - } - } - else if ( p_filter->output.i_original_channels - & AOUT_CHAN_REVERSESTEREO ) + /* First, get a new picture */ + while( ( p_outpic = vout_CreatePicture( p_sys->p_vout, 0, 0, 3 ) ) == NULL) { - /* Reverse-stereo mode */ - int i; - for ( i = p_in_buf->i_nb_samples; i--; ) + if( !vlc_object_alive (p_aout) ) { - *p_dest = p_src[1]; - p_dest++; - *p_dest = p_src[0]; - p_dest++; - p_src += 2; + return; } - } - else - { - SparseCopy( p_dest, p_src, p_in_buf->i_nb_samples, i_output_nb, - i_input_nb ); - } - - /* Ok, the sound is gone, we can think about our effects */ - - /* First, get a new picture */ - while( ( p_outpic = vout_CreatePicture( p_filter->p_sys->p_vout, - VLC_FALSE, VLC_FALSE, 3 ) ) == NULL ) - { - if(p_aout->b_die ) - return; - msleep( VOUT_OUTMEM_SLEEP ); + msleep( VOUT_OUTMEM_SLEEP ); } /* Blank the picture */ - for( i_index = 0 ; i_index < p_outpic->i_planes ; i_index++ ) + for( i = 0 ; i < p_outpic->i_planes ; i++ ) { - memset( p_outpic->p[i_index].p_pixels, i_index ? 0x80 : 0x00, - p_outpic->p[i_index].i_lines * p_outpic->p[i_index].i_pitch ); + memset( p_outpic->p[i].p_pixels, i > 0 ? 0x80 : 0x00, + p_outpic->p[i].i_visible_lines * p_outpic->p[i].i_pitch ); } /* We can now call our visualization effects */ - p_current_effect = p_filter->p_sys->p_first_effect; - - while( p_current_effect ) + for( i = 0; i < p_sys->i_effect; i++ ) { - /* FIXME: Find why it segfaults when we directly call - * p_current_effect->pf_run(....) - * (segfault in errno() ) */ - if( p_current_effect->pf_run == dummy_Run ) - { - dummy_Run(p_current_effect, p_aout, p_out_buf , p_outpic ); - } - else if (p_current_effect->pf_run == scope_Run ) - { - scope_Run(p_current_effect, p_aout, p_out_buf , p_outpic ); - } - else if (p_current_effect->pf_run == random_Run ) - { - random_Run(p_current_effect, p_aout, p_out_buf , p_outpic ); - } - else if (p_current_effect->pf_run == spectrum_Run ) +#define p_effect p_sys->effect[i] + if( p_effect->pf_run ) { - spectrum_Run(p_current_effect, p_aout, p_out_buf , p_outpic ); + p_effect->pf_run( p_effect, p_aout, p_out_buf, p_outpic ); } - - p_current_effect = p_current_effect->p_next; +#undef p_effect } - - vout_DatePicture ( p_filter->p_sys->p_vout, p_outpic,p_in_buf->start_date); - - - vout_DisplayPicture ( p_filter->p_sys->p_vout, p_outpic ); - + p_outpic->date = ( p_in_buf->start_date + p_in_buf->end_date ) / 2; + + vout_DisplayPicture( p_sys->p_vout, p_outpic ); } /***************************************************************************** @@ -352,13 +381,42 @@ static void DoWork( aout_instance_t *p_aout, aout_filter_t *p_filter, static void Close( vlc_object_t *p_this ) { aout_filter_t * p_filter = (aout_filter_t *)p_this; + aout_filter_sys_t *p_sys = p_filter->p_sys; + + int i; + + if( p_filter->p_sys->p_vout ) + { + aout_filter_RequestVout( p_filter, p_filter->p_sys->p_vout, 0 ); + } - if( p_filter->p_sys->p_vout ) + /* Free the list */ + for( i = 0; i < p_sys->i_effect; i++ ) { - vlc_object_detach( p_filter->p_sys->p_vout) ; - vout_Destroy( p_filter->p_sys->p_vout ); +#define p_effect p_sys->effect[i] + free( p_effect->p_data ); + free( p_effect->psz_name ); + free( p_effect->psz_args ); + free( p_effect ); +#undef p_effect } - - if( p_filter->p_sys != NULL ) - free( p_filter->p_sys); + + free( p_sys->effect ); + free( p_filter->p_sys ); +} + +/***************************************************************************** + * FilterCallback: called when changing the deinterlace method on the fly. + *****************************************************************************/ +static int FilterCallback( vlc_object_t *p_this, char const *psz_cmd, + vlc_value_t oldval, vlc_value_t newval, + void *p_data ) +{ + VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval); + VLC_UNUSED(p_data); VLC_UNUSED(newval); + aout_filter_t *p_filter = (aout_filter_t *)p_this; + /* restart this baby */ + msg_Dbg( p_filter, "we should restart the visual filter" ); + return VLC_SUCCESS; } +