Ignore:
Timestamp:
Feb 17, 2020, 3:44:56 PM (5 years ago)
Author:
Sanahuja Guillaume
Message:

update v4l cam, ok on gcs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairSensorActuator/src/V4LCamera.h

    r347 r348  
    142142  void Run(void);
    143143 
    144   int device;
    145144  gui::Tab *sensor_tab;
    146145  gui::DoubleSpinBox *bright, *exposure, *gain, *contrast, *hue, *sharpness,*sat;
    147146  gui::CheckBox *autogain, *awb, *autoexposure;
    148147  gui::Label *fps;
     148 
     149  int device;
    149150  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);
    150158  static int xioctl( int fd, int request, void *arg);
    151159  void SetProperty(int property,float value);
     
    153161  int GrabFrame(void);
    154162  int AllocBuffers(void);
     163  int allocBuffers (void);
    155164  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;
    165165 
    166     typedef struct CvCaptureCAM_V4L
    167 {
    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;
    179166
    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;
     167int cvGrabFrame(void);
    194168
    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 ;
     169int read_frame_v4l2(void);
     170void cvRetrieveRawFrame(void);
     171
     172
    203173};
    204174} // end namespace sensor
Note: See TracChangeset for help on using the changeset viewer.