Changeset 348 in flair-src for trunk/lib/FlairSensorActuator/src/V4LCamera.h
- Timestamp:
- Feb 17, 2020, 3:44:56 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/V4LCamera.h
r347 r348 142 142 void Run(void); 143 143 144 int device;145 144 gui::Tab *sensor_tab; 146 145 gui::DoubleSpinBox *bright, *exposure, *gain, *contrast, *hue, *sharpness,*sat; 147 146 gui::CheckBox *autogain, *awb, *autoexposure; 148 147 gui::Label *fps; 148 149 int device; 149 150 bool hasProblems; 151 struct video_mmap *mmaps; 152 void* buffers[MAX_V4L_BUFFERS]; 153 int nbBuffers; 154 int bufferIndex; 155 char *imageData; 156 157 int init(int width, int height,unsigned long colorspace); 150 158 static int xioctl( int fd, int request, void *arg); 151 159 void SetProperty(int property,float value); … … 153 161 int GrabFrame(void); 154 162 int AllocBuffers(void); 163 int allocBuffers (void); 155 164 int QueueBuffer(int index); 156 struct video_mmap *mmaps;157 int bufferIndex;158 struct buffer {159 void * start;160 size_t length;161 };162 buffer buffers[MAX_V4L_BUFFERS];163 char* frame;164 int nbBuffers;165 165 166 typedef struct CvCaptureCAM_V4L167 {168 //int deviceHandle;169 int bufferIndex;170 struct video_capability capability;171 struct video_window captureWindow;172 struct video_picture imageProperties;173 struct video_mbuf memoryBuffer;174 struct video_mmap *mmaps;175 char *memoryMap;176 //IplImage frame;177 char *imageData;178 int imageSize;179 166 180 /* V4L2 variables */ 181 buffer buffers[MAX_V4L_BUFFERS + 1]; 182 struct v4l2_capability cap; 183 struct v4l2_input inp; 184 struct v4l2_format form; 185 struct v4l2_crop crop; 186 struct v4l2_cropcap cropcap; 187 struct v4l2_requestbuffers req; 188 struct v4l2_jpegcompression compr; 189 struct v4l2_control control; 190 enum v4l2_buf_type type; 191 struct v4l2_queryctrl queryctrl; 192 struct v4l2_querymenu querymenu; 193 } CvCaptureCAM_V4L; 167 int cvGrabFrame(void); 194 168 195 CvCaptureCAM_V4L capture; 196 int init(int width, int height,unsigned long colorspace); 197 int setVideoSize(int width, int height,unsigned long colorspace); 198 int cvGrabFrame(void); 199 int allocBuffers (void); 200 int read_frame_v4l2(CvCaptureCAM_V4L* capture); 201 void cvRetrieveRawFrame( CvCaptureCAM_V4L* capture); 202 unsigned int n_buffers ; 169 int read_frame_v4l2(void); 170 void cvRetrieveRawFrame(void); 171 172 203 173 }; 204 174 } // end namespace sensor
Note:
See TracChangeset
for help on using the changeset viewer.