Commit 733a686e authored by Rafaël Carré's avatar Rafaël Carré

video_filter: fix warnings

    declare unused parameters in vlc callbacks as void
    deinterlace/RenderX() & motionblur/Copy(): remove unused argument
parent 3ab1807f
......@@ -667,6 +667,7 @@ static int AdjustCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(oldval);
filter_sys_t *p_sys = (filter_sys_t *)p_data;
if( !strcmp( psz_var, "contrast" ) )
......
......@@ -219,6 +219,7 @@ static int MaskCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(oldval);
filter_t *p_filter = (filter_t *)p_data;
filter_sys_t *p_sys = p_filter->p_sys;
int i_ret = VLC_SUCCESS;
......
......@@ -251,6 +251,7 @@ static int BluescreenCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(oldval);
filter_sys_t *p_sys = (filter_sys_t *) p_data;
#define VAR_IS( a ) !strcmp( psz_var, CFG_PREFIX a )
......
......@@ -400,6 +400,7 @@ static void RemoveAllVout( vout_thread_t *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 )
{
VLC_UNUSED(p_this); VLC_UNUSED(oldval);
var_Set( (vlc_object_t *)p_data, psz_var, newval );
return VLC_SUCCESS;
......@@ -411,6 +412,7 @@ static int SendEvents( vlc_object_t *p_this, char const *psz_var,
static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(p_data); VLC_UNUSED(oldval);
vout_thread_t *p_vout = (vout_thread_t *)p_this;
int i_vout;
......
......@@ -834,6 +834,7 @@ static void UpdateStats( vout_thread_t *p_vout, picture_t *p_pic )
static int SendEvents( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *_p_vout )
{
VLC_UNUSED(p_this); VLC_UNUSED(oldval);
vout_thread_t *p_vout = (vout_thread_t *)_p_vout;
vlc_value_t sentval = newval;
......@@ -858,6 +859,7 @@ static int SendEvents( vlc_object_t *p_this, char const *psz_var,
static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(p_data); VLC_UNUSED(oldval);
vout_thread_t *p_vout = (vout_thread_t *)p_this;
var_Set( p_vout->p_sys->p_vout, psz_var, newval );
return VLC_SUCCESS;
......@@ -871,6 +873,7 @@ static int FilterCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
VLC_UNUSED(p_data); VLC_UNUSED(oldval);
vout_thread_t * p_vout = (vout_thread_t *)p_this;
if( !strcmp( psz_var, "ratio-crop" ) )
......
......@@ -67,7 +67,7 @@ static void RenderBob ( vout_thread_t *, picture_t *, picture_t *, int );
static void RenderMean ( vout_thread_t *, picture_t *, picture_t * );
static void RenderBlend ( vout_thread_t *, picture_t *, picture_t * );
static void RenderLinear ( vout_thread_t *, picture_t *, picture_t *, int );
static void RenderX ( vout_thread_t *, picture_t *, picture_t * );
static void RenderX ( picture_t *, picture_t * );
static void MergeGeneric ( void *, const void *, const void *, size_t );
#if defined(CAN_COMPILE_C_ALTIVEC)
......@@ -558,7 +558,7 @@ static void Render ( vout_thread_t *p_vout, picture_t *p_pic )
break;
case DEINTERLACE_X:
RenderX( p_vout, pp_outpic[0], p_pic );
RenderX( pp_outpic[0], p_pic );
vout_DisplayPicture( p_vout->p_sys->p_vout, pp_outpic[0] );
break;
}
......@@ -1942,8 +1942,7 @@ static inline void XDeintBand8x8MMXEXT( uint8_t *dst, int i_dst,
}
#endif
static void RenderX( vout_thread_t *p_vout,
picture_t *p_outpic, picture_t *p_pic )
static void RenderX( picture_t *p_outpic, picture_t *p_pic )
{
int i_plane;
......@@ -2005,6 +2004,7 @@ static void RenderX( vout_thread_t *p_vout,
static int SendEvents( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *_p_vout )
{
VLC_UNUSED(p_this); VLC_UNUSED(oldval);
vout_thread_t *p_vout = (vout_thread_t *)_p_vout;
vlc_value_t sentval = newval;
......@@ -2031,6 +2031,7 @@ 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(p_data); VLC_UNUSED(oldval);
vout_thread_t * p_vout = (vout_thread_t *)p_this;
int i_old_mode = p_vout->p_sys->i_mode;
......@@ -2111,6 +2112,7 @@ static int FilterCallback( vlc_object_t *p_this, char const *psz_cmd,
static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(p_data); VLC_UNUSED(oldval);
vout_thread_t *p_vout = (vout_thread_t *)p_this;
var_Set( p_vout->p_sys->p_vout, psz_var, newval );
return VLC_SUCCESS;
......@@ -2170,7 +2172,7 @@ static picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic )
break;
case DEINTERLACE_X:
RenderX( p_vout, p_pic_dst, p_pic );
RenderX( p_pic_dst, p_pic );
break;
}
......
......@@ -411,6 +411,7 @@ static void FilterErase( filter_t *p_filter, picture_t *p_inpic,
static int EraseCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(oldval);
filter_sys_t *p_sys = (filter_sys_t *)p_data;
if( !strcmp( psz_var, CFG_PREFIX "x" ) )
......
......@@ -771,6 +771,7 @@ static int ExtractCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
VLC_UNUSED(oldval);
filter_sys_t *p_sys = (filter_sys_t *)p_data;
if( !strcmp( psz_var, FILTER_PREFIX "component" ) )
......
......@@ -68,6 +68,7 @@
static int SetParentVal( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(oldval);
var_Change( (vlc_object_t *)p_data, psz_var, VLC_VAR_SETVALUE,
&newval, NULL );
return VLC_SUCCESS;
......
......@@ -746,6 +746,7 @@ static int GradientCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
VLC_UNUSED(oldval);
filter_sys_t *p_sys = (filter_sys_t *)p_data;
if( !strcmp( psz_var, FILTER_PREFIX "mode" ) )
{
......
......@@ -604,6 +604,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_inpic )
static int SendEvents( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(oldval);
var_Set( (vlc_object_t *)p_data, psz_var, newval );
return VLC_SUCCESS;
}
......@@ -614,6 +615,7 @@ static int SendEvents( vlc_object_t *p_this, char const *psz_var,
static int MouseEvent( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(oldval);
vout_thread_t *p_vout = (vout_thread_t*)p_data;
vout_sys_t *p_sys = p_vout->p_sys;
vlc_value_t valb;
......@@ -672,6 +674,7 @@ static int Control( vout_thread_t *p_vout, int i_query, va_list args )
static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(p_data); VLC_UNUSED(oldval);
vout_thread_t *p_vout = (vout_thread_t *)p_this;
var_Set( p_vout->p_sys->p_vout, psz_var, newval );
return VLC_SUCCESS;
......@@ -909,6 +912,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
static int LogoCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(oldval);
filter_sys_t *p_sys = (filter_sys_t *)p_data;
logo_list_t *p_logo_list = p_sys->p_logo_list;
......
......@@ -480,6 +480,7 @@ o o X o o o X X X X X o o X X X X o o o X X X X X o o X X X o o o X X X o o X o
static int SendEvents( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(oldval);
var_Set( (vlc_object_t *)p_data, psz_var, newval );
return VLC_SUCCESS;
......@@ -491,6 +492,7 @@ static int SendEvents( vlc_object_t *p_this, char const *psz_var,
static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(p_data); VLC_UNUSED(oldval);
vout_thread_t *p_vout = (vout_thread_t *)p_this;
var_Set( p_vout->p_sys->p_vout, psz_var, newval );
return VLC_SUCCESS;
......@@ -502,6 +504,7 @@ static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
static int MouseEvent( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(p_this);
vout_thread_t *p_vout = (vout_thread_t*)p_data;
vlc_value_t vald,valx,valy;
......
......@@ -328,6 +328,7 @@ static int MarqueeCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(oldval);
filter_sys_t *p_sys = (filter_sys_t *) p_data;
if( !strncmp( psz_var, "marq-marquee", 7 ) )
......
......@@ -737,6 +737,7 @@ static int MosaicCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
VLC_UNUSED(oldval);
filter_sys_t *p_sys = (filter_sys_t *) p_data;
#define VAR_IS( a ) !strcmp( psz_var, CFG_PREFIX a )
......
......@@ -42,7 +42,7 @@ static int Create ( vlc_object_t * );
static void Destroy ( vlc_object_t * );
static picture_t *Filter ( filter_t *, picture_t * );
static void RenderBlur ( filter_sys_t *, picture_t *, picture_t * );
static void Copy ( filter_t *, uint8_t **, picture_t * );
static void Copy ( filter_t *, picture_t * );
static int MotionBlurCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
......@@ -170,12 +170,12 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
p_sys->pp_planes[i_plane] = (uint8_t*)malloc(
p_pic->p[i_plane].i_pitch * p_pic->p[i_plane].i_visible_lines );
}
Copy( p_filter, p_sys->pp_planes, p_pic );
Copy( p_filter, p_pic );
}
/* Get a new picture */
RenderBlur( p_sys, p_pic, p_outpic );
Copy( p_filter, p_sys->pp_planes, p_outpic );
Copy( p_filter, p_outpic );
RELEASE( p_pic );
return p_outpic;
......@@ -218,7 +218,7 @@ static void RenderBlur( filter_sys_t *p_sys, picture_t *p_newpic,
}
}
static void Copy( filter_t *p_filter, uint8_t **pp_planes, picture_t *p_pic )
static void Copy( filter_t *p_filter, picture_t *p_pic )
{
int i_plane;
for( i_plane = 0; i_plane < p_pic->i_planes; i_plane++ )
......@@ -233,6 +233,7 @@ static int MotionBlurCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(oldval);
filter_sys_t *p_sys = (filter_sys_t *)p_data;
if( !strcmp( psz_var, FILTER_PREFIX "factor" ) )
p_sys->i_factor = __MIN( 127, __MAX( 1, newval.i_int ) );
......
......@@ -338,6 +338,8 @@ static void DestroyFilter( vlc_object_t *p_this )
static int OSDMenuVisibleEvent( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(psz_var); VLC_UNUSED(oldval);
VLC_UNUSED(newval);
filter_t *p_filter = (filter_t *) p_data;
p_filter->p_sys->b_visible = VLC_TRUE;
......@@ -348,6 +350,8 @@ static int OSDMenuVisibleEvent( vlc_object_t *p_this, char const *psz_var,
static int OSDMenuUpdateEvent( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(psz_var); VLC_UNUSED(oldval);
VLC_UNUSED(newval);
filter_t *p_filter = (filter_t *) p_data;
filter_sys_t *p_sys = p_filter->p_sys;
......@@ -607,6 +611,7 @@ static int OSDMenuCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(oldval);
filter_sys_t *p_sys = (filter_sys_t *) p_data;
if( !p_sys )
......@@ -659,6 +664,7 @@ static int OSDMenuCallback( vlc_object_t *p_this, char const *psz_var,
static int MouseEvent( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(oldval); VLC_UNUSED(newval);
filter_sys_t *p_sys = (filter_sys_t *)p_data;
vout_thread_t *p_vout = (vout_thread_t*)p_sys->p_vout;
int i_x, i_y;
......
......@@ -1925,6 +1925,7 @@ static void RemoveAllVout( vout_thread_t *p_vout )
static int SendEvents( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *_p_vout )
{
VLC_UNUSED(oldval);
vout_thread_t *p_vout = (vout_thread_t *)_p_vout;
int i_vout;
vlc_value_t sentval = newval;
......@@ -1980,7 +1981,7 @@ static int SendEvents( vlc_object_t *p_this, char const *psz_var,
static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(oldval); VLC_UNUSED(p_data);
vout_thread_t *p_vout = (vout_thread_t *)p_this;
int i_row, i_col, i_vout = 0;
......
......@@ -472,6 +472,8 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
static int SendEvents( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(oldval);
var_Set( (vlc_object_t *)p_data, psz_var, newval );
return VLC_SUCCESS;
......@@ -483,6 +485,7 @@ static int SendEvents( vlc_object_t *p_this, char const *psz_var,
static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(p_data); VLC_UNUSED(oldval);
vout_thread_t *p_vout = (vout_thread_t *)p_this;
var_Set( p_vout->p_sys->p_vout, psz_var, newval );
return VLC_SUCCESS;
......@@ -494,6 +497,7 @@ static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
static int MouseEvent( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(oldval); VLC_UNUSED(newval);
vout_thread_t *p_vout = (vout_thread_t*)p_data;
int i_x, i_y;
int i_v;
......@@ -564,6 +568,7 @@ static int PuzzleCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(oldval);
vout_sys_t *p_sys = (vout_sys_t *)p_data;
if( !strcmp( psz_var, CFG_PREFIX "rows" ) )
{
......
......@@ -300,6 +300,7 @@ static int RotateCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(psz_var); VLC_UNUSED(oldval);
filter_sys_t *p_sys = (filter_sys_t *)p_data;
p_sys->i_angle = newval.i_int*10;
cache_trigo( p_sys->i_angle, &p_sys->i_sin, &p_sys->i_cos );
......@@ -310,6 +311,7 @@ static int PreciseRotateCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(psz_var); VLC_UNUSED(oldval);
filter_sys_t *p_sys = (filter_sys_t *)p_data;
p_sys->i_angle = newval.i_int;
cache_trigo( p_sys->i_angle, &p_sys->i_sin, &p_sys->i_cos );
......
......@@ -247,7 +247,6 @@ static int RemoveVerticalSeam( filter_t *p_filter, picture_t *p_inpic, picture_t
const int i_src_pitch = p_inpic->p[Y_PLANE].i_pitch;
const int i_num_lines = p_inpic->p[Y_PLANE].i_visible_lines;
const uint8_t *p_inpix = p_inpic->p[Y_PLANE].p_pixels;
uint8_t *p_outpix = p_outpic->p[Y_PLANE].p_pixels;
int *p_energy = p_filter->p_sys->p_energy;
......@@ -376,6 +375,7 @@ static int CropCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(psz_var); VLC_UNUSED(oldval);
filter_sys_t *p_sys = (filter_sys_t *)p_data;
p_sys->i_crop = newval.i_int;
return VLC_SUCCESS;
......
......@@ -254,6 +254,7 @@ static int SharpenCallback( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval,
void *p_data )
{
VLC_UNUSED(p_this); VLC_UNUSED(oldval);
filter_sys_t *p_sys = (filter_sys_t *)p_data;
if( !strcmp( psz_var, FILTER_PREFIX "sigma" ) )
p_sys->f_sigma = __MIN( 2., __MAX( 0., newval.f_float ) );
......
......@@ -339,6 +339,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
static int SendEvents( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *_p_vout )
{
VLC_UNUSED(p_this); VLC_UNUSED(oldval);
vout_thread_t *p_vout = (vout_thread_t *)_p_vout;
vlc_value_t sentval = newval;
......@@ -399,6 +400,7 @@ static int SendEvents( vlc_object_t *p_this, char const *psz_var,
static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(p_data); VLC_UNUSED(oldval);
vout_thread_t *p_vout = (vout_thread_t *)p_this;
var_Set( p_vout->p_sys->p_vout, psz_var, newval );
return VLC_SUCCESS;
......
......@@ -600,6 +600,7 @@ static void RemoveAllVout( vout_thread_t *p_vout )
static int SendEvents( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *_p_vout )
{
VLC_UNUSED(oldval);
vout_thread_t *p_vout = (vout_thread_t *)_p_vout;
int i_vout;
vlc_value_t sentval = newval;
......@@ -643,6 +644,7 @@ static int SendEvents( vlc_object_t *p_this, char const *psz_var,
static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
VLC_UNUSED(p_data); VLC_UNUSED(oldval);
vout_thread_t *p_vout = (vout_thread_t *)p_this;
int i_row, i_col, i_vout = 0;
......
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