Mercurial > mplayer.hg
comparison m_option.h @ 9593:e9a2af584986
Add the new -vf option wich is the same as vop in reverse order.
Syntax is we decided, so you can give the nomes or not with both
vop and vf. vf take precedence over vop.
author | albeu |
---|---|
date | Sat, 15 Mar 2003 18:01:02 +0000 |
parents | d3b750570887 |
children | c5b63e88253d |
comparison
equal
deleted
inserted
replaced
9592:b20b0c80298b | 9593:e9a2af584986 |
---|---|
3 #warning "Including m_option.h but NEW_CONFIG is disabled" | 3 #warning "Including m_option.h but NEW_CONFIG is disabled" |
4 #else | 4 #else |
5 | 5 |
6 typedef struct m_option_type m_option_type_t; | 6 typedef struct m_option_type m_option_type_t; |
7 typedef struct m_option m_option_t; | 7 typedef struct m_option m_option_t; |
8 struct m_struct; | |
8 | 9 |
9 ///////////////////////////// Options types declarations //////////////////////////// | 10 ///////////////////////////// Options types declarations //////////////////////////// |
10 | 11 |
11 // Simple types | 12 // Simple types |
12 extern m_option_type_t m_option_type_flag; | 13 extern m_option_type_t m_option_type_flag; |
49 typedef struct { | 50 typedef struct { |
50 m_play_pos_t start; | 51 m_play_pos_t start; |
51 m_play_pos_t end; | 52 m_play_pos_t end; |
52 } m_span_t; | 53 } m_span_t; |
53 extern m_option_type_t m_option_type_span; | 54 extern m_option_type_t m_option_type_span; |
55 | |
56 typedef struct { | |
57 void** list; | |
58 void* name_off; | |
59 void* info_off; | |
60 void* desc_off; | |
61 } m_obj_list_t; | |
62 | |
63 typedef struct { | |
64 char* name; | |
65 char** attribs; | |
66 } m_obj_settings_t; | |
67 extern m_option_type_t m_option_type_obj_settings_list; | |
68 | |
69 // Presets are mean to be used with options struct | |
70 | |
71 | |
72 typedef struct { | |
73 struct m_struct* in_desc; | |
74 struct m_struct* out_desc; | |
75 void* presets; // Pointer to an arry of struct defined by in_desc | |
76 void* name_off; // Offset of the preset name inside the in_struct | |
77 } m_obj_presets_t; | |
78 extern m_option_type_t m_option_type_obj_presets; | |
54 | 79 |
55 // Don't be stupid keep tho old names ;-) | 80 // Don't be stupid keep tho old names ;-) |
56 #define CONF_TYPE_FLAG (&m_option_type_flag) | 81 #define CONF_TYPE_FLAG (&m_option_type_flag) |
57 #define CONF_TYPE_INT (&m_option_type_int) | 82 #define CONF_TYPE_INT (&m_option_type_int) |
58 #define CONF_TYPE_FLOAT (&m_option_type_float) | 83 #define CONF_TYPE_FLOAT (&m_option_type_float) |
65 #define CONF_TYPE_SUBCONFIG (&m_option_type_subconfig) | 90 #define CONF_TYPE_SUBCONFIG (&m_option_type_subconfig) |
66 #define CONF_TYPE_STRING_LIST (&m_option_type_string_list) | 91 #define CONF_TYPE_STRING_LIST (&m_option_type_string_list) |
67 #define CONF_TYPE_POSITION (&m_option_type_position) | 92 #define CONF_TYPE_POSITION (&m_option_type_position) |
68 #define CONF_TYPE_IMGFMT (&m_option_type_imgfmt) | 93 #define CONF_TYPE_IMGFMT (&m_option_type_imgfmt) |
69 #define CONF_TYPE_SPAN (&m_option_type_span) | 94 #define CONF_TYPE_SPAN (&m_option_type_span) |
70 | 95 #define CONF_TYPE_OBJ_SETTINGS_LIST (&m_option_type_obj_settings_list) |
96 #define CONF_TYPE_OBJ_PRESETS (&m_option_type_obj_presets) | |
71 | 97 |
72 ///////////////////////////////////////////////////////////////////////////////////////////// | 98 ///////////////////////////////////////////////////////////////////////////////////////////// |
73 | 99 |
74 struct m_option_type { | 100 struct m_option_type { |
75 char* name; | 101 char* name; |
179 #define M_OPT_MISSING_PARAM -2 | 205 #define M_OPT_MISSING_PARAM -2 |
180 #define M_OPT_INVALID -3 | 206 #define M_OPT_INVALID -3 |
181 #define M_OPT_OUT_OF_RANGE -4 | 207 #define M_OPT_OUT_OF_RANGE -4 |
182 #define M_OPT_PARSER_ERR -5 | 208 #define M_OPT_PARSER_ERR -5 |
183 | 209 |
210 m_option_t* m_option_list_find(m_option_t* list,char* name); | |
184 | 211 |
185 inline static int | 212 inline static int |
186 m_option_parse(m_option_t* opt,char *name, char *param, void* dst, int src) { | 213 m_option_parse(m_option_t* opt,char *name, char *param, void* dst, int src) { |
187 return opt->type->parse(opt,name,param,dst,src); | 214 return opt->type->parse(opt,name,param,dst,src); |
188 } | 215 } |