"Fossies" - the Fresh Open Source Software Archive

Member "motion-Release-4.3.0/src/video_common.h" (14 Jan 2020, 3459 Bytes) of package /linux/misc/motion-Release-4.3.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "video_common.h" see the Fossies "Dox" file reference documentation.

    1 
    2 #ifndef _INCLUDE_VIDEO_COMMON_H
    3 #define _INCLUDE_VIDEO_COMMON_H
    4 
    5 struct vid_devctrl_ctx {
    6     char          *ctrl_name;       /* The name as provided by the device */
    7     char          *ctrl_iddesc;     /* A motion description of the ID number for the control*/
    8     int            ctrl_minimum;    /* The minimum value permitted as reported by device*/
    9     int            ctrl_maximum;    /* The maximum value permitted as reported by device*/
   10     int            ctrl_default;    /* The default value for the control*/
   11     int            ctrl_currval;    /* The current value the control was set to */
   12     int            ctrl_newval;     /* The new value to set for the control */
   13     unsigned int   ctrl_id;         /* The ID number for the control as provided by the device*/
   14     unsigned int   ctrl_type;       /* The type of control as reported by the device*/
   15     int            ctrl_menuitem;   /* bool for whether item is a menu item description */
   16 };
   17 
   18 struct video_dev {
   19     struct video_dev        *next;
   20     int                      usage_count;
   21     int                      fd_device;
   22     const char              *video_device;
   23     int                      input;
   24     int                      norm;
   25     int                      width;
   26     int                      height;
   27     unsigned long            frequency;
   28     int                      fps;
   29     int                      owner;
   30     int                      frames;
   31     int                      pixfmt_src;
   32     int                      buffer_count;
   33     pthread_mutex_t          mutex;
   34     pthread_mutexattr_t      attr;
   35     void                    *v4l2_private;
   36     struct vid_devctrl_ctx  *devctrl_array;     /*Array of all the controls in the device*/
   37     int                      devctrl_count;     /*Count of the controls in the device*/
   38     int                      starting;          /*Bool for whether the device is just starting*/
   39     int                      device_type;       /*Camera, tuner, etc as provided by driver enum*/
   40     int                      device_tuner;      /*Tuner number if applicable from driver*/
   41 
   42     /* BKTR Specific Items */
   43     int            bktr_method;
   44     int            bktr_bufsize;
   45     const char    *bktr_tuner;
   46     int            bktr_fdtuner;
   47     unsigned char *bktr_buffers[2];
   48     int            bktr_curbuffer;
   49     int            bktr_maxbuffer;
   50 
   51 };
   52 
   53 int vid_start(struct context *cnt);
   54 int vid_next(struct context *cnt, struct image_data *img_data);
   55 void vid_close(struct context *cnt);
   56 void vid_mutex_destroy(void);
   57 void vid_mutex_init(void);
   58 
   59 int vid_parms_parse(struct context *cnt);
   60 
   61 void vid_yuv422to420p(unsigned char *map, unsigned char *cap_map, int width, int height);
   62 void vid_yuv422pto420p(unsigned char *map, unsigned char *cap_map, int width, int height);
   63 void vid_uyvyto420p(unsigned char *map, unsigned char *cap_map, int width, int height);
   64 void vid_rgb24toyuv420p(unsigned char *map, unsigned char *cap_map, int width, int height);
   65 void vid_bayer2rgb24(unsigned char *dst, unsigned char *src, long int width, long int height);
   66 void vid_y10torgb24(unsigned char *map, unsigned char *cap_map, int width, int height, int shift);
   67 void vid_greytoyuv420p(unsigned char *map, unsigned char *cap_map, int width, int height);
   68 int vid_sonix_decompress(unsigned char *outp, unsigned char *inp, int width, int height);
   69 int vid_mjpegtoyuv420p(unsigned char *map, unsigned char *cap_map, int width, int height, unsigned int size);
   70 
   71 
   72 #endif