Changeset 57e21062fa504b10e9ac2f92fd4b513d8e2dce75
- 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
| rae6af36 |
r57e2106 |
|
| 58 | 58 | N_("Red"), N_("Fuchsia"), N_("Yellow"), N_("Lime"), N_("Blue"), N_("Aqua") }; |
|---|
| 59 | 59 | |
|---|
| | 60 | #define CFG_PREFIX "colorthres-" |
|---|
| 60 | 61 | |
|---|
| 61 | 62 | vlc_module_begin(); |
|---|
| … | … | |
| 65 | 66 | set_subcategory( SUBCAT_VIDEO_VFILTER ); |
|---|
| 66 | 67 | set_capability( "video filter2", 0 ); |
|---|
| 67 | | add_integer( "colorthres-color", 0x00FF0000, NULL, COLOR_TEXT, |
|---|
| | 68 | add_integer( CFG_PREFIX "color", 0x00FF0000, NULL, COLOR_TEXT, |
|---|
| 68 | 69 | COLOR_LONGTEXT, VLC_FALSE ); |
|---|
| 69 | 70 | 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", |
|---|
| 71 | 72 | "", VLC_FALSE ); |
|---|
| 72 | | add_integer( "colorthres-similaritythres", 15, NULL, "similarity threshold", |
|---|
| | 73 | add_integer( CFG_PREFIX "similaritythres", 15, NULL, "similarity threshold", |
|---|
| 73 | 74 | "", VLC_FALSE ); |
|---|
| 74 | 75 | set_callbacks( Create, Destroy ); |
|---|
| 75 | 76 | vlc_module_end(); |
|---|
| 76 | 77 | |
|---|
| | 78 | static const char *ppsz_filter_options[] = { |
|---|
| | 79 | "color", "saturationthes", "similaritythres", NULL |
|---|
| | 80 | }; |
|---|
| | 81 | |
|---|
| 77 | 82 | /***************************************************************************** |
|---|
| 78 | 83 | * filter_sys_t: adjust filter method descriptor |
|---|
| … | … | |
| 105 | 110 | } |
|---|
| 106 | 111 | |
|---|
| 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 | |
|---|
| 110 | 118 | /* Allocate structure */ |
|---|
| 111 | 119 | p_filter->p_sys = malloc( sizeof( filter_sys_t ) ); |
|---|