Menu

#48 Link against libv4l1

None
closed
None
5
2021-02-01
2011-05-24
No

As discussed in https://sourceforge.net/tracker/?func=detail&aid=3272052&group_id=5776&atid=105776 linux kernel has dropped support for V4L1. There is however a library to provide V4L1-compatible access to V4L2 drivers. In the mentioned report, sikon suggested mjpeg tools use this. The attached patch is an attempt to make that change. It does compile for me, but I haven't tested it yet as my V4L device is currently unavailable.

Discussion

  • Martin von Gagern

    First version of patch

     
  • Bernhard Praschinger

    • assigned_to: nobody --> waldviertler
     
  • Bernhard Praschinger

    Thanks for posting the patch.

    I am not sure if this is the right way. The reason why I am unsure is that Klaus Stengel updated the zoran driver so it works on modern machine, and he hat posted a first ptach for the liblavrec. Where the mjpegtools use v4l2. That works only half way, but I think it is really a start:
    https://sourceforge.net/mailarchive/message.php?msg_id=27540662 (search for liblavrec.c.bz2)

    For a long term solution I would prefer that the mjpegtools native support v4l2.

     
  • Dimitri P.

    Dimitri P. - 2011-07-27

    > For a long term solution I would prefer that the mjpegtools native support v4l2.
    Me too )
    patch for liblavrec didn`t do his job. Also after compiling 2.0.0 I can`t find lavrec itself.

    [code]
    ~/i/mjpeg/mjpegtools-2.0.0 $ find . -iname 'lavrec*'
    ./docs/lavrec.1
    ./lavtools/.deps/lavrec.Po
    ./lavtools/lavrec.c

    ~/i/mjpeg/mjpegtools-2.0.0 $ gcc -I./utils/ -I./lavtools/ lavtools/lavrec.c -o lavtools/lavrec
    lavtools/lavrec.c: В функции «Usage»:
    lavtools/lavrec.c:224:38: ошибка: expected «)» before «VERSION»
    [/code]

    [code]
    ~/i/mjpeg/mjpegtools-2.0.0 $ lavvideo --help
    lavvideo: invalid option -- '-'
    lavvideo shows an overlay video window on the screen.

    usage: lavvideo [ options ]

    options: [defaults]
    -h help
    -v verbose operation
    -d debug information
    -c device specify device [/dev/video0]
    -t seconds the time the video window shows [infinite]
    -s size specify size [400x300]
    -o offset displacement on screen [5x5]
    -x xres screen x resolution [800]
    -b pixbits Bits per pixel (15,16,24,32) [32]
    -n tvnorm set pal/ntsc/secam [pal]
    -i input set input source (int) [0]
    -C chanlist channel list
    [...]
    --
    (c) 2000 Gernot Ziegler<gz@lysator.liu.se>
    ~/i/mjpeg/mjpegtools-2.0.0 $ lavvideo -s 768x576
    VIDIOCSCHAN failed.: Invalid argument
    [/code]

     
  • Bernhard Praschinger

    You are right, for some strange reason compiling fails on my machine too,

    When I add to after the line: #include "v4l.h"
    this line: #include <linux/videodev.h>
    to that files: lavvideo.c, liblavplay.c, liblavrec.c, testrec.c,
    compiling work and you should have again lavrec. Please add the lines, and tell us the result.

     
  • Steven Schultz

    Steven Schultz - 2021-02-01
    • status: open --> closed
    • Group: -->
     
  • Steven Schultz

    Steven Schultz - 2021-02-01

    10 years old - if it's still a problem create a new ticket.

     

Log in to post a comment.