Bug#569091: Uses obsolete V4L1 API

gregor herrmann gregoa at debian.org
Tue Mar 9 16:54:21 UTC 2010


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 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 ===
Capturing VBI block. Make sure you have tuned in to a channel!
Negative offset to vec in lvalue context at examples/vbi line 53.
=== examples/vbi-info ===
VBI capturing started.

You can enter the following commands, ended by <return>

q   quit
c   clear

panic: sv_setpvn called with negative strlen at examples/vbi-info line 44.
=== examples/xsview ===
/tmp/vstream did not return a true value at examples/xsview line 9.


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.


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
   ...

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: Rolling Stones
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vbi.diff
Type: text/x-diff
Size: 689 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20100309/e28e085d/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v4l1.patch
Type: text/x-diff
Size: 5668 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20100309/e28e085d/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20100309/e28e085d/attachment-0001.pgp>


More information about the pkg-perl-maintainers mailing list