frei0r
frei0r.h
Go to the documentation of this file.
1 
200 #ifndef INCLUDED_FREI0R_H
201 #define INCLUDED_FREI0R_H
202 
203 #include <inttypes.h>
204 
208 #define FREI0R_MAJOR_VERSION 1
209 
213 #define FREI0R_MINOR_VERSION 2
214 
215 //---------------------------------------------------------------------------
216 
221 int f0r_init();
222 
227 void f0r_deinit();
228 
229 //---------------------------------------------------------------------------
230 
238 #define F0R_PLUGIN_TYPE_FILTER 0
239 
240 #define F0R_PLUGIN_TYPE_SOURCE 1
241 
242 #define F0R_PLUGIN_TYPE_MIXER2 2
243 
244 #define F0R_PLUGIN_TYPE_MIXER3 3
245 
248 //---------------------------------------------------------------------------
249 
290 #define F0R_COLOR_MODEL_BGRA8888 0
291 
299 #define F0R_COLOR_MODEL_RGBA8888 1
300 
313 #define F0R_COLOR_MODEL_PACKED32 2
314 
332 typedef struct f0r_plugin_info
333 {
334  const char* name;
335  const char* author;
345  const char* explanation;
347 
348 
355 
356 //---------------------------------------------------------------------------
357 
368 #define F0R_PARAM_BOOL 0
369 
374 #define F0R_PARAM_DOUBLE 1
375 
380 #define F0R_PARAM_COLOR 2
381 
385 #define F0R_PARAM_POSITION 3
386 
391 #define F0R_PARAM_STRING 4
392 
397 typedef double f0r_param_bool;
398 
402 typedef double f0r_param_double;
403 
407 typedef struct f0r_param_color
408 {
409  float r;
410  float g;
411  float b;
413 
417 typedef struct f0r_param_position
418 {
419  double x;
420  double y;
422 
423 
428 typedef char* f0r_param_string;
429 
439 typedef struct f0r_param_info
440 {
441  const char* name;
442  int type;
443  const char* explanation;
445 
454 void f0r_get_param_info(f0r_param_info_t* info, int param_index);
455 
456 //---------------------------------------------------------------------------
457 
461 typedef void* f0r_instance_t;
462 
477 f0r_instance_t f0r_construct(unsigned int width, unsigned int height);
478 
486 void f0r_destruct(f0r_instance_t instance);
487 
488 //---------------------------------------------------------------------------
489 
493 typedef void* f0r_param_t;
494 
519 void f0r_set_param_value(f0r_instance_t instance,
520  f0r_param_t param, int param_index);
521 
539 void f0r_get_param_value(f0r_instance_t instance,
540  f0r_param_t param, int param_index);
541 
542 //---------------------------------------------------------------------------
543 
569 void f0r_update(f0r_instance_t instance,
570  double time, const uint32_t* inframe, uint32_t* outframe);
571 
572 //---------------------------------------------------------------------------
573 
595 void f0r_update2(f0r_instance_t instance,
596  double time,
597  const uint32_t* inframe1,
598  const uint32_t* inframe2,
599  const uint32_t* inframe3,
600  uint32_t* outframe);
601 //---------------------------------------------------------------------------
602 
603 #endif