sphere_mixed.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <stdint.h>
00023
00024 #include <libplayercore/playercore.h>
00025
00026 #include "v4lcapture.h"
00027
00028 #define PLAYER_CAMERA_FORMAT_RGB 6
00029 #define PLAYER_CAMERA_FORMAT_YUV420P 7
00030
00032
00033 class SphereDriver : public ThreadedDriver
00034 {
00035 public:
00036
00037
00038 SphereDriver(ConfigFile* cf, int section);
00039
00040
00041 int MainSetup();
00042 void MainQuit();
00043
00044 virtual void Main();
00045
00046
00047 virtual int ProcessMessage(QueuePointer & resp_queue,
00048 player_msghdr * hdr,
00049 void * data);
00050
00051 void ProcessCommand(player_msghdr_t* hdr, player_ptz_cmd_t &data);
00052 void RefreshData();
00053
00054 private:
00055
00056 void YUV422toRGB(uint8_t* argInputData, uint8_t* argOutputData);
00057
00058 inline double LimitPan(double argP)
00059 {return (argP < mPanMin) ? mPanMin : ((argP > mPanMax) ? mPanMax : argP);};
00060 inline double LimitTilt(double argT)
00061 {return (argT < mTiltMin) ? mTiltMin : ((argT > mTiltMax) ? mTiltMax : argT);};
00062
00063
00064 player_devaddr_t mCameraAddr;
00065 player_camera_data_t mCameraData;
00066
00067 player_devaddr_t mPtzAddr;
00068 player_ptz_data_t mPtzData;
00069 player_ptz_cmd_t mPtzCmd;
00070
00071 int32_t mSleep;
00072 int32_t mFrameRate;
00073 int32_t mShutterSpeed;
00074 int32_t mCompressionPreference;
00075 int32_t mAutomaticGain;
00076 int32_t mSharpness;
00077 int32_t mBacklight;
00078 int32_t mFlicker;
00079 int32_t mNoiseReduction;
00080 int32_t mDumpSettings;
00081 int32_t mDebug;
00082 const char *mAutomaticWb;
00083
00084 double mPanMin;
00085 double mPanMax;
00086 double mTiltMin;
00087 double mTiltMax;
00088
00089
00090 const char *mDevice;
00091
00092 int32_t mSource;
00093
00094
00095 const char *mPalette;
00096
00097 FRAMEGRABBER* mFg;
00098
00099
00100 FRAME* mFrame;
00101 FRAME* mRGBFrame;
00102 int32_t mFrameNumber;
00103
00104
00105 int32_t mWidth, mHeight;
00106
00107 int32_t mDepth;
00108
00109
00110 int32_t mSave;
00111
00112 };