/*************************************************************************************** * * filter.h is part of SimpleSkyCam. * *****************************************************************************************/ #ifndef _FILTER_H_ #define _FILTER_H_ #include "gui.h" #include "config.h" #include "video.h" #include "videoframe.h" class Filter { private: int running; VideoFrame inFrame; // input frame int inFrameNew; // new input frame; FloatImage image; // detected image VideoFrame imagegtk; // output image -- send to gtk GMutex muteximage; GMutex mutexin; GMutex mutextmp; // for access the temp image GMutex mutex; // general mutex for changing settings GThread *thread; float *fpixels; // int newimage; void ComposeOutput(); public: Filter(); ~Filter(); int NewFrame (VideoFrame *newframe, int posx, int posy); void NewImage (); // // Thread Releated Functions (maybe soon private?) int TryLockInMutex() { return g_mutex_trylock(&mutexin); }; void LockInMutex() { g_mutex_lock(&mutexin);}; void UnLockInMutex() { g_mutex_unlock(&mutexin);}; int TryLockImageMutex() { return g_mutex_trylock(&muteximage); }; void LockImageMutex() { g_mutex_lock(&muteximage);}; void UnLockImageMutex() { g_mutex_unlock(&muteximage);}; void LockMutex() { g_mutex_lock(&mutex);}; void UnLockMutex() { g_mutex_unlock(&mutex);}; // // Object functions void SetObjectSize (int neww, int newh); void SetObject (VideoFrame objFrame, int newx, int newy); void GetObjectPos (int *x, int *y); void Thread(); }; #endif