Changeset 57e21062fa504b10e9ac2f92fd4b513d8e2dce75

Show
Ignore:
Timestamp:
31/03/07 23:25:36 (2 years ago)
Author:
Antoine Cellerier <dionoea@videolan.org>
git-committer:
Antoine Cellerier <dionoea@videolan.org> 1175376336 +0000
git-parent:

[0f9d1f9e98f6b63a28e36a35f9a37cec722cc295]

git-author:
Antoine Cellerier <dionoea@videolan.org> 1175376336 +0000
Message:

Enable config chain syntax and flag the vars as commands.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/video_filter/colorthres.c

    rae6af36 r57e2106  
    5858  N_("Red"), N_("Fuchsia"), N_("Yellow"), N_("Lime"), N_("Blue"), N_("Aqua") }; 
    5959 
     60#define CFG_PREFIX "colorthres-" 
    6061 
    6162vlc_module_begin(); 
     
    6566    set_subcategory( SUBCAT_VIDEO_VFILTER ); 
    6667    set_capability( "video filter2", 0 ); 
    67     add_integer( "colorthres-color", 0x00FF0000, NULL, COLOR_TEXT, 
     68    add_integer( CFG_PREFIX "color", 0x00FF0000, NULL, COLOR_TEXT, 
    6869                 COLOR_LONGTEXT, VLC_FALSE ); 
    6970        change_integer_list( pi_color_values, ppsz_color_descriptions, 0 ); 
    70     add_integer( "colorthres-saturationthres", 20, NULL, "saturaton threshold", 
     71    add_integer( CFG_PREFIX "saturationthres", 20, NULL, "saturaton threshold", 
    7172                 "", VLC_FALSE ); 
    72     add_integer( "colorthres-similaritythres", 15, NULL, "similarity threshold", 
     73    add_integer( CFG_PREFIX "similaritythres", 15, NULL, "similarity threshold", 
    7374                 "", VLC_FALSE ); 
    7475    set_callbacks( Create, Destroy ); 
    7576vlc_module_end(); 
    7677 
     78static const char *ppsz_filter_options[] = { 
     79    "color", "saturationthes", "similaritythres", NULL 
     80}; 
     81 
    7782/***************************************************************************** 
    7883 * filter_sys_t: adjust filter method descriptor 
     
    105110    } 
    106111 
    107     var_Create( p_filter, "colorthres-color", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT ); 
    108     var_Create( p_filter, "colorthres-similaritythres", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT ); 
    109     var_Create( p_filter, "colorthres-saturationthres", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT ); 
     112    config_ChainParse( p_filter, CFG_PREFIX, ppsz_filter_options, 
     113                       p_filter->p_cfg ); 
     114    var_CreateGetIntegerCommand( p_filter, CFG_PREFIX "color" ); 
     115    var_CreateGetIntegerCommand( p_filter, CFG_PREFIX "similaritythres" ); 
     116    var_CreateGetIntegerCommand( p_filter, CFG_PREFIX "saturationthres" ); 
     117 
    110118    /* Allocate structure */ 
    111119    p_filter->p_sys = malloc( sizeof( filter_sys_t ) );