p_vout->fmt_out = p_vout->fmt_in;
/* Shall we use autocrop ? */
- p_vout->p_sys->b_autocrop = config_GetInt( p_vout, "autocrop" );
+ p_vout->p_sys->b_autocrop = var_InheritBool( p_vout, "autocrop" );
#ifdef BEST_AUTOCROP
- p_vout->p_sys->i_ratio_max = config_GetInt( p_vout, "autocrop-ratio-max" );
+ p_vout->p_sys->i_ratio_max =
+ var_InheritInteger( p_vout, "autocrop-ratio-max" );
p_vout->p_sys->i_threshold =
- config_GetInt( p_vout, "autocrop-luminance-threshold" );
+ var_InheritInteger( p_vout, "autocrop-luminance-threshold" );
p_vout->p_sys->i_skipPercent =
- config_GetInt( p_vout, "autocrop-skip-percent" );
+ var_InheritInteger( p_vout, "autocrop-skip-percent" );
p_vout->p_sys->i_nonBlackPixel =
- config_GetInt( p_vout, "autocrop-non-black-pixels" );
- p_vout->p_sys->i_diff = config_GetInt( p_vout, "autocrop-diff" );
- p_vout->p_sys->i_time = config_GetInt( p_vout, "autocrop-time" );
+ var_InheritInteger( p_vout, "autocrop-non-black-pixels" );
+ p_vout->p_sys->i_diff =
+ var_InheritInteger( p_vout, "autocrop-diff" );
+ p_vout->p_sys->i_time =
+ var_InheritInteger( p_vout, "autocrop-time" );
var_SetString( p_vout, "ratio-crop", "0" );
if (p_vout->p_sys->b_autocrop)
p_vout->p_sys->i_ratio = 0;
else
{
- p_vout->p_sys->i_ratio = config_GetInt( p_vout, "crop-ratio" );
+ p_vout->p_sys->i_ratio = var_InheritInteger( p_vout, "crop-ratio" );
// ratio < width / height => ratio = 0 (unchange ratio)
if (p_vout->p_sys->i_ratio < (p_vout->output.i_width * 1000) / p_vout->output.i_height)
p_vout->p_sys->i_ratio = 0;
/* Get geometry value from the user */
- psz_var = config_GetPsz( p_vout, "crop-geometry" );
+ psz_var = var_InheritString( p_vout, "crop-geometry" );
if( psz_var )
{
char *psz_parser, *psz_tmp;
msg_Err( p_filter, "Could not set %s", VIDEO_FILTER_EVENT_VARIABLE);
//OpenCV init specific to this example
- char* filename = config_GetPsz( p_filter, "opencv-haarcascade-file" );
+ char* filename = var_InheritString( p_filter, "opencv-haarcascade-file" );
p_filter->p_sys->p_cascade = (CvHaarClassifierCascade*)cvLoad( filename, 0, 0, 0 );
p_filter->p_sys->p_storage = cvCreateMemStorage(0);
free( filename );
p_vout->pf_control = Control;
/* Retrieve and apply config */
- if( !(psz_chroma = config_GetPsz( p_vout, "opencv-chroma" )) )
+ psz_chroma = var_InheritString( p_vout, "opencv-chroma" );
+ if( psz_chroma == NULL )
{
msg_Err( p_vout, "configuration variable %s empty, using 'grey'",
"opencv-chroma" );
}
free( psz_chroma);
- if( !(psz_output = config_GetPsz( p_vout, "opencv-output" )) )
+ psz_output = var_InheritString( p_vout, "opencv-output" );
+ if( psz_output == NULL )
{
msg_Err( p_vout, "configuration variable %s empty, using 'input'",
"opencv-output" );
}
free( psz_output);
- if( !(psz_verbosity = config_GetPsz( p_vout, "opencv-verbosity" )) )
+ psz_verbosity = var_InheritString( p_vout, "opencv-verbosity" );
+ iff( psz_verbosity == NULL )
{
msg_Err( p_vout, "configuration variable %s empty, using 'input'",
"opencv-verbosity" );
}
free( psz_verbosity);
- p_vout->p_sys->psz_inner_name = config_GetPsz( p_vout, "opencv-filter-name" );
-
+ p_vout->p_sys->psz_inner_name =
+ var_InheritString( p_vout, "opencv-filter-name" );
p_vout->p_sys->f_scale =
- config_GetFloat( p_vout, "opencv-scale" );
+ var_InheritFloat( p_vout, "opencv-scale" );
if (p_vout->p_sys->i_verbosity > VERB_WARN)
msg_Info(p_vout, "Configuration: opencv-scale: %f, opencv-chroma: %d, "
}
/* Open display */
- psz_display = config_GetPsz( p_vout, "ggi-display" );
+ psz_display = var_InheritString( p_vout, "ggi-display" );
p_vout->p_sys->p_display = ggiOpen( psz_display, NULL );
free( psz_display );
/* Find most appropriate mode */
p_vout->p_sys->mode.frames = 2; /* 2 buffers */
- p_vout->p_sys->mode.visible.x = config_GetInt( p_vout, "width" );
- p_vout->p_sys->mode.visible.y = config_GetInt( p_vout, "height" );
+ p_vout->p_sys->mode.visible.x = var_InheritInteger( p_vout, "width" );
+ p_vout->p_sys->mode.visible.y = var_InheritInteger( p_vout, "height" );
p_vout->p_sys->mode.virt.x = GGI_AUTO;
p_vout->p_sys->mode.virt.y = GGI_AUTO;
p_vout->p_sys->mode.size.x = GGI_AUTO;
if (!sys)
return VLC_ENOMEM;
- char *chroma_fmt = config_GetPsz(vd, "vout-snapshot-chroma");
+ char *chroma_fmt = var_InheritString(vd, "vout-snapshot-chroma");
const vlc_fourcc_t chroma = vlc_fourcc_GetCodecFromString(VIDEO_ES, chroma_fmt);
free(chroma_fmt);
return VLC_EGENERIC;
}
- const int width = config_GetInt(vd, "vout-snapshot-width");
- const int height = config_GetInt(vd, "vout-snapshot-height");
+ const int width = var_InheritInteger(vd, "vout-snapshot-width");
+ const int height = var_InheritInteger(vd, "vout-snapshot-height");
if (width <= 0 || height <= 0) {
msg_Err(vd, "snapshot-width/height are invalid");
free(sys);
}
sys->index = 0;
- sys->count = config_GetInt(vd, "vout-snapshot-cache-size");
+ sys->count = var_InheritInteger(vd, "vout-snapshot-cache-size");
/* FIXME following code leaks in case of error */
}
p_buffs = p_s16_buff = p_data->p_prev_s16_buff;
- i_80_bands = config_GetInt ( p_aout, "visual-80-bands" );
- i_peak = config_GetInt ( p_aout, "visual-peaks" );
+ i_80_bands = var_InheritInteger( p_aout, "visual-80-bands" );
+ i_peak = var_InheritInteger( p_aout, "visual-peaks" );
if( i_80_bands != 0)
{
}
p_buffs = p_s16_buff = p_data->p_prev_s16_buff;
- i_original = config_GetInt ( p_aout, "spect-show-original" );
- i_80_bands = config_GetInt ( p_aout, "spect-80-bands" );
- i_separ = config_GetInt ( p_aout, "spect-separ" );
- i_amp = config_GetInt ( p_aout, "spect-amp" );
- i_peak = config_GetInt ( p_aout, "spect-show-peaks" );
- i_show_base = config_GetInt ( p_aout, "spect-show-base" );
- i_show_bands = config_GetInt ( p_aout, "spect-show-bands" );
- i_rad = config_GetInt ( p_aout, "spect-radius" );
- i_sections = config_GetInt ( p_aout, "spect-sections" );
- i_extra_width = config_GetInt ( p_aout, "spect-peak-width" );
- i_peak_height = config_GetInt ( p_aout, "spect-peak-height" );
- color1 = config_GetInt ( p_aout, "spect-color" );
+ i_original = var_InheritInteger( p_aout, "spect-show-original" );
+ i_80_bands = var_InheritInteger( p_aout, "spect-80-bands" );
+ i_separ = var_InheritInteger( p_aout, "spect-separ" );
+ i_amp = var_InheritInteger( p_aout, "spect-amp" );
+ i_peak = var_InheritInteger( p_aout, "spect-show-peaks" );
+ i_show_base = var_InheritInteger( p_aout, "spect-show-base" );
+ i_show_bands = var_InheritInteger( p_aout, "spect-show-bands" );
+ i_rad = var_InheritInteger( p_aout, "spect-radius" );
+ i_sections = var_InheritInteger( p_aout, "spect-sections" );
+ i_extra_width = var_InheritInteger( p_aout, "spect-peak-width" );
+ i_peak_height = var_InheritInteger( p_aout, "spect-peak-height" );
+ color1 = var_InheritInteger( p_aout, "spect-color" );
if( i_80_bands != 0)
{
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");
+ p_sys->i_height = var_InheritInteger( p_filter , "effect-height");
+ p_sys->i_width = var_InheritInteger( p_filter , "effect-width");
if( p_sys->i_height < 400 ) p_sys->i_height = 400;
if( p_sys->i_width < 532 ) p_sys->i_width = 532;