/*************************************************************************************** * * output.h is part of SimpleSkyCam. * *****************************************************************************************/ #ifndef _OUTPUT_H_ #define _OUTPUT_H_ #include "gui.h" #include "config.h" #include "video.h" #include "videoframe.h" class Output { private: int running; VideoFrameRaw inFrame; // input frame int inFrameNew; // new input frame; GMutex muteximage; GMutex mutexin; GMutex mutextmp; // for access the temp image GMutex mutex; // general mutex for changing settings GThread *thread; // int newimage; void ComposeOutput(); public: Output(); ~Output(); int NewFrame (VideoFrameRaw *rawframe); 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