[MPlayer-users] Mplayer v4l2 support

Steven Ellis pinguellis at yahoo.co.uk
Sun Feb 16 22:29:19 CET 2003


Managed to get the recent patch to work agains RC4
finally with a little tweaking, but still no audio
support. The patch appears to be based on the current
v4l driver, but doing a compare of the most recent
code there appears to be a lot of differences in the
Audio area.

One other issue I might be having is I run my machine
with an ALSA sound driver. Although this hasn't proved
to be an issue with xawtv or xawdecode.

Anyhow to get the driver to work a couple of tips
working with the original v4l2 patch and source files.

1. I had to modify the configure script as follows -

echocheck "Video 4 Linux 2 TV interface"
if test "$_tv_v4l2" = auto ; then
 _tv_v4l2=no  
 if test "$_tv" = yes && linux ; then
  for I in /dev/video /dev/video? ; do
    if test -c $I ; then
      cat > $TMPC <<EOF
#include <linux/videodev2.h>
int main(void) { return 0; }
EOF   
      cc_check && _tv_v4l2=yes
      break
    fi
  done
 fi
fi


2. I had to tweak the tv.c file so that the v4l2 tv
option was supported  -

/* ================== STREAM_TV =====================
*/
tvi_handle_t *tvi_init_dummy(char *device);
tvi_handle_t *tvi_init_v4l(char *device, char
*adevice);
tvi_handle_t *tvi_init_v4l2(char *device, char
*adevice);
tvi_handle_t *tvi_init_bsdbt848(char *device);

tvi_handle_t *tv_begin(void)
{
    if (!strcmp(tv_param_driver, "dummy"))
        return tvi_init_dummy(tv_param_device);
#ifdef HAVE_TV_V4L
    if (!strcmp(tv_param_driver, "v4l"))
        return tvi_init_v4l(tv_param_device,
tv_param_adevice);
#endif
#ifdef HAVE_TV_V4L2
    if (!strcmp(tv_param_driver, "v4l2"))
        return tvi_init_v4l2(tv_param_device,
tv_param_adevice);
#endif
#ifdef HAVE_TV_BSDBT848

3. In tvi_v4l2.c I had to include <linux/videodev2.h>
as well as videdev.h.

I hope to make up a suitable patch shortly, but i'd
like to get audio working correctly first.

Steve


=====
--
If you listen very carefully you can sometimes hear the dolphins sing

pinguellis at yahoo.co.uk

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the MPlayer-users mailing list