#include <frame.h>
Inheritance diagram for Filter:

Public Methods | |
| virtual | ~Filter () |
| virtual bool | filter_frame (FrameClass &frame)=0 |
| virtual void | reset () |
| virtual void | property_changed () |
| virtual int | get_nb_inputs () |
| virtual int | get_nb_outputs () |
Public Attributes | |
| vector< Property * > | properties |
| string | name |
| GdkPixmap * | icon_pixmap |
| bool | is_input_filter |
Note also that mearly subclassing filter is not enough to have it interface with the GUI. the GUI is dynamicly linked to all of the filters and so each filter must impliment a "C" function that will be called by the GUI to get a copy of the filter. also each filter needs an icon associated with it, so a function to return this icon must also be implimented these functions should be of the following form
in the .h file ifdef DYNAMIC_LINK extern "C"{ Filter * create_instance(); ifndef NO_GUI GdkPixmap *create_icon(GtkWidget *drawing_area); endif } endif
in the .cpp file ifdef DYNAMIC_LINK
Filter * create_instance(){ return new locator_filter; }
ifndef NO_GUI GdkPixmap *create_icon(GtkWidget *drawing_area){ return gdk_pixmap_create_from_xpm( drawing_area->window, NULL, NULL, "images/locator.xpm" ); } endif
endif
the extern "C" is so the names of the functions are not garbled by the C++ complier. the ifdef DYNAMIC_LINK is so that if the filters are staticly linked together the linker does not see many implimentations of a single function, the NO_GUI is used in the case that the user does not wish to compile the filters with GTK2.0 linked in
|
|
we really need this to make everythign work properly |
|
|
this simply takes a frame and runs the current filter over it
Implemented in eye_locator_filter. |
|
|
currently unused do not touch |
|
|
currently unused do not touch |
|
|
this method is called after the member properties has been updated, it informs the filter that properties has changed and those changes should take effect Reimplemented in eye_locator_filter. |
|
|
some filters are ment to be used on a movie and can increase performance by storing information about previous frames, this function is called after an entire movie has finnished playing so that the filter may reset it's data, NOTE that this is only virtual and not purly virtual it need not be imlemented unless the filter wishes to be reset after a complete, movie has been run through it Reimplemented in input_filter. |
|
|
this is the icon that the filter will be identified with in the |
|
|
mearly states if this is an input filter or not, an input filter is one that updates the frame with a new image when it is called, it will always be the first filter in a sequence |
|
|
this is the name that the filter will be identified with in the GUI |
|
|
a vector of properties for this particular filter this should be initilised in the filters constructor |
1.2.14 written by Dimitri van Heesch,
© 1997-2002