aboutsummaryrefslogtreecommitdiffstats
path: root/src/v4l.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/v4l.h')
-rw-r--r--src/v4l.h150
1 files changed, 77 insertions, 73 deletions
diff --git a/src/v4l.h b/src/v4l.h
index 89260c6..bc81061 100644
--- a/src/v4l.h
+++ b/src/v4l.h
@@ -12,7 +12,6 @@
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <fcntl.h>
-#include <gtk/gtk.h>
#include <linux/types.h>
#include <linux/videodev2.h>
#include <libv4l2.h>
@@ -20,90 +19,95 @@
#include <png.h>
#include <gconf/gconf-client.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#include <gtk/gtk.h>
+#pragma GCC diagnostic pop
+
#include "camorama-filter-chain.h"
typedef enum {
- PICMAX = 0,
- PICMIN = 1,
- PICHALF = 2
+ PICMAX = 0,
+ PICMIN = 1,
+ PICHALF = 2
} CamoImageSize;
enum {
- JPEG = 0,
- PNG = 1,
- PPM = 2
+ JPEG = 0,
+ PNG = 1,
+ PPM = 2
};
struct buffer_start_len {
- void *start;
- size_t length;
+ void *start;
+ size_t length;
};
struct resolutions {
- int x, y;
+ unsigned int x, y;
};
typedef struct camera {
- int dev;
- int width;
- int height;
- int bpp;
- int desk_depth;
- CamoImageSize size;
- char name[32];
- int contrast, brightness, whiteness, colour, hue, bytesperline;
- unsigned int pixformat;
- int frame_number;
-
- int min_width, min_height, max_width, max_height;
-
- int n_res;
- struct resolutions *res;
-
- char *video_dev;
- unsigned char *image;
- gchar *capturefile, *rcapturefile;
- gchar *pixdir, *host, *proto, *rdir, *uri;
- int savetype, rsavetype;
- gchar *ts_string;
- gchar *date_format;
- gboolean debug, read, hidden;
- gboolean cap, rcap, acap, show_adjustments, show_effects;
- gboolean timestamp, rtimestamp, usedate, usestring;
- gboolean rtimefn, timefn;
- GtkWidget *da, *tray_tooltip, *status;
- unsigned char *pic_buf, *tmp;
- guint timeout_id, idle_id;
- guint32 timeout_interval;
- GConfClient *gc;
- GtkBuilder *xml;
- GtkStatusIcon *tray_icon;
-
- CamoramaFilterChain* filter_chain;
-
- gboolean rdir_ok;
- GFile *rdir_file;
- GMountOperation *rdir_mop;
-
- /* Buffer handling - should be used only inside v4l.c */
- struct v4l2_requestbuffers req;
- unsigned int n_buffers;
- struct {
- void *start;
- size_t length;
- } *buffers;
-} cam;
-
-void camera_cap (cam *);
-void print_cam (cam *);
-void try_set_win_info(cam * cam, int *x, int *y);
-void set_win_info (cam * cam);
-void get_pic_info (cam *);
-void get_win_info (cam *);
-void get_supported_resolutions(cam * cam);
-void start_streaming(cam * cam);
-void capture_buffers(cam * cam, unsigned char *outbuf, int len);
-void stop_streaming(cam * cam);
-
-#endif /* !CAMORAMA_V4L_H */
-
+ int dev;
+ unsigned int width, height;
+ unsigned int screen_width, screen_height;
+ int bpp;
+ float scale;
+ CamoImageSize size;
+ char name[32];
+ int contrast, brightness, whiteness, colour, hue, bytesperline;
+ unsigned int pixformat;
+ int frame_number;
+
+ unsigned int min_width, min_height, max_width, max_height;
+
+ unsigned int n_res;
+ struct resolutions *res;
+
+ char *video_dev;
+ unsigned char *image;
+ gchar *capturefile, *rcapturefile;
+ gchar *pixdir, *host, *proto, *rdir, *uri;
+ int savetype, rsavetype;
+ gchar *ts_string;
+ gchar *date_format;
+ gboolean debug, read, hidden;
+ gboolean cap, rcap, acap, show_adjustments, show_effects;
+ gboolean timestamp, rtimestamp, usedate, usestring;
+ gboolean rtimefn, timefn;
+ GtkWidget *da, *tray_tooltip, *status;
+ unsigned char *pic_buf, *tmp;
+ guint timeout_id, idle_id;
+ guint32 timeout_interval;
+ GConfClient *gc;
+ GtkBuilder *xml;
+ GdkPixbuf *pb;
+ GtkStatusIcon *tray_icon;
+
+ CamoramaFilterChain *filter_chain;
+
+ gboolean rdir_ok;
+ GFile *rdir_file;
+ GMountOperation *rdir_mop;
+
+ /* Buffer handling - should be used only inside v4l.c */
+ struct v4l2_requestbuffers req;
+ unsigned int n_buffers;
+ struct {
+ void *start;
+ size_t length;
+ } *buffers;
+} cam_t;
+
+void camera_cap(cam_t *);
+void print_cam(cam_t *);
+void try_set_win_info(cam_t *cam, unsigned int *x, unsigned int *y);
+void set_win_info(cam_t *cam);
+void get_pic_info(cam_t *);
+void get_win_info(cam_t *);
+void get_supported_resolutions(cam_t *cam);
+void start_streaming(cam_t *cam);
+void capture_buffers(cam_t *cam, unsigned char *outbuf, unsigned int len);
+void stop_streaming(cam_t *cam);
+
+#endif /* !CAMORAMA_V4L_H */

Privacy Policy