#ifndef GLOBELAYER_H #define GLOBELAYER_H #include "ofMain.h" class globeLayer { public: globeLayer(); globeLayer(map * _settings); virtual void update(); virtual void draw(); void setActive(bool _active); //void setMixAmt(float _mixAmt); int note,mix; //midi note to play and controller to mix virtual void CC(int _controller,int _value); //control change is sent to all channels //colour changing and setting functions protected: float x,y; //pos on screen float w,h; //size on screen bool active; float mixAmount; mapsettings; //copy of settings key (is neecesary?) //char* CCs; //registers interest for midi CC messages private: }; class globePlayer: public globeLayer { public: globePlayer(); globePlayer(map * _settings); ~globePlayer(); void update(); void draw(); void CC(int _controller,int _value); //have to override virtual function private: bool isPlaying; string fileName; ofVideoPlayer player; }; class globeGrabber: public globeLayer { public: globeGrabber(); globeGrabber(map * _settings); ~globeGrabber(); void update(); void draw(); void CC(int _controller,int _value); //add some colour settings protected: void calcGammaMap(); private: bool isPlaying; ofVideoGrabber grabber; int camWidth,camHeight; unsigned char* gammamap; unsigned char gsGammaMap(unsigned char *pixel); unsigned char* line1; unsigned char* line2; bool deInterlace; ofTexture outTexture; unsigned char* outBuffer; bool field2; //flag that there is a 2nd field waiting to be processed bool use2fields; int frameTime,grabTime; //keep track of field timing int whitePCtl,blackPCtl,gammaCtl,redCtl,blueCtl,greenCtl,devCtl; float whitePt,blackPt,gamma; float red,green,blue; int lineOffset; bool flip; int flipCtl; }; #endif // GLOBELAYER_H