aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-04 09:16:31 (GMT)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-04 09:59:24 (GMT)
commitab49eda5720583b0470a329434554e97c735e696 (patch)
tree01dd96abb868c597d9c16023c7feefaacda9ef84
parent39b0f779f454e7c4c58cc68352998e7f5ed7ab99 (diff)
Rename camera struct typedef from cam to cam_t
Depending on the gcc options, that causes a fatal warning: v4l.c:36:37: error: declaration of ‘cam’ shadows a global declaration [-Werror=shadow] static void insert_resolution(cam * cam, int x, int y) ~~~~~~^~~ In file included from v4l.c:6: v4l.h:99:3: note: shadowed declaration is here } cam; ^~~ Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r--src/callbacks.c72
-rw-r--r--src/callbacks.h76
-rw-r--r--src/camorama-window.c10
-rw-r--r--src/camorama-window.h2
-rw-r--r--src/fileio.c12
-rw-r--r--src/fileio.h10
-rw-r--r--src/main.c2
-rw-r--r--src/v4l.c22
-rw-r--r--src/v4l.h24
9 files changed, 115 insertions, 115 deletions
diff --git a/src/callbacks.c b/src/callbacks.c
index 941e828..cde3ef0 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -22,7 +22,7 @@ extern const gchar * const protos[];
* pref callbacks
*/
-void ts_func (GtkWidget * rb, cam * cam)
+void ts_func (GtkWidget * rb, cam_t *cam)
{
GConfClient *client;
@@ -31,7 +31,7 @@ void ts_func (GtkWidget * rb, cam * cam)
gconf_client_set_bool (cam->gc, KEY4, cam->timestamp, NULL);
}
-void customstring_func (GtkWidget * rb, cam * cam)
+void customstring_func (GtkWidget * rb, cam_t *cam)
{
GConfClient *client;
@@ -42,7 +42,7 @@ void customstring_func (GtkWidget * rb, cam * cam)
(cam->xml, "string_entry")), cam->usestring);
}
-void drawdate_func (GtkWidget * rb, cam * cam)
+void drawdate_func (GtkWidget * rb, cam_t *cam)
{
GConfClient *client;
@@ -51,7 +51,7 @@ void drawdate_func (GtkWidget * rb, cam * cam)
gconf_client_set_bool (cam->gc, KEY19, cam->usedate, NULL);
}
-void append_func (GtkWidget * rb, cam * cam)
+void append_func (GtkWidget * rb, cam_t *cam)
{
GConfClient *client;
@@ -61,7 +61,7 @@ void append_func (GtkWidget * rb, cam * cam)
}
-void rappend_func (GtkWidget * rb, cam * cam)
+void rappend_func (GtkWidget * rb, cam_t *cam)
{
GConfClient *client;
@@ -71,7 +71,7 @@ void rappend_func (GtkWidget * rb, cam * cam)
}
-void jpg_func (GtkWidget * rb, cam * cam)
+void jpg_func (GtkWidget * rb, cam_t *cam)
{
GConfClient *client;
@@ -81,7 +81,7 @@ void jpg_func (GtkWidget * rb, cam * cam)
}
-void png_func (GtkWidget * rb, cam * cam)
+void png_func (GtkWidget * rb, cam_t *cam)
{
GConfClient *client;
@@ -90,7 +90,7 @@ void png_func (GtkWidget * rb, cam * cam)
gconf_client_set_int (cam->gc, KEY3, cam->savetype, NULL);
}
-void ppm_func (GtkWidget * rb, cam * cam)
+void ppm_func (GtkWidget * rb, cam_t *cam)
{
GConfClient *client;
@@ -99,7 +99,7 @@ void ppm_func (GtkWidget * rb, cam * cam)
gconf_client_set_int (cam->gc, KEY3, cam->savetype, NULL);
}
-void set_sensitive (cam * cam)
+void set_sensitive (cam_t *cam)
{
gtk_widget_set_sensitive (GTK_WIDGET(gtk_builder_get_object(cam->xml, "table4")),
cam->cap);
@@ -127,7 +127,7 @@ void set_sensitive (cam * cam)
}
-void cap_func (GtkWidget * rb, cam * cam)
+void cap_func (GtkWidget * rb, cam_t *cam)
{
GConfClient *client;
@@ -140,7 +140,7 @@ void cap_func (GtkWidget * rb, cam * cam)
}
-void rcap_func (GtkWidget * rb, cam * cam)
+void rcap_func (GtkWidget * rb, cam_t *cam)
{
GConfClient *client;
@@ -152,7 +152,7 @@ void rcap_func (GtkWidget * rb, cam * cam)
}
-void acap_func (GtkWidget * rb, cam * cam)
+void acap_func (GtkWidget * rb, cam_t *cam)
{
GConfClient *client;
@@ -180,7 +180,7 @@ void acap_func (GtkWidget * rb, cam * cam)
set_sensitive (cam);
}
-void interval_change (GtkWidget * sb, cam * cam)
+void interval_change (GtkWidget * sb, cam_t *cam)
{
GConfClient *client;
@@ -206,7 +206,7 @@ void interval_change (GtkWidget * sb, cam * cam)
update_tooltip (cam);
}
-void rjpg_func (GtkWidget * rb, cam * cam)
+void rjpg_func (GtkWidget * rb, cam_t *cam)
{
GConfClient *client;
@@ -216,7 +216,7 @@ void rjpg_func (GtkWidget * rb, cam * cam)
}
-void rpng_func (GtkWidget * rb, cam * cam)
+void rpng_func (GtkWidget * rb, cam_t *cam)
{
GConfClient *client;
@@ -225,7 +225,7 @@ void rpng_func (GtkWidget * rb, cam * cam)
gconf_client_set_int (cam->gc, KEY10, cam->rsavetype, NULL);
}
-void rppm_func (GtkWidget * rb, cam * cam)
+void rppm_func (GtkWidget * rb, cam_t *cam)
{
GConfClient *client;
@@ -234,7 +234,7 @@ void rppm_func (GtkWidget * rb, cam * cam)
gconf_client_set_int (cam->gc, KEY10, cam->rsavetype, NULL);
}
-void rts_func (GtkWidget * rb, cam * cam)
+void rts_func (GtkWidget * rb, cam_t *cam)
{
GConfClient *client;
@@ -281,7 +281,7 @@ int delete_event (GtkWidget * widget, gpointer data)
return FALSE;
}
-static int apply_remote_pref(cam *cam)
+static int apply_remote_pref(cam_t *cam)
{
if (!strlen (gtk_entry_get_text ((GtkEntry *) host_entry)))
return 0;
@@ -347,7 +347,7 @@ static int apply_remote_pref(cam *cam)
/*
* apply preferences
*/
-void prefs_func (GtkWidget * okbutton, cam * cam)
+void prefs_func (GtkWidget * okbutton, cam_t *cam)
{
GConfClient *client;
@@ -398,7 +398,7 @@ void on_preferences1_activate (GtkMenuItem * menuitem, gpointer user_data)
gtk_widget_show (prefswindow);
}
-void on_change_size_activate (GtkWidget * widget, cam * cam)
+void on_change_size_activate (GtkWidget * widget, cam_t *cam)
{
gchar const *name;
gchar *title;
@@ -451,7 +451,7 @@ void on_change_size_activate (GtkWidget * widget, cam * cam)
g_free (title);
}
-void on_show_adjustments_activate (GtkToggleButton * button, cam * cam)
+void on_show_adjustments_activate (GtkToggleButton * button, cam_t *cam)
{
if (gtk_widget_get_visible(GTK_WIDGET(gtk_builder_get_object(cam->xml, "adjustments_table")))) {
gtk_widget_hide (GTK_WIDGET(gtk_builder_get_object(cam->xml, "adjustments_table")));
@@ -468,7 +468,7 @@ void on_show_adjustments_activate (GtkToggleButton * button, cam * cam)
}
void
-on_show_effects_activate(GtkMenuItem* menuitem, cam* cam) {
+on_show_effects_activate(GtkMenuItem* menuitem, cam_t *cam) {
GtkWidget* effects = GTK_WIDGET(gtk_builder_get_object(cam->xml, "scrolledwindow_effects"));
cam->show_effects = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem));
@@ -482,7 +482,7 @@ on_show_effects_activate(GtkMenuItem* menuitem, cam* cam) {
gconf_client_set_bool(cam->gc, KEY23, cam->show_effects, NULL);
}
-void on_about_activate (GtkMenuItem * menuitem, cam * cam)
+void on_about_activate (GtkMenuItem * menuitem, cam_t *cam)
{
static GtkWidget *about = NULL;
const gchar *authors[] = {
@@ -534,7 +534,7 @@ void on_about_activate (GtkMenuItem * menuitem, cam * cam)
}
static void
-apply_filters(cam* cam) {
+apply_filters(cam_t *cam) {
/* v4l has reverse rgb order from what camora expect so call the color
filter to fix things up before running the user selected filters */
camorama_filter_color_filter(NULL, cam->pic_buf, cam->width, cam->height, cam->bpp / 8);
@@ -628,7 +628,7 @@ static cairo_surface_t *create_from_pixbuf(const GdkPixbuf *pixbuf,
return surface;
}
-static void show_buffer(cam* cam)
+static void show_buffer(cam_t *cam)
{
int i;
GdkPixbuf *pb;
@@ -675,7 +675,7 @@ static void show_buffer(cam* cam)
* get image from cam - does all the work ;)
*/
gint
-read_timeout_func(cam* cam) {
+read_timeout_func(cam_t *cam) {
v4l2_read (cam->dev, cam->pic_buf,
(cam->width * cam->height * cam->bpp / 8));
@@ -684,7 +684,7 @@ read_timeout_func(cam* cam) {
return TRUE;
}
-gint timeout_func (cam * cam)
+gint timeout_func (cam_t *cam)
{
capture_buffers(cam, cam->pic_buf, cam->width * cam->height * cam->bytesperline);
@@ -708,12 +708,12 @@ gint fps (GtkWidget * sb)
return 1;
}
-void on_status_show (GtkWidget * sb, cam * cam)
+void on_status_show (GtkWidget * sb, cam_t *cam)
{
cam->status = sb;
}
-void capture_func (GtkWidget * widget, cam * cam)
+void capture_func (GtkWidget * widget, cam_t *cam)
{
if (cam->debug == TRUE) {
printf
@@ -732,7 +732,7 @@ void capture_func (GtkWidget * widget, cam * cam)
}
-gint timeout_capture_func (cam * cam)
+gint timeout_capture_func (cam_t *cam)
{
/* GdkRectangle rect;
* rect->x = 0; rect->y = 0;
@@ -761,35 +761,35 @@ gint timeout_capture_func (cam * cam)
return 1;
}
-void contrast_change (GtkHScale * sc1, cam * cam)
+void contrast_change (GtkHScale * sc1, cam_t *cam)
{
cam->contrast = 256 * (int) gtk_range_get_value ((GtkRange *) sc1);
v4l2_set_control(cam->dev, V4L2_CID_CONTRAST, cam->contrast);
}
-void brightness_change (GtkHScale * sc1, cam * cam)
+void brightness_change (GtkHScale * sc1, cam_t *cam)
{
cam->brightness = 256 * (int) gtk_range_get_value ((GtkRange *) sc1);
v4l2_set_control(cam->dev, V4L2_CID_BRIGHTNESS, cam->brightness);
}
-void colour_change (GtkHScale * sc1, cam * cam)
+void colour_change (GtkHScale * sc1, cam_t *cam)
{
cam->colour = 256 * (int) gtk_range_get_value ((GtkRange *) sc1);
v4l2_set_control(cam->dev, V4L2_CID_SATURATION, cam->colour);
}
-void hue_change (GtkHScale * sc1, cam * cam)
+void hue_change (GtkHScale * sc1, cam_t *cam)
{
cam->hue = 256 * (int) gtk_range_get_value ((GtkRange *) sc1);
v4l2_set_control(cam->dev, V4L2_CID_HUE, cam->hue);
}
-void wb_change (GtkHScale * sc1, cam * cam)
+void wb_change (GtkHScale * sc1, cam_t *cam)
{
cam->whiteness = 256 * (int) gtk_range_get_value ((GtkRange *) sc1);
@@ -809,7 +809,7 @@ static void help_cb (GtkWidget * widget, gpointer data)
}
}
-void update_tooltip (cam * cam)
+void update_tooltip (cam_t *cam)
{
gchar *tooltip_text;
diff --git a/src/callbacks.h b/src/callbacks.h
index 3b3fa98..5dd13f9 100644
--- a/src/callbacks.h
+++ b/src/callbacks.h
@@ -7,7 +7,7 @@
G_BEGIN_DECLS
-void on_change_size_activate (GtkWidget * widget, cam * cam);
+void on_change_size_activate (GtkWidget * widget, cam_t *cam);
void on_quit_activate (GtkMenuItem * menuitem, gpointer user_data);
void gconf_notify_func (GConfClient * client, guint cnxn_id,
GConfEntry * entry, char *);
@@ -16,36 +16,36 @@ void gconf_notify_func_bool (GConfClient * client, guint cnxn_id,
void gconf_notify_func_int (GConfClient * client, guint cnxn_id,
GConfEntry * entry, int val);
int delete_event (GtkWidget *, gpointer data);
-void cap_func (GtkWidget *, cam *);
-void rcap_func (GtkWidget *, cam *);
-void acap_func (GtkWidget *, cam *);
-void set_sensitive (cam *);
-void tt_enable_func (GtkWidget *, cam *);
-void interval_change (GtkWidget *, cam *);
-void ts_func (GtkWidget *, cam *);
-void customstring_func (GtkWidget *, cam *);
-void drawdate_func (GtkWidget *, cam *);
-void append_func (GtkWidget *, cam *);
-void rappend_func (GtkWidget *, cam *);
-void jpg_func (GtkWidget *, cam *);
-void png_func (GtkWidget *, cam *);
-void ppm_func (GtkWidget *, cam *);
-void rts_func (GtkWidget *, cam *);
-void rjpg_func (GtkWidget *, cam *);
-void rpng_func (GtkWidget *, cam *);
-gint (*pt2Function) (cam *);
-void rppm_func (GtkWidget *, cam *);
+void cap_func (GtkWidget *, cam_t *);
+void rcap_func (GtkWidget *, cam_t *);
+void acap_func (GtkWidget *, cam_t *);
+void set_sensitive (cam_t *);
+void tt_enable_func (GtkWidget *, cam_t *);
+void interval_change (GtkWidget *, cam_t *);
+void ts_func (GtkWidget *, cam_t *);
+void customstring_func (GtkWidget *, cam_t *);
+void drawdate_func (GtkWidget *, cam_t *);
+void append_func (GtkWidget *, cam_t *);
+void rappend_func (GtkWidget *, cam_t *);
+void jpg_func (GtkWidget *, cam_t *);
+void png_func (GtkWidget *, cam_t *);
+void ppm_func (GtkWidget *, cam_t *);
+void rts_func (GtkWidget *, cam_t *);
+void rjpg_func (GtkWidget *, cam_t *);
+void rpng_func (GtkWidget *, cam_t *);
+gint (*pt2Function) (cam_t *);
+void rppm_func (GtkWidget *, cam_t *);
void on_preferences1_activate (GtkMenuItem * menuitem, gpointer user_data);
-void on_about_activate (GtkMenuItem * menuitem, cam *cam);
-void on_show_adjustments_activate (GtkToggleButton * button, cam *);
-void on_show_effects_activate (GtkMenuItem * menuitem, cam *);
-void prefs_func (GtkWidget *, cam *);
-void capture_func2 (GtkWidget *, cam *);
-void capture_func (GtkWidget *, cam *);
-gint timeout_capture_func (cam *);
+void on_about_activate (GtkMenuItem * menuitem, cam_t *cam);
+void on_show_adjustments_activate (GtkToggleButton * button, cam_t *);
+void on_show_effects_activate (GtkMenuItem * menuitem, cam_t *);
+void prefs_func (GtkWidget *, cam_t *);
+void capture_func2 (GtkWidget *, cam_t *);
+void capture_func (GtkWidget *, cam_t *);
+gint timeout_capture_func (cam_t *);
gint fps (GtkWidget *);
-gint timeout_func (cam *);
-gint read_timeout_func (cam *);
+gint timeout_func (cam_t *);
+gint read_timeout_func (cam_t *);
void edge_func1 (GtkToggleButton *, gpointer);
void sobel_func (GtkToggleButton *, gpointer);
void fix_colour_func (GtkToggleButton *, char *);
@@ -57,15 +57,15 @@ void reichardt_func (GtkToggleButton *, gpointer);
void colour_func (GtkToggleButton *, gpointer);
void smooth_func (GtkToggleButton *, gpointer);
void negative_func (GtkToggleButton *, gpointer);
-void on_scale1_drag_data_received (GtkHScale *, cam *);
-void on_status_show (GtkWidget *, cam *);
-void contrast_change (GtkHScale *, cam *);
-void brightness_change (GtkHScale *, cam *);
-void colour_change (GtkHScale *, cam *);
-void hue_change (GtkHScale *, cam *);
-void wb_change (GtkHScale *, cam *);
-gboolean on_drawingarea_expose_event (GtkWidget *, GdkEventExpose *, cam *);
-void update_tooltip (cam * cam);
+void on_scale1_drag_data_received (GtkHScale *, cam_t *);
+void on_status_show (GtkWidget *, cam_t *);
+void contrast_change (GtkHScale *, cam_t *);
+void brightness_change (GtkHScale *, cam_t *);
+void colour_change (GtkHScale *, cam_t *);
+void hue_change (GtkHScale *, cam_t *);
+void wb_change (GtkHScale *, cam_t *);
+gboolean on_drawingarea_expose_event (GtkWidget *, GdkEventExpose *, cam_t *);
+void update_tooltip (cam_t *cam);
G_END_DECLS
diff --git a/src/camorama-window.c b/src/camorama-window.c
index 7ba879e..a4565c8 100644
--- a/src/camorama-window.c
+++ b/src/camorama-window.c
@@ -92,7 +92,7 @@ menu_position_func(GtkMenu* menu, gint* x, gint* y, gboolean *push_in, gpointer
}
static void
-show_popup(cam* cam, GtkTreeView* treeview, GdkEventButton* ev) {
+show_popup(cam_t *cam, GtkTreeView* treeview, GdkEventButton* ev) {
GtkMenu* menu = GTK_MENU(gtk_menu_new());
GtkWidget* item;
GtkWidget* add_filters = gtk_menu_new();
@@ -144,12 +144,12 @@ show_popup(cam* cam, GtkTreeView* treeview, GdkEventButton* ev) {
}
static void
-treeview_popup_menu_cb(cam* cam, GtkTreeView* treeview) {
+treeview_popup_menu_cb(cam_t *cam, GtkTreeView* treeview) {
show_popup(cam, treeview, NULL);
}
static gboolean
-treeview_clicked_cb(cam* cam, GdkEventButton* ev, GtkTreeView* treeview) {
+treeview_clicked_cb(cam_t *cam, GdkEventButton* ev, GtkTreeView* treeview) {
gboolean retval = GTK_WIDGET_GET_CLASS(treeview)->button_press_event(GTK_WIDGET(treeview), ev);
if(ev->button == 3) {
@@ -161,7 +161,7 @@ treeview_clicked_cb(cam* cam, GdkEventButton* ev, GtkTreeView* treeview) {
}
static void
-tray_clicked_callback (GtkStatusIcon* status, guint button, guint activate_time, cam * cam){
+tray_clicked_callback (GtkStatusIcon* status, guint button, guint activate_time, cam_t *cam){
// FIXME: change to switch
if (button == 1) {
if (gtk_widget_get_visible
@@ -187,7 +187,7 @@ tray_clicked_callback (GtkStatusIcon* status, guint button, guint activate_time,
}
void
-load_interface(cam* cam) {
+load_interface(cam_t *cam) {
int i;
gchar *title;
GdkPixbuf *logo = NULL;
diff --git a/src/camorama-window.h b/src/camorama-window.h
index 5a25e87..e66c87e 100644
--- a/src/camorama-window.h
+++ b/src/camorama-window.h
@@ -29,7 +29,7 @@
G_BEGIN_DECLS
-void load_interface(cam* cam);
+void load_interface(cam_t *cam);
G_END_DECLS
diff --git a/src/fileio.c b/src/fileio.c
index df13dbe..704551c 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -84,7 +84,7 @@ add_rgb_text (guchar *image, int width, int height, char *cstring, char *format,
return 1;
}
-void remote_save (cam * cam)
+void remote_save (cam_t *cam)
{
GThread *remote_thread;
char *filename, *error_message;
@@ -150,7 +150,7 @@ struct mount_params {
static void mount_cb (GObject * obj, GAsyncResult * res, gpointer user_data)
{
- cam *cam = user_data;
+ cam_t *cam = user_data;
gboolean ret;
GError *err = NULL;
@@ -179,7 +179,7 @@ gchar *volume_uri(gchar *host, gchar *proto, gchar *rdir)
return g_strdup_printf ("%s://%s/%s", proto, host, rdir);
}
-void umount_volume(cam *cam)
+void umount_volume(cam_t *cam)
{
struct mount_params mount;
@@ -194,7 +194,7 @@ void umount_volume(cam *cam)
NULL, cam);
}
-void mount_volume(cam *cam)
+void mount_volume(cam_t *cam)
{
/* Prepare a mount operation */
cam->rdir_file = g_file_new_for_uri(cam->uri);
@@ -216,7 +216,7 @@ void mount_volume(cam *cam)
cam->rdir_mop, NULL, mount_cb, cam);
}
-void save_thread (cam * cam)
+void save_thread (cam_t *cam)
{
char *output_uri_string, *input_uri_string;
GFile *uri_1;
@@ -329,7 +329,7 @@ void save_thread (cam * cam)
g_thread_exit (NULL);
}
-int local_save (cam * cam)
+int local_save (cam_t *cam)
{
int fc;
gchar *filename, *ext;
diff --git a/src/fileio.h b/src/fileio.h
index 9aa8688..8b34894 100644
--- a/src/fileio.h
+++ b/src/fileio.h
@@ -1,9 +1,9 @@
#include "v4l.h"
int add_rgb_text (guchar *, int, int, char *, char *, gboolean, gboolean);
-void remote_save (cam *);
-void save_thread (cam *);
-int local_save (cam *);
+void remote_save (cam_t *);
+void save_thread (cam_t *);
+int local_save (cam_t *);
gchar *volume_uri(gchar *host, gchar *proto, gchar *rdir);
-void umount_volume(cam *);
-void mount_volume (cam *);
+void umount_volume(cam_t *);
+void mount_volume (cam_t *);
diff --git a/src/main.c b/src/main.c
index f6f0671..21b96ad 100644
--- a/src/main.c
+++ b/src/main.c
@@ -45,7 +45,7 @@ static GOptionEntry options[] = {
int
main(int argc, char *argv[]) {
- cam cam_object, *cam;
+ cam_t cam_object, *cam;
Display *display;
Screen *screen_num;
GConfClient *gc;
diff --git a/src/v4l.c b/src/v4l.c
index 7e3d7d5..d7af8aa 100644
--- a/src/v4l.c
+++ b/src/v4l.c
@@ -8,7 +8,7 @@
extern int frame_number;
-void print_cam(cam *cam){
+void print_cam(cam_t *cam){
printf("\nCamera Info\n");
printf("-----------\n");
printf("device = %s, x = %d, y = %d\n",cam->video_dev, cam->width,cam->height);
@@ -33,7 +33,7 @@ void print_cam(cam *cam){
printf("timestamp = %s\n\n",cam->ts_string);
}
-static void insert_resolution(cam * cam, int x, int y)
+static void insert_resolution(cam_t *cam, int x, int y)
{
int i;
@@ -64,7 +64,7 @@ static int sort_func(const void *__b,
return r;
}
-void get_supported_resolutions(cam * cam)
+void get_supported_resolutions(cam_t *cam)
{
struct v4l2_fmtdesc fmt;
struct v4l2_frmsizeenum frmsize;
@@ -99,7 +99,7 @@ void get_supported_resolutions(cam * cam)
qsort(cam->res, cam->n_res, sizeof(struct resolutions), sort_func);
}
-void camera_cap(cam * cam)
+void camera_cap(cam_t *cam)
{
char *msg;
int i;
@@ -241,7 +241,7 @@ void camera_cap(cam * cam)
}
}
-void get_pic_info(cam * cam){
+void get_pic_info(cam_t *cam){
int i;
if(cam->debug == TRUE)
@@ -289,7 +289,7 @@ void get_pic_info(cam * cam){
}
}
-void get_win_info(cam * cam)
+void get_win_info(cam_t *cam)
{
gchar *msg;
struct v4l2_format fmt = { 0 };
@@ -337,7 +337,7 @@ void get_win_info(cam * cam)
}
}
-void try_set_win_info(cam * cam, int *x, int *y)
+void try_set_win_info(cam_t *cam, int *x, int *y)
{
struct v4l2_format fmt;
@@ -352,7 +352,7 @@ void try_set_win_info(cam * cam, int *x, int *y)
}
}
-void set_win_info(cam * cam)
+void set_win_info(cam_t *cam)
{
gchar *msg;
struct v4l2_format fmt;
@@ -419,7 +419,7 @@ void set_win_info(cam * cam)
cam->height = fmt.fmt.pix.height;
}
-void start_streaming(cam * cam)
+void start_streaming(cam_t *cam)
{
char *msg;
unsigned int i;
@@ -488,7 +488,7 @@ void start_streaming(cam * cam)
}
}
-void capture_buffers(cam * cam, unsigned char *outbuf, int len)
+void capture_buffers(cam_t *cam, unsigned char *outbuf, int len)
{
char *msg;
unsigned char *inbuf;
@@ -534,7 +534,7 @@ void capture_buffers(cam * cam, unsigned char *outbuf, int len)
}
-void stop_streaming(cam * cam)
+void stop_streaming(cam_t *cam)
{
char *msg;
unsigned int i;
diff --git a/src/v4l.h b/src/v4l.h
index 89260c6..82c3a1c 100644
--- a/src/v4l.h
+++ b/src/v4l.h
@@ -92,18 +92,18 @@ typedef struct camera {
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);
+} cam_t;
+
+void camera_cap (cam_t *);
+void print_cam (cam_t *);
+void try_set_win_info(cam_t *cam, int *x, 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, int len);
+void stop_streaming(cam_t *cam);
#endif /* !CAMORAMA_V4L_H */

Privacy Policy