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 #include <libplayercore/error.h>
00026
00027 #include "v4lcapture.h"
00028
00029 #define PLAYER_CAMERA_FORMAT_RGB 6
00030 #define PLAYER_CAMERA_FORMAT_YUV420P 7
00031
00032
00033 extern PlayerTime *GlobalTime;
00034
00036
00037 class SphereDriver : public Driver
00038 {
00039 public:
00040
00041
00042 SphereDriver(ConfigFile* cf, int section);
00043
00044
00045 int Setup();
00046 int Shutdown();
00047
00048 virtual void Main();
00049
00050
00051 virtual int ProcessMessage(MessageQueue* resp_queue,
00052 player_msghdr * hdr,
00053 void * data);
00054
00055 void ProcessCommand(player_msghdr_t* hdr, player_ptz_cmd_t &data);
00056 void RefreshData();
00057
00058 private:
00059
00060 void YUV422toRGB(uint8_t* argInputData, uint8_t* argOutputData);
00061
00062 inline double LimitPan(double argP)
00063 {return (argP < mPanMin) ? mPanMin : ((argP > mPanMax) ? mPanMax : argP);};
00064 inline double LimitTilt(double argT)
00065 {return (argT < mTiltMin) ? mTiltMin : ((argT > mTiltMax) ? mTiltMax : argT);};
00066
00067
00068 player_devaddr_t mCameraAddr;
00069 player_camera_data_t mCameraData;
00070
00071 player_devaddr_t mPtzAddr;
00072 player_ptz_data_t mPtzData;
00073 player_ptz_cmd_t mPtzCmd;
00074
00075 int32_t mSleep;
00076 int32_t mFrameRate;
00077 int32_t mShutterSpeed;
00078 int32_t mCompressionPreference;
00079 int32_t mAutomaticGain;
00080 int32_t mSharpness;
00081 int32_t mBacklight;
00082 int32_t mFlicker;
00083 int32_t mNoiseReduction;
00084 int32_t mDumpSettings;
00085 int32_t mDebug;
00086 const char *mAutomaticWb;
00087
00088 double mPanMin;
00089 double mPanMax;
00090 double mTiltMin;
00091 double mTiltMax;
00092
00093
00094 const char *mDevice;
00095
00096 int32_t mSource;
00097
00098
00099 const char *mPalette;
00100
00101 FRAMEGRABBER* mFg;
00102
00103
00104 FRAME* mFrame;
00105 FRAME* mRGBFrame;
00106 int32_t mFrameNumber;
00107
00108
00109 int32_t mWidth, mHeight;
00110
00111 int32_t mDepth;
00112
00113
00114 int32_t mSave;
00115
00116 };
Last updated 12 September 2005 21:38:45
|