00001 00029 #ifndef INCLUDED_FREI0R_H 00030 #define INCLUDED_FREI0R_H 00031 00032 #include <inttypes.h> 00033 00037 #define FREI0R_MAJOR_VERSION 1 00038 00042 #define FREI0R_MINOR_VERSION 0 00043 00044 //--------------------------------------------------------------------------- 00045 00049 int f0r_init(); 00050 00054 void f0r_deinit(); 00055 00056 //--------------------------------------------------------------------------- 00057 00058 00064 #define F0R_PLUGIN_TYPE_FILTER 0 00065 #define F0R_PLUGIN_TYPE_SOURCE 1 00066 00071 #define F0R_COLOR_MODEL_BGRA8888 0 00072 00079 typedef struct f0r_plugin_info 00080 { 00081 const char* name; 00082 const char* author; 00083 int plugin_type; 00084 int color_model; 00085 int frei0r_version; 00086 int major_version; 00087 int minor_version; 00088 int num_params; 00089 const char* explanation; 00090 } f0r_plugin_info_t; 00091 00092 00098 void f0r_get_plugin_info(f0r_plugin_info_t* info); 00099 00100 //--------------------------------------------------------------------------- 00101 00105 #define F0R_PARAM_BOOL 0 00106 00110 #define F0R_PARAM_DOUBLE 1 00111 00115 #define F0R_PARAM_COLOR 2 00116 00119 #define F0R_PARAM_POSITION 3 00120 00121 00126 typedef double f0r_param_bool; 00127 00131 typedef double f0r_param_double; 00132 00137 typedef struct f0r_param_color 00138 { 00139 float r; 00140 float g; 00141 float b; 00142 } f0r_param_color_t; 00143 00148 typedef struct f0r_param_position 00149 { 00150 double x; 00151 double y; 00152 } f0r_param_position_t; 00153 00154 00159 typedef struct f0r_param_info 00160 { 00161 const char* name; 00162 int type; 00163 const char* explanation; 00164 } f0r_param_info_t; 00165 00173 void f0r_get_param_info(f0r_param_info_t* info, int param_index); 00174 00175 //--------------------------------------------------------------------------- 00176 00177 typedef void* f0r_instance_t; 00178 00187 f0r_instance_t f0r_construct(unsigned int width, unsigned int height); 00188 00193 void f0r_destruct(f0r_instance_t instance); 00194 00195 //--------------------------------------------------------------------------- 00196 00197 typedef void* f0r_param_t; 00198 00207 void f0r_set_param_value(f0r_instance_t instance, 00208 f0r_param_t param, int param_index); 00209 00217 void f0r_get_param_value(f0r_instance_t instance, 00218 f0r_param_t param, int param_index); 00219 00220 //--------------------------------------------------------------------------- 00221 00234 void f0r_update(f0r_instance_t instance, 00235 double time, const uint32_t* inframe, uint32_t* outframe); 00236 00237 //--------------------------------------------------------------------------- 00238 00239 #endif
1.4.1