diff options
Diffstat (limited to 'src/globeLayer.h')
| -rwxr-xr-x | src/globeLayer.h | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/src/globeLayer.h b/src/globeLayer.h new file mode 100755 index 0000000..781750a --- /dev/null +++ b/src/globeLayer.h @@ -0,0 +1,101 @@ +#ifndef GLOBELAYER_H
+#define GLOBELAYER_H
+
+#include "ofMain.h"
+
+class globeLayer
+{
+ public:
+ globeLayer();
+ globeLayer(map<string,string> * _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;
+
+ map<string,string>settings; //copy of settings key (is neecesary?)
+ //char* CCs; //registers interest for midi CC messages
+
+ private:
+
+};
+
+
+class globePlayer: public globeLayer
+{
+ public:
+ globePlayer();
+ globePlayer(map<string,string> * _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<string,string> * _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
|
