Debian Bug report logs - #569092
Uses obsolete V4L1 API

version graph

Package: vgrabbj; Maintainer for vgrabbj is Ludovic Rousseau <rousseau@debian.org>; Source for vgrabbj is src:vgrabbj.

Reported by: Ben Hutchings <ben@decadent.org.uk>

Date: Wed, 10 Feb 2010 00:45:01 UTC

Severity: serious

Tags: sid, squeeze

Merged with 555942

Found in version vgrabbj/0.9.6-3.1

Fixed in version vgrabbj/0.9.6-3.2

Done: Ben Hutchings <ben@decadent.org.uk>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, unknown-package@qa.debian.org:
Bug#569092; Package vgrabbbj. (Wed, 10 Feb 2010 00:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
New Bug report received and forwarded. Copy sent to unknown-package@qa.debian.org. (Wed, 10 Feb 2010 00:45:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Uses obsolete V4L1 API
Date: Wed, 10 Feb 2010 00:42:11 +0000
Package: vgrabbbj
Version: 0.9.6-3.1
Severity: serious

The V4L1 API is obsolete and does not work with most new V4L drivers.
You can use libv4l as an emulation layer; see
<http://hansdegoede.livejournal.com/3636.html>.

Since this program is no longer developed upstream and there are many
alternative webcam programs, it may be better to remove it instead.

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




Bug reassigned from package 'vgrabbbj' to 'vgrabbj'. Request was from Ben Hutchings <ben@decadent.org.uk> to control@bugs.debian.org. (Wed, 10 Feb 2010 01:03:09 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions 0.9.6-3.1. Request was from Ben Hutchings <ben@decadent.org.uk> to control@bugs.debian.org. (Wed, 10 Feb 2010 01:03:10 GMT) Full text and rfc822 format available.

Bug Marked as found in versions vgrabbj/0.9.6-3.1. Request was from Ben Hutchings <ben@decadent.org.uk> to control@bugs.debian.org. (Wed, 10 Feb 2010 01:03:11 GMT) Full text and rfc822 format available.

Added tag(s) sid and squeeze. Request was from Ben Hutchings <ben@decadent.org.uk> to control@bugs.debian.org. (Wed, 10 Feb 2010 01:03:12 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Michael Janssen <jamuraa@debian.org>:
Bug#569092; Package vgrabbj. (Tue, 06 Apr 2010 20:51:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Petter Reinholdtsen <pere@hungry.com>:
Extra info received and forwarded to list. Copy sent to Michael Janssen <jamuraa@debian.org>. (Tue, 06 Apr 2010 20:51:10 GMT) Full text and rfc822 format available.

Message #18 received at 569092@bugs.debian.org (full text, mbox):

From: Petter Reinholdtsen <pere@hungry.com>
To: 569092@bugs.debian.org
Subject: Re: Uses obsolete V4L1 API
Date: Tue, 6 Apr 2010 22:31:02 +0200
[Ben Hutchings]
> Since this program is no longer developed upstream and there are
> many alternative webcam programs, it may be better to remove it
> instead.

This program is a vital component of stopmotion, a great program for
creating animation movies, so I would very much like it to stay in the
archive, with v4l2 support. :)

Happy hacking,
-- 
Petter Reinholdtsen




Forcibly Merged 555942 569092. Request was from Ben Hutchings <ben@decadent.org.uk> to control@bugs.debian.org. (Thu, 29 Jul 2010 16:00:03 GMT) Full text and rfc822 format available.

Reply sent to Ben Hutchings <ben@decadent.org.uk>:
You have taken responsibility. (Thu, 29 Jul 2010 16:36:33 GMT) Full text and rfc822 format available.

Notification sent to Ben Hutchings <ben@decadent.org.uk>:
Bug acknowledged by developer. (Thu, 29 Jul 2010 16:36:33 GMT) Full text and rfc822 format available.

Message #25 received at 569092-close@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: 569092-close@bugs.debian.org
Subject: Bug#569092: fixed in vgrabbj 0.9.6-3.2
Date: Thu, 29 Jul 2010 16:32:34 +0000
Source: vgrabbj
Source-Version: 0.9.6-3.2

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

vgrabbj_0.9.6-3.2.diff.gz
  to main/v/vgrabbj/vgrabbj_0.9.6-3.2.diff.gz
vgrabbj_0.9.6-3.2.dsc
  to main/v/vgrabbj/vgrabbj_0.9.6-3.2.dsc
vgrabbj_0.9.6-3.2_i386.deb
  to main/v/vgrabbj/vgrabbj_0.9.6-3.2_i386.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 569092@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ben Hutchings <ben@decadent.org.uk> (supplier of updated vgrabbj 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 ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 29 Jul 2010 17:01:52 +0100
Source: vgrabbj
Binary: vgrabbj
Architecture: i386 source
Version: 0.9.6-3.2
Distribution: unstable
Urgency: low
Maintainer: Michael Janssen <jamuraa@debian.org>
Changed-By: Ben Hutchings <ben@decadent.org.uk>
Closes: 494939 569092
Description: 
 vgrabbj    - grabs a image from a camera and puts it in jpg/png format
Changes: 
 vgrabbj (0.9.6-3.2) unstable; urgency=low
 .
   * Non-maintainer upload.
   * Modify to use libv4l1 for compatibility with current camera drivers
     (Closes: #569092)
   * Initialise all configuration variables in init_defaults()
     (Closes: #494939)
   * Bump Standards Version to 3.9.1.0
     - Fix filename of full GPLv2 text
   * Add explicit copyright line to copyright file
   * Use debhelper 7
   * Add ${misc:Depends} to vgrabbj dependencies
   * Remove config.sub and config.guess in 'clean' rule
   * Explicitly check for missing Makefile in 'clean' rule
Checksums-Sha1: 
 216804902607e6a6cf4c4fc3697595c7c4fe83dd 1705 vgrabbj_0.9.6-3.2.dsc
 086b19f00aee4a4a3fb607198a27c13a333fd6fd 86372 vgrabbj_0.9.6-3.2.diff.gz
 1e9a9513afee47cff9d7b06b53e427e041e0f426 51392 vgrabbj_0.9.6-3.2_i386.deb
Checksums-Sha256: 
 7c9c47d715b295a6642965c6d7463b2e73852928600e8cd9eacea9ff175cb06c 1705 vgrabbj_0.9.6-3.2.dsc
 12b4d4e5c29ce1a56fe07c9d13cc56b12dc88e6c75096e3b7fb98e0a40effdfb 86372 vgrabbj_0.9.6-3.2.diff.gz
 15c368a9a8eba94f57715d22f3eae928514ddfb5751a9afaf8c252196433f1e6 51392 vgrabbj_0.9.6-3.2_i386.deb
Files: 
 47442b8c029dbf277f817da836c001a3 1705 graphics optional vgrabbj_0.9.6-3.2.dsc
 d50bdcfda45a24d1985f5dbad3eaa6ac 86372 graphics optional vgrabbj_0.9.6-3.2.diff.gz
 d248647a42bdcc326ebc9a3788c3c548 51392 graphics optional vgrabbj_0.9.6-3.2_i386.deb

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

iQIVAwUBTFGrvOe/yOyVhhEJAQqD/xAAxxdzb98QUNBqnkjwa14lu0N4er05u9rr
nISLGWNKlduLCNo1ZKt1M/m/OgUyi0cFsdmYgPJc3DJq2CvaC07P+vI20lu/K255
kCuZnv2AZyHSPCy5zFfUSPwyxYqrTksiBFkmkn54N+Uq2juh2bCpDc0yZ436zcs1
ReuJhK2WEoHaC82THVA9O+1vPfkLopvoNbQVdcG/H4NHL/W3ZGDyl+Wvl33Gh9vC
APjHKEAOnbydq4bC2u35yur7iU3lsW5mwmkuU/R5VM+6Y4H9tdLccnIBtFdsLwYA
0YkDRhj3F3Woch5sP/oV7eNA3jgislgwCJfEczKZSobaE1Q4gcz/D0qBx/1CdhwK
4jjKD21xiSmblTl8jJufnYOT5qkEclxfZXv0AdA4oge3nL5+0Ynm7tzfy6e16v4S
q/naqYwRKuBJ3JuKj5eDu7ey7I/Xt0Ymjy4nxChooNgSSF1/RJ46rEWO3SzAvTp2
TbumiL1hz+CgaI2BpTIDYxXm22hhzTnMmdkcizr12EpUxhKZQdREZip/rzHh6X5C
2wneEQ79XeVBCxHMo6XdZBeisi0aWcRe8MFT/GKaz+YvUcD1EPgVFCArYlwR+WWj
/5zELgcXBEH0G8a/zSpN+2JGXw2v4tfMvF8aEzw889R1Ff5eHH1N0Rx266QKSoId
I/ryLhy60ds=
=Sylt
-----END PGP SIGNATURE-----





Reply sent to Ben Hutchings <ben@decadent.org.uk>:
You have taken responsibility. (Thu, 29 Jul 2010 16:36:33 GMT) Full text and rfc822 format available.

Notification sent to Hector <hector.oron@gmail.com>:
Bug acknowledged by developer. (Thu, 29 Jul 2010 16:36:34 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Michael Janssen <jamuraa@debian.org>:
Bug#569092; Package vgrabbj. (Thu, 29 Jul 2010 16:36:35 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Michael Janssen <jamuraa@debian.org>. (Thu, 29 Jul 2010 16:36:35 GMT) Full text and rfc822 format available.

Message #35 received at 569092@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: 569092@bugs.debian.org
Subject: NMU diff for vgrabbj 0.9.6-3.2
Date: Thu, 29 Jul 2010 17:34:53 +0100
[Message part 1 (text/plain, inline)]
The NMU diff is below.  This excludes updates to autotools-generated
files, which I made by running:

    AUTOMAKE=automake-1.4 ACLOCAL=1.4 autoreconf

Ben.

diff -u vgrabbj-0.9.6/v_config.c vgrabbj-0.9.6/v_config.c
--- vgrabbj-0.9.6/v_config.c
+++ vgrabbj-0.9.6/v_config.c
@@ -156,6 +156,7 @@
 struct vconfig *init_defaults(struct vconfig *vconf) {
   int idx = 0;
   /* Set defaults */
+  memset(vconf, 0, sizeof(*vconf));
   vconf->debug      = LOGLEVEL;
   vconf->quality    = DEFAULT_QUALITY;
   vconf->in         = strcpy(malloc(strlen(DEFAULT_VIDEO_DEV)+1),DEFAULT_VIDEO_DEV);
@@ -276,10 +277,10 @@
  */
   int dev;
   FILE *x;
-  if ( (dev=open(vconf->in, O_RDONLY)) < 0) {
+  if ( (dev=v4l1_open(vconf->in, O_RDONLY)) < 0) {
     v_error(vconf, LOG_CRIT, "Can't open \"%s\" as VideoDevice!", vconf->in);
   } else {
-    close(dev);
+    v4l1_close(dev);
   }
   
   if ( !(x=fopen(vconf->out, "w+"))) {
@@ -341,11 +342,11 @@
   v_error(vconf, LOG_INFO, "Trying palette %s", plist[palette].name);
   vconf->vpic.palette=palette;
 
-  if (ioctl(dev, VIDIOCSPICT, &vconf->vpic) < 0) {
+  if (v4l1_ioctl(dev, VIDIOCSPICT, &vconf->vpic) < 0) {
     v_error(vconf, LOG_WARNING, "Unable to set palette");
     return 0;
   }
-  if (ioctl(dev, VIDIOCGPICT, &vconf->vpic) < 0) {
+  if (v4l1_ioctl(dev, VIDIOCGPICT, &vconf->vpic) < 0) {
     v_error(vconf, LOG_WARNING, "Unable to get palette info");
     return 0;
   }
@@ -364,25 +365,25 @@
 
   v_error(vconf, LOG_INFO, "Checking settings of device %s", vconf->in);
   
-  while (ioctl(vconf->dev, VIDIOCGCAP, &vconf->vcap) < 0)
+  while (v4l1_ioctl(vconf->dev, VIDIOCGCAP, &vconf->vcap) < 0)
     v_error(vconf, LOG_ERR, "Problem getting video capabilities");
   if ( (vconf->vcap.maxwidth < vconf->win.width) ||
        (vconf->vcap.minwidth > vconf->win.width) ||
        (vconf->vcap.maxheight < vconf->win.height) ||
        (vconf->vcap.minheight > vconf->win.height) )
     v_error(vconf, LOG_CRIT, "Device doesn't support width/height");
-  while (ioctl(vconf->dev, VIDIOCGWIN, &twin))
+  while (v4l1_ioctl(vconf->dev, VIDIOCGWIN, &twin))
     v_error(vconf, LOG_ERR, "Problem getting window information");
   vconf->win.flags=twin.flags;
   vconf->win.x=twin.x;
   vconf->win.y=twin.y;
   vconf->win.chromakey=twin.chromakey;
   if (vconf->windowsize)
-    while (ioctl(vconf->dev, VIDIOCSWIN, &vconf->win) )
+    while (v4l1_ioctl(vconf->dev, VIDIOCSWIN, &vconf->win) )
       v_error(vconf, LOG_ERR, "Problem setting window size");
-  while (ioctl(vconf->dev, VIDIOCGWIN, &vconf->win) <0)
+  while (v4l1_ioctl(vconf->dev, VIDIOCGWIN, &vconf->win) <0)
     v_error(vconf, LOG_ERR, "Problem getting window size");
-  while (ioctl(vconf->dev, VIDIOCGPICT, &vconf->vpic) < 0)
+  while (v4l1_ioctl(vconf->dev, VIDIOCGPICT, &vconf->vpic) < 0)
     v_error(vconf, LOG_ERR, "Problem getting picture properties");
 
   /* HERE we actually TRY to get a palette the device delivers.
@@ -422,7 +423,7 @@
     
   v_error(vconf, LOG_DEBUG, "Set palette successfully to %s", plist[vconf->vpic.palette].name);
 
-  if ( (ioctl(vconf->dev, VIDIOCGMBUF, &vconf->vbuf) < 0) || 
+  if ( (v4l1_ioctl(vconf->dev, VIDIOCGMBUF, &vconf->vbuf) < 0) || 
        ((vconf->autobrightness) && 
 	(vconf->vpic.palette==VIDEO_PALETTE_RGB24)) ||
        (vconf->nousemmap) )
diff -u vgrabbj-0.9.6/debian/rules vgrabbj-0.9.6/debian/rules
--- vgrabbj-0.9.6/debian/rules
+++ vgrabbj-0.9.6/debian/rules
@@ -20,6 +20,8 @@
 configure-stamp:
 	dh_testdir
 	# Add here commands to configure the package.
+	cp -f /usr/share/misc/config.sub config.sub
+	cp -f /usr/share/misc/config.guess config.guess
 	./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --sysconfdir=\$${prefix}/../etc --disable-timestamp
 	# Configure doesn't seem to take to my --sysconfdir, fix the config file
 	# location
@@ -41,18 +43,14 @@
 clean:
 	dh_testdir
 	dh_testroot
-	rm -f build-stamp configure-stamp
-	-$(MAKE) distclean
+	! [ -f Makefile ] || $(MAKE) distclean
+	rm -f config.sub config.guess
 	dh_clean
-	-test -r /usr/share/misc/config.sub && \
-   cp -f /usr/share/misc/config.sub config.sub
-	-test -r /usr/share/misc/config.guess && \
-	 cp -f /usr/share/misc/config.guess config.guess
 
 install: build
 	dh_testdir
 	dh_testroot
-	dh_clean -k
+	dh_prep
 	dh_installdirs
 	$(MAKE) install prefix=$(CURDIR)/debian/vgrabbj/usr 
 # Build architecture-independent files here.
diff -u vgrabbj-0.9.6/debian/control vgrabbj-0.9.6/debian/control
--- vgrabbj-0.9.6/debian/control
+++ vgrabbj-0.9.6/debian/control
@@ -5,11 +5,11 @@
-Build-Depends: debhelper (>= 4.0.0), libjpeg62-dev, libpng3-dev, ftplib-dev, autotools-dev
-Standards-Version: 3.7.2.0
+Build-Depends: debhelper (>= 7), libjpeg62-dev, libpng3-dev, ftplib-dev, autotools-dev, libv4l-dev, pkg-config
+Standards-Version: 3.9.1.0
 Homepage: http://vgrabbj.gecius.de/
 
 Package: vgrabbj
 Architecture: any
-Depends: ${shlibs:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: grabs a image from a camera and puts it in jpg/png format
  vgrabbj is a program that will grab an image from a v4l compatible
  device (usually a webcam of some sort) and save it in a jpg or png
- file.  It only works on v4l devices that can be set to 24-bit mode.
+ file.
diff -u vgrabbj-0.9.6/debian/compat vgrabbj-0.9.6/debian/compat
--- vgrabbj-0.9.6/debian/compat
+++ vgrabbj-0.9.6/debian/compat
@@ -1 +1 @@
-4
+7
diff -u vgrabbj-0.9.6/debian/copyright vgrabbj-0.9.6/debian/copyright
--- vgrabbj-0.9.6/debian/copyright
+++ vgrabbj-0.9.6/debian/copyright
@@ -5,7 +5,9 @@
 
 Upstream Author: Jens Gecius <jens@gecius.de>
 
-Copyright:
+Copyright: Copyright 2000, 2001, 2002 Jens Gecius
+
+License:
 
    This package is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -24,3 +26,4 @@
 On Debian GNU/Linux systems, the complete text of the GNU General
-Public License can be found in `/usr/share/common-licenses/GPL'.
+Public License version 2 can be found in
+`/usr/share/common-licenses/GPL-2'.
 
diff -u vgrabbj-0.9.6/debian/changelog vgrabbj-0.9.6/debian/changelog
--- vgrabbj-0.9.6/debian/changelog
+++ vgrabbj-0.9.6/debian/changelog
@@ -1,3 +1,20 @@
+vgrabbj (0.9.6-3.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Modify to use libv4l1 for compatibility with current camera drivers
+    (Closes: #569092)
+  * Initialise all configuration variables in init_defaults()
+    (Closes: #494939)
+  * Bump Standards Version to 3.9.1.0
+    - Fix filename of full GPLv2 text
+  * Add explicit copyright line to copyright file
+  * Use debhelper 7
+  * Add ${misc:Depends} to vgrabbj dependencies
+  * Remove config.sub and config.guess in 'clean' rule
+  * Explicitly check for missing Makefile in 'clean' rule
+
+ -- Ben Hutchings <ben@decadent.org.uk>  Thu, 29 Jul 2010 17:01:52 +0100
+
 vgrabbj (0.9.6-3.1) unstable; urgency=low
 
   * Non-maintainer upload to solve RC bug.
only in patch2:
unchanged:
--- vgrabbj-0.9.6.orig/vgrabbj.h
+++ vgrabbj-0.9.6/vgrabbj.h
@@ -50,6 +50,8 @@
 #include <mcheck.h>
 #include <sys/mman.h>
 
+#include <libv4l1.h>
+
 #if defined(HAVE_LIBTTF)
 #if defined(HAVE_FREETYPE_FREETYPE_H)
 #define LIBTTF 1
only in patch2:
unchanged:
--- vgrabbj-0.9.6.orig/configure.in
+++ vgrabbj-0.9.6/configure.in
@@ -99,6 +99,8 @@
 AC_PROG_GCC_TRADITIONAL
 AC_FUNC_STRFTIME
 
+PKG_CHECK_MODULES([LIBV4L1], [libv4l1])
+
 if test \"x${prefix}\" = \"xNONE\"; then
   AC_DEFINE_UNQUOTED(SYSCONF_DIR,"${ac_default_prefix}/etc/vgrabbj.conf")
 else
only in patch2:
unchanged:
--- vgrabbj-0.9.6.orig/vgrabbj.c
+++ vgrabbj-0.9.6/vgrabbj.c
@@ -135,19 +135,19 @@
   struct video_picture pic;
   int dev;
 
-  if ( (dev = open(in, O_RDONLY)) < 0 ) {
+  if ( (dev = v4l1_open(in, O_RDONLY)) < 0 ) {
     fprintf(stderr, "Can't open device %s\n", in);
     exit(1);
   }
-  if (ioctl(dev, VIDIOCGCAP, &cap) < 0) {
+  if (v4l1_ioctl(dev, VIDIOCGCAP, &cap) < 0) {
     fprintf(stderr, "Can't get capabilities of device %s\n", in);
     exit(1);
   }
-  if (ioctl(dev, VIDIOCGPICT, &pic) < 0) {
+  if (v4l1_ioctl(dev, VIDIOCGPICT, &pic) < 0) {
     fprintf(stderr, "Can't get picture properties of device %s\n", in);
     exit(1);
   }
-  if (ioctl(dev, VIDIOCGWIN, &win) < 0) {
+  if (v4l1_ioctl(dev, VIDIOCGWIN, &win) < 0) {
     fprintf(stderr, "Can't get overlay values of device %s\n", in);
     exit(1);
   }
@@ -178,7 +178,7 @@
 	  pic.brightness, pic.hue, pic.colour, pic.contrast,
 	  pic.whiteness, pic.depth, plist[pic.palette].name, pic.palette,
 	  win.width, win.height, win.chromakey);
-  dev=close(dev);
+  dev=v4l1_close(dev);
   if (dev)
     fprintf(stderr, "Error occured while closing %s\n", in);
   exit(0);
@@ -201,11 +201,11 @@
 
     /* and Re-initialize the palette, in case someone changed it meanwhile */
 
-    while (ioctl(vconf->dev, VIDIOCSPICT, &vconf->vpic) < 0 )
+    while (v4l1_ioctl(vconf->dev, VIDIOCSPICT, &vconf->vpic) < 0 )
       v_error(vconf, LOG_ERR, "Device %s couldn't be reset to known palette %s",
 	      vconf->in, vconf->vpic.palette);
     if (vconf->windowsize)
-      while (ioctl(vconf->dev, VIDIOCSWIN, &vconf->win) )
+      while (v4l1_ioctl(vconf->dev, VIDIOCSWIN, &vconf->win) )
 	v_error(vconf, LOG_ERR, "Problem setting window size"); // exit
 
     set_picture_parms(vconf);
@@ -224,12 +224,12 @@
       if (vconf->autobrightness && vconf->vpic.palette==VIDEO_PALETTE_RGB24) {
 	v_error(vconf, LOG_INFO, "Doing brightness adjustment");
 	do {
-	  while (read(vconf->dev, vconf->buffer, size) < size)
+	  while (v4l1_read(vconf->dev, vconf->buffer, size) < size)
 	    v_error(vconf, LOG_ERR, "Error reading from %s", vconf->in);
 	  f = brightness_adj(vconf, &newbright);
 	  if (f) {
 	    vconf->vpic.brightness += (newbright << 8);
-	    if (ioctl(vconf->dev, VIDIOCSPICT, &vconf->vpic)==-1) 
+	    if (v4l1_ioctl(vconf->dev, VIDIOCSPICT, &vconf->vpic)==-1) 
 	      v_error(vconf, LOG_WARNING, "Problem setting brightness");
 	    err_count++;
 	  
@@ -242,7 +242,7 @@
 	v_error(vconf, LOG_INFO, "Brightness adjusted");
       } else {
 	v_error(vconf, LOG_DEBUG, "Using normal read for image grabbing");
-	read(vconf->dev, vconf->buffer, size);
+	v4l1_read(vconf->dev, vconf->buffer, size);
       }
     } while (discard--);
 
@@ -259,7 +259,7 @@
 	  v_error(vconf, LOG_ERR, "Could not grab frame (100 tries)");
 	  break;
 	}
-      } while (ioctl(vconf->dev, VIDIOCMCAPTURE, &vconf->vmap) < 0);
+      } while (v4l1_ioctl(vconf->dev, VIDIOCMCAPTURE, &vconf->vmap) < 0);
 
       err_count=0;
       do {
@@ -267,7 +267,7 @@
 	  v_error(vconf, LOG_ERR, "Could not sync with frame (100 tries)");
 	  break;
 	}
-      } while (ioctl(vconf->dev, VIDIOCSYNC, &vconf->vmap.frame) < 0);
+      } while (v4l1_ioctl(vconf->dev, VIDIOCSYNC, &vconf->vmap.frame) < 0);
 
       vconf->buffer=memcpy(vconf->buffer, vconf->map+vconf->vbuf.offsets[vconf->vmap.frame], size);
 
only in patch2:
unchanged:
--- vgrabbj-0.9.6.orig/Makefile.am
+++ vgrabbj-0.9.6/Makefile.am
@@ -19,6 +19,8 @@
 
 bin_PROGRAMS = vgrabbj
 vgrabbj_SOURCES = vgrabbj.c vgrabbj.h v_config.c v_config.h font.c ccvt_c.c ccvt.h v_ftp.c v_ftp.h v_writer.c v_writer.h v_utils.c v_utils.h v_stamp.c v_stamp.h v_plist.h v_options.h
+vgrabbj_CFLAGS = @LIBV4L1_CFLAGS@
+vgrabbj_LDADD = @LIBV4L1_LIBS@
 
 #sysconf_DATA = vgrabbj.conf.default
 EXTRA_DIST = vgrabbj.conf.default $(man_MANS)
only in patch2:
unchanged:
--- vgrabbj-0.9.6.orig/v_utils.c
+++ vgrabbj-0.9.6/v_utils.c
@@ -27,9 +27,9 @@
 
 void init_mmap(struct vconfig *vconf) {
   if (vconf->usemmap) {
-    if ( (vconf->map = mmap(0, vconf->vbuf.size, PROT_READ, MAP_SHARED, vconf->dev, 0)) < 0 )
+    if ( (vconf->map = v4l1_mmap(0, vconf->vbuf.size, PROT_READ, MAP_SHARED, vconf->dev, 0)) < 0 )
       v_error(vconf, LOG_CRIT, "Could not get mmap-area of size %d", vconf->vbuf.size);
-    if ( ioctl(vconf->dev, VIDIOCGMBUF, &vconf->vbuf) < 0 )
+    if ( v4l1_ioctl(vconf->dev, VIDIOCGMBUF, &vconf->vbuf) < 0 )
       v_error(vconf, LOG_CRIT, "Could not initialize mmap-vars");
     
     v_error(vconf, LOG_DEBUG, "Size allocated for framebuffer: %d", vconf->vbuf.size);
@@ -44,7 +44,7 @@
 
 void free_mmap(struct vconfig *vconf) {
   if (vconf->map) {
-    if (!munmap(vconf->map, vconf->vbuf.size)) {
+    if (!v4l1_munmap(vconf->map, vconf->vbuf.size)) {
       v_error(vconf, LOG_DEBUG, "mmap'ed area 'freed'");
       vconf->map=NULL;
     }
@@ -60,7 +60,7 @@
 
 void open_device(struct vconfig *vconf) {
   int err_count=0;
-  while ( ((vconf->dev=open(vconf->in, O_RDONLY)) < 0) && (!(err_count++>200)) )
+  while ( ((vconf->dev=v4l1_open(vconf->in, O_RDONLY)) < 0) && (!(err_count++>200)) )
     usleep(25000);
   if (err_count>200)
     v_error(vconf, LOG_ERR, "Problem opening input-device %s", vconf->in);
@@ -73,7 +73,7 @@
 
 void close_device(struct vconfig *vconf) {
   if(vconf->dev) {
-    if ( (vconf->dev=close(vconf->dev)) )
+    if ( (vconf->dev=v4l1_close(vconf->dev)) )
       v_error(vconf, LOG_ERR, "Error while closing %s", vconf->in);
     else
       v_error(vconf, LOG_DEBUG, "Device %s closed", vconf->in);
@@ -95,7 +95,7 @@
 	  vconf->hue, vconf->brightness, vconf->colour,
 	  vconf->contrast, vconf->whiteness);
   
-  if (ioctl(vconf->dev, VIDIOCGPICT, &(vconf->vpic)) == -1) {
+  if (v4l1_ioctl(vconf->dev, VIDIOCGPICT, &(vconf->vpic)) == -1) {
     perror ("PICTURE");
     return (-1);
   }
@@ -111,7 +111,7 @@
   if (vconf->whiteness > -1) 
     vconf->vpic.whiteness = vconf->whiteness;
   
-  if (ioctl(vconf->dev, VIDIOCSPICT, &(vconf->vpic)) == -1) {
+  if (v4l1_ioctl(vconf->dev, VIDIOCSPICT, &(vconf->vpic)) == -1) {
     perror ("PICTURE");
     return (-1);
   }
--- END ---

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 07 Mar 2011 08:53:23 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 06:44:09 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.