[sane-devel] Video4linux

Novak Levente lnovak@dragon.klte.hu
Wed, 11 Jun 2003 15:39:36 +0200 (MET DST)


On Tue, 10 Jun 2003, Henning Meier-Geinitz wrote:

> The backend is called "v4l".

OK, I was not at my Linux box and did not remember its name.

> > That is, only the first "scan"
> > produces a (more or less) correct image, while the others have the
> > succesive scanlines badly shifted. Is it normal?
> 
> If I remeber correctly, it didn't happen with my card the last time I
> checked.
> 



> > Can it be avoided?
> > I know I can use other software (like XawTV) to take snapshots, but if
> > there is such a SANE backend, it should work correctly.
> 
> The code of v4l suffers severe bitrot. The TODO mentions:
> 
>   * v4l:
>      - Geometry support is missing
>      - Frequency setting is missing

Maybe it is the problem? I have a PAL system. But anyway, the first scan
of the session is OK. Only the later ones have this problem.

>      - check if v4lctl distributed with xawtv can be used
>      - Use #define _LINUX_TIME_H 1 just before including videodev.h or  videodev2.h to avoid
>        trouble if /usr/include/linux is a link.
>      - Add v4l updates from Martin Palm, see
>        http://www.meier-geinitz.de/sane/misc/sane-v4l-update.tar.gz
>      - compilation seems to break when video4linux version 2 is installed?       

Don't think so. I have and use v4l2 on my system (kernel 2.4.21-pre5, but
with v4l2 patch), all the applications are linked against it (those which
use v4l, of course). v4l2 has a compatibility mode, which makes it appear
as v4l1 to the non-v4l2-compliant applications. But as v4l2 is not as
mature as v4l1 and its API has slightly changed IIRC, this might perturb
some programs.

> 
> Martin Palm worked on the v4l backend but I haven't heard from him for
> quite some time. YOu can try the code in the above mentioned archive
> but I don't remember if it really works.
> 
> You could bug Martin Palm or Julien Blache (who also wanted/wants to
> work on v4l) a bit :-)
>      
> > Also, a v4l2 backend would be welcome too.
> 
> Yes, please go ahead and write it :-)
> 

Would do it, but unfortunately don't speak C enough for this.


Levente