Bug#569091: Uses obsolete V4L1 API

2010-03-10 Thread Damyan Ivanov
-=| gregor herrmann, Wed, Mar 10, 2010 at 12:19:03AM +0100 |=-
   4) Testing is a bit difficult for me with my cheap webcam, since 
   it
  doesn't support many functions; IIUIC some stuff expects a TV 
  card
  I'll try the package on the eee and see if it works.

The sample scripts give more-or-less same results as you reported, but 
the led on the camera never lits, which makes me wonder if anything is 
ever fetched from the camera.

Maybe the test scripts die too early when no tuner is found, maybe 
they are targetted at tv-tuner cards.


signature.asc
Description: Digital signature


Bug#569091: Uses obsolete V4L1 API

2010-03-10 Thread gregor herrmann
On Wed, 10 Mar 2010 11:48:06 +0200, Damyan Ivanov wrote:

   I'll try the package on the eee and see if it works.
 The sample scripts give more-or-less same results as you reported, but 
 the led on the camera never lits, which makes me wonder if anything is 
 ever fetched from the camera.

Do you get infos back from the camera like in my output? If yes, then
there should be some kind of communication :)

But the question with the LED is good. I admit that I haven't checked
yesterday but it worked the last time I checked, and I will have a
look later today.
 
 Maybe the test scripts die too early when no tuner is found, maybe 
 they are targetted at tv-tuner cards.

AFAICS some are and some partly. IIRC I tried with a simpler script
some time ago (which I have deleted of course but maybe we can write
up something quickly).

Cheers,
gregor
-- 
 .''`.   http://info.comodo.priv.at/ -- GPG Key IDs: 0x8649AA06, 0x00F3CFE4
 : :' :  Debian GNU/Linux user, admin,  developer - http://www.debian.org/
 `. `'   Member of VIBE!AT  SPI, fellow of Free Software Foundation Europe
   `-Rome wasn't burned in a day.  



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#569091: Uses obsolete V4L1 API

2010-03-10 Thread Damyan Ivanov
-=| gregor herrmann, Wed, Mar 10, 2010 at 11:07:21AM +0100 |=-
 On Wed, 10 Mar 2010 11:48:06 +0200, Damyan Ivanov wrote:
 
I'll try the package on the eee and see if it works.
  The sample scripts give more-or-less same results as you reported, but 
  the led on the camera never lits, which makes me wonder if anything is 
  ever fetched from the camera.
 
 Do you get infos back from the camera like in my output? If yes, then
 there should be some kind of communication :)

Yes, some of the scriipts report the camera min/max resolution, model, 
etc.

 But the question with the LED is good. I admit that I haven't 
 checked
 yesterday but it worked the last time I checked, and I will have a
 look later today.

It could be something with the my camera too. Cheese takes up to 10 
seconds to show the image (after liting the LED).

  Maybe the test scripts die too early when no tuner is found, maybe 
  they are targetted at tv-tuner cards.
 
 AFAICS some are and some partly. IIRC I tried with a simpler script
 some time ago (which I have deleted of course but maybe we can write
 up something quickly).

I think we better do. The patch is rather invasice and it would be 
nice if we have some prove it actualy improves things :)

I am unlikely to do this soon, unfortunately so help (esp. from people 
having dealt with cameras, this includes you gregor (:) is 
appreciated!


signature.asc
Description: Digital signature


Bug#569091: Uses obsolete V4L1 API

2010-03-10 Thread gregor herrmann
On Wed, 10 Mar 2010 11:07:21 +0100, gregor herrmann wrote:

 But the question with the LED is good. I admit that I haven't checked
 yesterday but it worked the last time I checked, and I will have a
 look later today.

 AFAICS some are and some partly. IIRC I tried with a simpler script
 some time ago (which I have deleted of course but maybe we can write
 up something quickly).

Good news:

What I did:
* Simplify examples/grab (by commenting out the $tuner lines),
  attached, diff below.
* With libvideo-capture-v4l-perl 0.902-1:

  The LED lights up, and:

gre...@nerys:/tmp$ ./grab
Device: name USB Camera (046d:08a2), type capture, channels 1, audios
0, sizes 48x32-640x480
Channel 0: name zc3xx, tuners 0, flags, type camera, norm 0
Audio Channel 0: volume 0, bass 0, treble 0, flags, name Microphone,
mode 0, balance 0, step 1
Picture Settings: brightness 32896, hue 0, colour 0, contrast 32768,
whiteness 39321, depth 8, palette 0

.unable to sync at ./grab line 120.

  The LED extinguishes.  

* With libvideo-capture-v4l-perl 0.902-2:

  LED comes up, output:

gre...@nerys:/tmp$ ./grab
Device: name USB Camera (046d:08a2), type capture, channels 1, audios
0, sizes 320x240-640x480
Channel 0: name zc3xx, tuners 0, flags, type camera, norm 0
Audio Channel 0: volume 0, bass 0, treble 0, flags, name Microphone,
mode 0, balance 0, step 1
Picture Settings: brightness 32896, hue 0, colour 0, contrast 32768,
whiteness 39321, depth 24, palette 4

^C
  
  So it looks like the sync works until I press Ctrl-C.


There's definitely a difference :)


Cheers,
gregor



grab diff:

--- /home/gregoa/src/svn-pkg-perl/trunk/libvideo-capture-v4l-perl/examples/grab 
2007-07-30 21:03:29.0 +0200
+++ /tmp/grab   2010-03-10 20:06:45.0 +0100
@@ -99,10 +99,10 @@
 print_picture $grab-picture;
 
 my $channel = $grab-channel (0);
-my $tuner = $grab-tuner (0);
-$tuner-mode(TUNER_PAL);
+#my $tuner = $grab-tuner (0);
+#$tuner-mode(TUNER_PAL);
 $channel-norm(MODE_PAL);
-$tuner-set;
+#$tuner-set;
 $channel-set;
 
 $RTL2 = 154250;
  
-- 
 .''`.   http://info.comodo.priv.at/ -- GPG Key IDs: 0x8649AA06, 0x00F3CFE4
 : :' :  Debian GNU/Linux user, admin,  developer - http://www.debian.org/
 `. `'   Member of VIBE!AT  SPI, fellow of Free Software Foundation Europe
   `-NP: Rolling Stones: Goingtomemphis
#!/usr/bin/perl

use Video::Capture::V4l;

sub print_capability {
   my $c=shift;
   print Device: ;
   print name ,$c-name;
   print , type;
   for (qw(capture tuner teletext overlay chromakey clipping frameram scales 
monochrome subcapture)) {
  print  $_ if eval \$c-$_;
   }
   print , channels ,$c-channels;
   print , audios ,$c-audios;
   print , sizes 
,$c-minwidth,x,$c-minheight,-,$c-maxwidth,x,$c-maxheight;
   print \n;
}

sub print_channel {
   my $c=shift;
   print Channel ,$c-channel,: ;
   print name ,$c-name;
   print , tuners ,$c-tuners;
   print , flags;
   for (qw(tuner audio)) {
  print  $_ if eval \$c-$_;
   }
   print , type;
   for (qw(tv camera)) {
  print  $_ if eval \$c-$_;
   }
   # PAL, NTSC, SECAM, PAL-NC, PAL-M, PAL-N, NTSC-Japan
   print , norm ,$c-norm;
   print \n;
}

sub print_tuner {
   my $c=shift;
   print Tuner ,$c-tuner,: ;
   print name ,$c-name;
   print , range ,$c-rangelow,-,$c-rangehigh;
   print , flags;
   for (qw(pal ntsc secam low norm stereo_on rds_on mbs_on)) {
  print  $_ if eval \$c-$_;
   }
   print , mode ,$c-mode;
   print , signal ,$c-signal;
   print \n;
}

sub print_audio {
   my $c=shift;
   print Audio Channel ,$c-audio,: ;
   print volume ,$c-volume;
   print , bass ,$c-bass;
   print , treble ,$c-treble;
   print , flags;
   for (qw(mute mutable volume bass treble)) {
  print  $_ if eval \$c-$_;
   }
   print , name ,$c-name;
   print , mode ,$c-mode;
   print , balance ,$c-balance;
   print , step ,$c-step;
   print \n;
}

sub print_picture {
   my $c=shift;
   print Picture Settings: ;
   print brightness ,$c-brightness;
   print , hue ,$c-hue;
   print , colour ,$c-colour;
   print , contrast ,$c-contrast;
   print , whiteness ,$c-whiteness;
   print , depth ,$c-depth;
   print , palette ,$c-palette;
   print \n;
}

$grab = new Video::Capture::V4l
   or die Unable to open Videodevice: $!;

print_capability $grab-capability;
for (0..$grab-capability-channels-1) {
   print_channel $grab-channel($_);
}

for($_=0; my $tuner = $grab-tuner($_); $_++) {
   last if $tuner-tuner != $_;
   print_tuner $tuner;
}

for($_=0; my $audio = $grab-audio($_); $_++) {
   last if $audio-audio != $_;
   print_audio $audio;
}

print_picture $grab-picture;

my $channel = $grab-channel (0);
#my $tuner = $grab-tuner (0);
#$tuner-mode(TUNER_PAL);
$channel-norm(MODE_PAL);
#$tuner-set;
$channel-set;

$RTL2 = 154250;
$RTL2 = 196250;

print $grab-freq ($RTL2),\n;

$|=1;

my $frame=0;
my $fr=$grab-capture ($frame, 640, 480);

for(;;) {
   my $nfr = $grab-capture (1-$frame, 640, 480);
   $grab-sync($frame) or die 

Bug#569091: Uses obsolete V4L1 API

2010-03-09 Thread Damyan Ivanov
-=| gregor herrmann, Mon, Mar 08, 2010 at 06:05:04PM +0100 |=-
 On Mon, 08 Mar 2010 07:30:18 +0200, Damyan Ivanov wrote:
 
   seems invalid, the module is an interface for v4l, not v4l2, so this is at
   best wishlist for a new module, certainly not a bug.
   note that the suggested libv4l is supposed to work just fine with the 
   module
   (according to libv4l docs).
  So it seems to me we want to patch this so it uses v4l1_* functions 
  from libv4l? (http://hansdegoede.livejournal.com/3636.html pointed in 
  the initial bug message).
 
 Ack, and it's probably not difficult for someone who speaks C.

I added v4l2.patch and the module compiles.

Please someone with a camera, test it. There are sample scripts in 
examples/.


signature.asc
Description: Digital signature


Bug#569091: Uses obsolete V4L1 API

2010-03-09 Thread gregor herrmann
On Tue, 09 Mar 2010 14:01:55 +0200, Damyan Ivanov wrote:

  Ack, and it's probably not difficult for someone who speaks C.
 I added v4l2.patch and the module compiles.

Cool!
 
 Please someone with a camera, test it. There are sample scripts in 
 examples/.

1) With your patch:

$ for s in examples/*; do echo === $s ===; PERL5LIB=/:examples perl $s; done
=== examples/autotune ===
Can't call method mode on an undefined value at examples/autotune line 25.
=== examples/capture ===
Can't call method mode on an undefined value at examples/capture line 85.
=== examples/dumpepg ===
Electronic Program Guide .epg

can't open .epg: No such file or directory at examples/dumpepg line 14
=== examples/epgview ===
=== examples/finder ===
Can't call method mode on an undefined value at examples/finder line 10.
=== examples/getepg ===
Undefined subroutine Video::Capture::V4l::VBI::v4l_open called at 
/usr/lib/perl5/Video/Capture/V4l.pm line 177.
=== examples/grab ===
Device: name USB Camera (046d:08a2), type capture, channels 1, audios 0, sizes 
48x32-640x480
Channel 0: name zc3xx, tuners 0, flags, type camera, norm 0
Audio Channel 0: volume 0, bass 0, treble 0, flags, name Microphone, mode 0, 
balance 0, step 1
Picture Settings: brightness 32896, hue 0, colour 0, contrast 32768, whiteness 
39321, depth 8, palette 0
Can't call method mode on an undefined value at examples/grab line 103.
=== examples/indexer ===
Can't call method mode on an undefined value at examples/indexer line 10.
=== examples/linux-dsp-ioctl.ph ===
=== examples/mp2enc ===
/tmp/vstream did not return a true value at examples/mp2enc line 10.
=== examples/mpgenc ===
/tmp/vstream did not return a true value at examples/mpgenc line 10.
=== examples/nbcmp3 ===
Undefined subroutine Video::Capture::V4l::VBI::v4l_open called at 
/usr/lib/perl5/Video/Capture/V4l.pm line 177.
=== examples/record ===
Device: name USB Camera (046d:08a2), type capture, channels 1, audios 0, sizes 
48x32-640x480
Channel 0: name zc3xx, tuners 0, flags, type camera, norm 0
Audio Channel 0: volume 0, bass 0, treble 0, flags, name Microphone, mode 0, 
balance 0, step 1
Picture Settings: brightness 32896, hue 0, colour 0, contrast 32768, whiteness 
39321, depth 8, palette 0
Can't call method mode on an undefined value at examples/record line 103.
=== examples/settv ===
Device: name USB Camera (046d:08a2), type capture, channels 1, audios 0, sizes 
48x32-640x480
Channel 0: name zc3xx, tuners 0, flags, type camera, norm 0
Audio Channel 0: volume 0, bass 0, treble 0, flags, name Microphone, mode 0, 
balance 0, step 1
Picture Settings: brightness 32896, hue 0, colour 0, contrast 32768, whiteness 
39321, depth 8, palette 0
Can't call method mode on an undefined value at examples/settv line 105.
=== examples/vbi ===
Undefined subroutine Video::Capture::V4l::VBI::v4l_open called at 
/usr/lib/perl5/Video/Capture/V4l.pm line 177.
=== examples/vbi-info ===
Undefined subroutine Video::Capture::V4l::VBI::v4l_open called at 
/usr/lib/perl5/Video/Capture/V4l.pm line 177.
=== examples/xsview ===
/tmp/vstream did not return a true value at examples/xsview line 9.


2) If I add v4l_open to Video::Capture::V4l::VBI (attachment vbi.diff):

$ for s in examples/*; do echo === $s ===; PERL5LIB=/:examples perl $s; done
=== examples/autotune ===
Can't call method mode on an undefined value at examples/autotune line 25.
=== examples/capture ===
Can't call method mode on an undefined value at examples/capture line 85.
=== examples/dumpepg ===
Electronic Program Guide .epg

can't open .epg: No such file or directory at examples/dumpepg line 14
=== examples/epgview ===
=== examples/finder ===
Can't call method mode on an undefined value at examples/finder line 10.
=== examples/getepg ===
Capturing VBI block. Make sure you have tuned in to a channel with EPG!
Aquisition may take up to twenty minutes (and more)!
Negative offset to vec in lvalue context at examples/getepg line 175.
=== examples/grab ===
Device: name USB Camera (046d:08a2), type capture, channels 1, audios 0, sizes 
48x32-640x480
Channel 0: name zc3xx, tuners 0, flags, type camera, norm 0
Audio Channel 0: volume 0, bass 0, treble 0, flags, name Microphone, mode 0, 
balance 0, step 1
Picture Settings: brightness 32896, hue 0, colour 0, contrast 32768, whiteness 
39321, depth 8, palette 0
Can't call method mode on an undefined value at examples/grab line 103.
=== examples/indexer ===
Can't call method mode on an undefined value at examples/indexer line 10.
=== examples/linux-dsp-ioctl.ph ===
=== examples/mp2enc ===
/tmp/vstream did not return a true value at examples/mp2enc line 10.
=== examples/mpgenc ===
/tmp/vstream did not return a true value at examples/mpgenc line 10.
=== examples/nbcmp3 ===
panic: sv_setpvn called with negative strlen at examples/nbcmp3 line 27.
=== examples/record ===
Device: name USB Camera (046d:08a2), type capture, channels 1, audios 0, sizes 
48x32-640x480
Channel 0: name zc3xx, tuners 0, flags, type camera, norm 0
Audio 

Bug#569091: Uses obsolete V4L1 API

2010-03-09 Thread Damyan Ivanov
-=| gregor herrmann, Tue, Mar 09, 2010 at 05:54:21PM +0100 |=-
 1) With your patch:
 
 $ for s in examples/*; do echo === $s ===; PERL5LIB=/:examples perl $s; done
 === examples/autotune ===
 Can't call method mode on an undefined value at examples/autotune line 25.
 === examples/capture ===
 Can't call method mode on an undefined value at examples/capture line 85.

These look like your camera has no tuner. Whatever that is. Nothing 
to worry about, I think.

 === examples/getepg ===
 Undefined subroutine Video::Capture::V4l::VBI::v4l_open called at 
 /usr/lib/perl5/Video/Capture/V4l.pm line 177.

your v4l1.patch helps here. Thanks!

 3) I'm wondering if we need to replace munmap/ioctl/mmap/read too?
I've started to do that some time ago (attachment v4l1.patch)
but now I don't see a difference.

Since libv4l has wrappers for these, I think using them is the way to 
go. Included in the debian package patch. (and thanks again!)

 4) Testing is a bit difficult for me with my cheap webcam, since it
doesn't support many functions; IIUIC some stuff expects a TV 
card

I'll try the package on the eee and see if it works.


signature.asc
Description: Digital signature


Bug#569091: Uses obsolete V4L1 API

2010-03-09 Thread gregor herrmann
On Tue, 09 Mar 2010 21:33:35 +0200, Damyan Ivanov wrote:

  === examples/autotune ===
  Can't call method mode on an undefined value at examples/autotune line 25.
  === examples/capture ===
  Can't call method mode on an undefined value at examples/capture line 85.
 These look like your camera has no tuner. Whatever that is. Nothing 
 to worry about, I think.

Ack, probably related to TV cards.
 
  === examples/getepg ===
  Undefined subroutine Video::Capture::V4l::VBI::v4l_open called at 
  /usr/lib/perl5/Video/Capture/V4l.pm line 177.
 your v4l1.patch helps here. Thanks!

Good :)
 
  3) I'm wondering if we need to replace munmap/ioctl/mmap/read too?
 I've started to do that some time ago (attachment v4l1.patch)
 but now I don't see a difference.
 Since libv4l has wrappers for these, I think using them is the way to 
 go. Included in the debian package patch. (and thanks again!)

I'm happy if my attempts in C/XS are useful :)
 
  4) Testing is a bit difficult for me with my cheap webcam, since it
 doesn't support many functions; IIUIC some stuff expects a TV 
 card
 I'll try the package on the eee and see if it works.

I can try on my laptop tomorrow, my desktop machine has a rather
non-default kernel ...

Cheers,
gregor
-- 
 .''`.   http://info.comodo.priv.at/ -- GPG Key IDs: 0x8649AA06, 0x00F3CFE4
 : :' :  Debian GNU/Linux user, admin,  developer - http://www.debian.org/
 `. `'   Member of VIBE!AT  SPI, fellow of Free Software Foundation Europe
   `-NP: Aziza MustafĂ  Zadeh: Dance Of Fire


signature.asc
Description: Digital signature


Bug#569091: Uses obsolete V4L1 API

2010-03-08 Thread gregor herrmann
On Mon, 08 Mar 2010 07:30:18 +0200, Damyan Ivanov wrote:

  seems invalid, the module is an interface for v4l, not v4l2, so this is at
  best wishlist for a new module, certainly not a bug.
  note that the suggested libv4l is supposed to work just fine with the module
  (according to libv4l docs).
 So it seems to me we want to patch this so it uses v4l1_* functions 
 from libv4l? (http://hansdegoede.livejournal.com/3636.html pointed in 
 the initial bug message).

Ack, and it's probably not difficult for someone who speaks C.
 
 Or drop the package, but this will also bring down ivtv-utils, which 
 depends on V::C::V4L and has about 300 popcon score :/

Ack, I'd try to avoid the removal.
 

Cheers,
gregor

-- 
 .''`.   http://info.comodo.priv.at/ -- GPG Key IDs: 0x8649AA06, 0x00F3CFE4
 : :' :  Debian GNU/Linux user, admin,  developer - http://www.debian.org/
 `. `'   Member of VIBE!AT  SPI, fellow of Free Software Foundation Europe
   `-NP: Donovan: Wynken Blynken And Nod


signature.asc
Description: Digital signature


Bug#569091: (Fwd) Re: (Fwd) Bug#569091: Uses obsolete V4L1 API

2010-03-07 Thread gregor herrmann
Reply from upstream via mail:

- Forwarded message from Marc Lehmann schm...@schmorp.de -

From: Marc Lehmann schm...@schmorp.de
To: gregor herrmann gre...@debian.org
Subject: Re: (Fwd) Bug#569091: Uses obsolete V4L1 API
Date: Fri, 5 Mar 2010 16:07:11 +0100
Cc: Marc Lehmann rt.cpan@schmorp.de

On Fri, Mar 05, 2010 at 03:56:04PM +0100, gregor herrmann gre...@debian.org 
wrote:
 We've received the following bug report in the Debian bug tracker
 (original at http://bugs.debian.org/569091).

seems invalid, the module is an interface for v4l, not v4l2, so this is at
best wishlist for a new module, certainly not a bug.

note that the suggested libv4l is supposed to work just fine with the module
(according to libv4l docs).

-- 
The choice of a   Deliantra, the free code+content MORPG
  -==- _GNU_  http://www.deliantra.net
  ==-- _   generation
  ---==---(_)__  __   __  Marc Lehmann
  --==---/ / _ \/ // /\ \/ /  schm...@schmorp.de
  -=/_/_//_/\_,_/ /_/\_\


- End forwarded message -

-- 
 .''`.   http://info.comodo.priv.at/ -- GPG Key IDs: 0x8649AA06, 0x00F3CFE4
 : :' :  Debian GNU/Linux user, admin,  developer - http://www.debian.org/
 `. `'   Member of VIBE!AT  SPI, fellow of Free Software Foundation Europe
   `-NP: Sting: Why Should I Cry For You?


signature.asc
Description: Digital signature


Bug#569091: Uses obsolete V4L1 API

2010-03-07 Thread Damyan Ivanov
-=| gregor herrmann, Sun, Mar 07, 2010 at 11:47:54PM +0100 |=-
 Reply from upstream via mail:
 
 On Fri, Mar 05, 2010 at 03:56:04PM +0100, gregor herrmann gre...@debian.org 
 wrote:
  We've received the following bug report in the Debian bug tracker
  (original at http://bugs.debian.org/569091).
 
 seems invalid, the module is an interface for v4l, not v4l2, so this is at
 best wishlist for a new module, certainly not a bug.
 
 note that the suggested libv4l is supposed to work just fine with the module
 (according to libv4l docs).

So it seems to me we want to patch this so it uses v4l1_* functions 
from libv4l? (http://hansdegoede.livejournal.com/3636.html pointed in 
the initial bug message).

Or drop the package, but this will also bring down ivtv-utils, which 
depends on V::C::V4L and has about 300 popcon score :/

The patch may even be useful for upstream.


signature.asc
Description: Digital signature


Bug#569091: Uses obsolete V4L1 API

2010-02-09 Thread Ben Hutchings
Package: libvideo-capture-v4l-perl
Version: 0.902-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.

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



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org