Your message dated Wed, 19 May 2010 15:48:33 +0000
with message-id <e1oelvz-0007gw...@ries.debian.org>
and subject line Bug#569089: fixed in camorama 0.19-2.1
has caused the Debian Bug report #569089,
regarding Uses obsolete V4L1 API
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
569089: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=569089
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: camorama
Version: 0.19-2
Severity: serious
Tags: patch

The V4L1 API is obsolete and does not work with most new V4L drivers.
You can use libv4l as an emulation layer; see the attached patches by
Hans de Goede.

Ben.

-- System Information:
Debian Release: squeeze/sid
  APT prefers proposed-updates
  APT policy: (500, 'proposed-updates'), (500, 'unstable'), (500, 'stable'), 
(1, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.32-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- camorama-0.19/src/callbacks.c	2007-09-16 15:36:55.000000000 +0200
+++ camorama-0.19.new/src/callbacks.c	2008-06-29 22:22:44.000000000 +0200
@@ -387,9 +387,6 @@
         }
     }
 
-    cam->pixmap = gdk_pixmap_new (NULL, cam->x, cam->y, cam->desk_depth);
-    gtk_widget_set_size_request (glade_xml_get_widget (cam->xml, "da"),
-                                 cam->x, cam->y);
 
     /*
      * if(cam->read == FALSE) {
@@ -441,6 +438,11 @@
      * * } 
      */
     get_win_info (cam);
+
+    cam->pixmap = gdk_pixmap_new (NULL, cam->x, cam->y, cam->desk_depth);
+    gtk_widget_set_size_request (glade_xml_get_widget (cam->xml, "da"),
+                                 cam->x, cam->y);
+
     frame = 0;
     gtk_window_resize (GTK_WINDOW
                        (glade_xml_get_widget (cam->xml, "main_window")), 320,
@@ -520,8 +522,14 @@
     gtk_widget_show (about);
 }
 
+void
+camorama_filter_color_filter(void* filter, guchar *image, int x, int y, int depth);
+
 static void
 apply_filters(cam* 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->x, cam->y, cam->depth);
 	camorama_filter_chain_apply(cam->filter_chain, cam->pic_buf, cam->x, cam->y, cam->depth);
 #warning "FIXME: enable the threshold channel filter"
 //	if((effect_mask & CAMORAMA_FILTER_THRESHOLD_CHANNEL)  != 0) 
--- camorama-0.19/src/filter.c	2007-09-16 14:48:50.000000000 +0200
+++ camorama-0.19.new/src/filter.c	2008-06-29 22:11:42.000000000 +0200
@@ -151,12 +151,12 @@
 static void
 camorama_filter_color_init(CamoramaFilterColor* self) {}
 
-static void
+void
 camorama_filter_color_filter(CamoramaFilterColor* filter, guchar *image, int x, int y, int depth) {
 	int i;
 	char tmp;
 	i = x * y;
-	while (--i) {
+	while (i--) {
 		tmp = image[0];
 		image[0] = image[2];
 		image[2] = tmp;
--- camorama-0.19/src/main.c	2007-09-16 15:36:55.000000000 +0200
+++ camorama-0.19.new/src/main.c	2008-06-29 22:20:04.000000000 +0200
@@ -224,8 +224,7 @@
 
     /* get picture attributes */
     get_pic_info (cam);
-//	set_pic_info(cam);
-    /* set_pic_info(cam); */
+    set_pic_info (cam);
     cam->contrast = cam->vid_pic.contrast;
     cam->brightness = cam->vid_pic.brightness;
     cam->colour = cam->vid_pic.colour;
--- camorama-0.19/src/v4l.c	2007-09-16 14:48:05.000000000 +0200
+++ camorama-0.19.new/src/v4l.c	2008-06-29 22:20:23.000000000 +0200
@@ -158,8 +158,8 @@
 	if(cam->debug) {
 		g_message("SET PIC");
 	}
-	//cam->vid_pic.palette = VIDEO_PALETTE_RGB24;
-	//cam->vid_pic.depth = 24;
+	cam->vid_pic.palette = VIDEO_PALETTE_RGB24;
+	cam->vid_pic.depth = 24;
 	//cam->vid_pic.palette = VIDEO_PALETTE_YUV420P;
 	if(ioctl(cam->dev, VIDIOCSPICT, &cam->vid_pic) == -1) {
 		if(cam->debug) {
@@ -232,6 +232,8 @@
       exit(0);
    }
 
+   cam->x = cam->vid_win.width;
+   cam->y = cam->vid_win.height;
 }
 
 void set_buffer(cam * cam)
--- camorama-0.19/src/camorama-window.c~	2007-09-16 15:36:55.000000000 +0200
+++ camorama-0.19/src/camorama-window.c	2009-06-23 20:19:16.000000000 +0200
@@ -209,11 +209,7 @@ load_interface(cam* cam) {
 
     logo = gtk_icon_theme_load_icon(gtk_icon_theme_get_for_screen(gtk_widget_get_screen(glade_xml_get_widget(cam->xml, "main_window"))), CAMORAMA_STOCK_WEBCAM, 24, 0, NULL);
     gtk_window_set_default_icon(logo);
-    logo = (GdkPixbuf *) create_pixbuf (PACKAGE_DATA_DIR "/pixmaps/camorama.png");
-    if (logo == NULL) {
-        printf ("\n\nLOGO NO GO\n\n");
-    }
-
+    logo = gtk_icon_theme_load_icon(gtk_icon_theme_get_for_screen(gtk_widget_get_screen(glade_xml_get_widget(cam->xml, "main_window"))), "camorama", 48, 0, NULL);
     if (cam->show_adjustments == FALSE) {
         gtk_widget_hide (glade_xml_get_widget
                          (cam->xml, "adjustments_table"));
--- camorama-0.19/src/Makefile.am	2007-09-16 14:48:05.000000000 +0200
+++ camorama-0.19.new/src/Makefile.am	2009-06-24 15:01:37.000000000 +0200
@@ -36,7 +36,7 @@
 	filter.h	\
 	$(BUILT_SOURCES)\
 	$(NULL)
-camorama_LDADD = $(PACKAGE_LIBS)
+camorama_LDADD = $(PACKAGE_LIBS) -lv4l1
 
 DISTCLEANFILES=$(BUILT_SOURCES)
 
--- camorama-0.19/src/Makefile.in	2007-10-06 21:06:28.000000000 +0200
+++ camorama-0.19.new/src/Makefile.in	2009-06-24 15:01:50.000000000 +0200
@@ -248,7 +248,7 @@
 	$(BUILT_SOURCES)\
 	$(NULL)
 
-camorama_LDADD = $(PACKAGE_LIBS)
+camorama_LDADD = $(PACKAGE_LIBS) -lv4l1
 DISTCLEANFILES = $(BUILT_SOURCES)
 all: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) all-am
--- camorama-0.19/src/callbacks.c	2009-06-24 15:01:55.000000000 +0200
+++ camorama-0.19.new/src/callbacks.c	2009-06-24 14:55:42.000000000 +0200
@@ -9,6 +9,7 @@
 #include <libgnomeui/gnome-propertybox.h>
 #include <libgnomeui/gnome-window-icon.h>
 #include <pthread.h>
+#include <libv4l1.h>
 
 extern GtkWidget *main_window, *prefswindow;
 //extern state func_state;
@@ -390,7 +391,7 @@
 
     /*
      * if(cam->read == FALSE) {
-     *  cam->pic = mmap(0, cam->vid_buf.size, PROT_READ | PROT_WRITE, MAP_SHARED, cam->dev, 0);
+     *  cam->pic = v4l1_mmap(0, cam->vid_buf.size, PROT_READ | PROT_WRITE, MAP_SHARED, cam->dev, 0);
      *  
      *  if((unsigned char *) -1 == (unsigned char *) cam->pic) {
      *   if(cam->debug == TRUE) {
@@ -401,7 +402,7 @@
      *  }
      *  }else{
      *   cam->pic_buf = malloc(cam->x * cam->y * cam->depth);
-     *   read(cam->dev,cam->pic,(cam->x * cam->y * 3));
+     *   v4l1_read(cam->dev,cam->pic,(cam->x * cam->y * 3));
      *  } 
      */
 
@@ -427,7 +428,7 @@
      * if(cam->read == FALSE) {
      * * for(frame = 0; frame < cam->vid_buf.frames; frame++) {
      * * cam->vid_map.frame = frame;
-     * * if(ioctl(cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) {
+     * * if(v4l1_ioctl(cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) {
      * * if(cam->debug == TRUE) {
      * * fprintf(stderr, "Unable to capture image (VIDIOCMCAPTURE) during resize.\n");
      * * }
@@ -547,7 +548,7 @@
     int i, count = 0;
     GdkGC *gc;
 
-    read (cam->dev, cam->pic, (cam->x * cam->y * 3));
+    v4l1_read (cam->dev, cam->pic, (cam->x * cam->y * 3));
     frames2++;
     /*
      * update_rec.x = 0;
@@ -588,7 +589,7 @@
 
     i = -1;
     while (i < 0) {
-        i = ioctl (cam->dev, VIDIOCSYNC, &frame);
+        i = v4l1_ioctl (cam->dev, VIDIOCSYNC, &frame);
 
         if (i < 0 && errno == EINTR) {
             if (cam->debug == TRUE) {
@@ -630,7 +631,7 @@
                                 0, cam->x, cam->y);
 
     cam->vid_map.frame = frame;
-    if (ioctl (cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) {
+    if (v4l1_ioctl (cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) {
         if (cam->debug == TRUE) {
             fprintf (stderr, "Unable to capture image (VIDIOCMCAPTURE)\n");
         }
@@ -677,7 +678,7 @@
 void init_cam (GtkWidget * capture, cam * cam)
 {
     cam->pic =
-        mmap (0, cam->vid_buf.size, PROT_READ | PROT_WRITE,
+        v4l1_mmap (0, cam->vid_buf.size, PROT_READ | PROT_WRITE,
               MAP_SHARED, cam->dev, 0);
 
     if ((unsigned char *) -1 == (unsigned char *) cam->pic) {
@@ -692,7 +693,7 @@
     cam->vid_map.format = cam->vid_pic.palette;
     for (frame = 0; frame < cam->vid_buf.frames; frame++) {
         cam->vid_map.frame = frame;
-        if (ioctl (cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) {
+        if (v4l1_ioctl (cam->dev, VIDIOCMCAPTURE, &cam->vid_map) < 0) {
             if (cam->debug == TRUE) {
                 fprintf (stderr,
                          "Unable to capture image (VIDIOCMCAPTURE).\n");
--- camorama-0.19/src/main.c	2009-06-24 15:01:55.000000000 +0200
+++ camorama-0.19.new/src/main.c	2009-06-24 14:59:35.000000000 +0200
@@ -9,6 +9,7 @@
 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.h>
 #include <locale.h>
+#include <libv4l1.h>
 
 #include "camorama-display.h"
 #include "camorama-stock-items.h"
@@ -206,7 +207,7 @@
     gdk_pixbuf_xlib_init (display, 0);
     cam->desk_depth = xlib_rgb_get_depth ();
 
-    cam->dev = open (cam->video_dev, O_RDWR);
+    cam->dev = v4l1_open (cam->video_dev, O_RDWR);
 
     camera_cap (cam);
     get_win_info (cam);
@@ -284,5 +285,8 @@
 
     gtk_timeout_add (2000, (GSourceFunc) fps, cam->status);
     gtk_main ();
+    v4l1_munmap(cam->pic, cam->vid_buf.size);
+    v4l1_close(cam->dev);
+    
     return 0;
 }
--- camorama-0.19/src/v4l.c	2009-06-24 15:01:55.000000000 +0200
+++ camorama-0.19.new/src/v4l.c	2009-06-24 14:54:09.000000000 +0200
@@ -2,6 +2,7 @@
 #include<time.h>
 #include<errno.h>
 #include<gnome.h>
+#include <libv4l1.h>
 #include "support.h"
 
 extern int frame_number;
@@ -87,7 +88,7 @@
 void camera_cap(cam * cam)
 {
    char *msg;
-   if(ioctl(cam->dev, VIDIOCGCAP, &cam->vid_cap) == -1) {
+   if(v4l1_ioctl(cam->dev, VIDIOCGCAP, &cam->vid_cap) == -1) {
       if(cam->debug == TRUE) {
          fprintf(stderr, "VIDIOCGCAP  --  could not get camera capabilities, exiting.....\n");
       }
@@ -161,7 +162,7 @@
 	cam->vid_pic.palette = VIDEO_PALETTE_RGB24;
 	cam->vid_pic.depth = 24;
 	//cam->vid_pic.palette = VIDEO_PALETTE_YUV420P;
-	if(ioctl(cam->dev, VIDIOCSPICT, &cam->vid_pic) == -1) {
+	if(v4l1_ioctl(cam->dev, VIDIOCSPICT, &cam->vid_pic) == -1) {
 		if(cam->debug) {
 			g_message("VIDIOCSPICT  --  could not set picture info, exiting....");
 		}
@@ -176,7 +177,7 @@
 //set_pic_info(cam);
    char *msg;
 	
-   if(ioctl(cam->dev, VIDIOCGPICT, &cam->vid_pic) == -1) {
+   if(v4l1_ioctl(cam->dev, VIDIOCGPICT, &cam->vid_pic) == -1) {
       msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev);
       error_dialog(msg);
       if(cam->debug == TRUE) {
@@ -201,7 +202,7 @@
 void get_win_info(cam * cam)
 {
    gchar *msg;
-   if(ioctl(cam->dev, VIDIOCGWIN, &cam->vid_win) == -1) {
+   if(v4l1_ioctl(cam->dev, VIDIOCGWIN, &cam->vid_win) == -1) {
       msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev);
       error_dialog(msg);
       if(cam->debug == TRUE) {
@@ -222,7 +223,7 @@
 void set_win_info(cam * cam)
 {
    gchar *msg;
-   if(ioctl(cam->dev, VIDIOCSWIN, &cam->vid_win) == -1) {
+   if(v4l1_ioctl(cam->dev, VIDIOCSWIN, &cam->vid_win) == -1) {
       msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev);
       error_dialog(msg);
       if(cam->debug == TRUE) {
@@ -239,7 +240,7 @@
 void set_buffer(cam * cam)
 {
    char *msg;
-   if(ioctl(cam->dev, VIDIOCGMBUF, &cam->vid_buf) == -1) {
+   if(v4l1_ioctl(cam->dev, VIDIOCGMBUF, &cam->vid_buf) == -1) {
       msg = g_strdup_printf(_("Could not connect to video device (%s).\nPlease check connection."), cam->video_dev);
       error_dialog(msg);
       if(cam->debug == TRUE) {

--- End Message ---
--- Begin Message ---
Source: camorama
Source-Version: 0.19-2.1

We believe that the bug you reported is fixed in the latest version of
camorama, which is due to be installed in the Debian FTP archive:

camorama_0.19-2.1.diff.gz
  to main/c/camorama/camorama_0.19-2.1.diff.gz
camorama_0.19-2.1.dsc
  to main/c/camorama/camorama_0.19-2.1.dsc
camorama_0.19-2.1_amd64.deb
  to main/c/camorama/camorama_0.19-2.1_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 569...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Alessio Treglia <quadris...@ubuntu.com> (supplier of updated camorama package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Tue, 18 May 2010 18:29:28 +0200
Source: camorama
Binary: camorama
Architecture: source amd64
Version: 0.19-2.1
Distribution: unstable
Urgency: low
Maintainer: Leo Costela <cost...@debian.org>
Changed-By: Alessio Treglia <quadris...@ubuntu.com>
Description: 
 camorama   - gnome utility to view and save images from a webcam
Closes: 569089
Changes: 
 camorama (0.19-2.1) unstable; urgency=low
 .
   * Non-maintainer upload.
   * Use libv4l1 as an emulation layer to ensure compatibility with the most
     new drivers (Closes: #569089).
Checksums-Sha1: 
 527177d5be0d411536e57487bcbba19bb183f572 1856 camorama_0.19-2.1.dsc
 23fbb48d9b07ba02b8e8ba6b9171f629d66f5a5b 7182 camorama_0.19-2.1.diff.gz
 3a3667cf7181414b6c9459d0d326fcd09a940f27 215932 camorama_0.19-2.1_amd64.deb
Checksums-Sha256: 
 44fcb592ff9011894bb8e3b93e3ffd6ce1950048d41bceea08dac6218da0205c 1856 
camorama_0.19-2.1.dsc
 599ddd63ff7cfe31a0724cb50f1b60805358fb7250706697650bae9d50bbac77 7182 
camorama_0.19-2.1.diff.gz
 a5590ae0da07a497a8dc5513b64eb81b0f688cdc202d77e813d1040d19eb8a76 215932 
camorama_0.19-2.1_amd64.deb
Files: 
 6a12cf80f6255c8b67c1ff8a5a57435f 1856 gnome optional camorama_0.19-2.1.dsc
 bd4e2a0fe6e2bc8b25990b788876da6d 7182 gnome optional camorama_0.19-2.1.diff.gz
 8e7de3520e67acd751c5b795495d247b 215932 gnome optional 
camorama_0.19-2.1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBCAAGBQJL8/WtAAoJEB5qw/OH8O2s7dQQAN+GLvbM0Tijc7joERGm25i0
xvKyQH8+VNXmnpSqO6iuJSAVoHENhpQm7uTK3/pUtxpXvg9bGg46DYlWxD/i+AxD
ufzFiwV/iL1DyNxk+NSmaERqjn9T1n/ripiHJrxR2gJ+lfGxlSSccey78Fdvitmz
vXAd2VSzQZ/V+7xGUUbBvxOBHALxpBA2agvWuKwneQFMNP/CiInILcvu6YlV/qz4
C8zSFkfyR7icBRipa0SFEPBuI96Gq1v8o2+BFOpO+duWeDLKnCTRlUAd6YUrNyUX
PZgl5W4jITl8zrgbffCHTXNY/BkJBY9fxr8htzGzNYgDp0IPScqi4YhToO/lajfq
lrkbCAUtQB8DFRl4f77T67TGRjoB8aobS1lnX5DkkyutY6xzl641Kd8XBmAFOJpD
A9WHhGeOe0Z9vVMjan2DhHTMYd0nZe3otGIgcKElKZg5Nxd7NPJrkE3bkdpLF+F3
F4cpE5zanNNbWS3e1/0prFsfSrQ7nNAsccuSL9GH1BUv1W6V8MJAj2NKlthR7ck4
FGdkWmUtMu3PRWqOLOcERpVtV+42zTNZ2qE+LsdGg98It2lGEe3OUUUcdOkGn3e/
q+DoJ9BHtwktCGhOxfY761SvyjTkb/tRKR06MikTZFnWpV4y7TeHvA6IKBHAbe8v
0zOe/k69Ta1qhOqfz1hf
=OKnJ
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to