V4LSrc.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00031
00032 #ifndef _V4LSRC_H
00033 #define _V4LSRC_H
00034
00035 #include <openvideo/openVideo.h>
00036 #include <openvideo/Node.h>
00037 #include <openvideo/PixelFormat.h>
00038 #include <string>
00039
00040 #ifdef ENABLE_V4LSRC
00041
00042 #include <openvideo/nodes/v4l.h>
00043
00058 class OPENVIDEO_API V4LSrc :
00059 public Node
00060 {
00061 public:
00062
00066 enum VideoChannel {
00067 VideoTVSource = 0,
00068 VideoCompositeSource = 1,
00069 VideoSVideoSource = 2
00070 };
00071
00075 V4LSrc();
00076
00080 ~V4LSrc();
00081
00085 virtual bool setParameter(std::string key, std::string value);
00086
00091 virtual void start();
00092
00096 virtual void process();
00097
00101 virtual void postProcess();
00102
00103 protected:
00104
00106 char videoDevice[40];
00107
00109 int videoWidth;
00110
00112 int videoHeight;
00113
00115 int videoMode;
00116
00118 VideoChannel videoChannel;
00119
00121 PIXEL_FORMAT pixelFormat;
00122
00123 private:
00124
00126 int videoPixelFormat;
00127
00129 V4LMMInfo videoInfo;
00130
00132 unsigned char *videoBuffer;
00133
00135 int videoFd;
00136
00138 int videoFrame;
00139 };
00140
00141 #endif // ENABLE_V4LSRC
00142 #endif // __V4LSRC_H