[mythtv] V4L2 bug ??

Shane Shrybman shrybman at aei.ca
Wed Feb 2 19:37:36 UTC 2005


On Wed, 2005-02-02 at 08:29 -0800, myth wrote:
> V4l2 appears to be valid only for cx8800 capture cards and falls back to 
> V4l for all other cards. I am using a BT878A capture card on a 2.6.8.1 
> md kernel which does support v4l2 but  NuppelVideoRecorder is using  
> this card via the V4l API rather than the V4l2 api. The V4l2 code in 
> NuppelVideorecorder is using a slightly more efficient way of performing 
> transfers (select).  A quick test, moving the brackets ( c code below) 
> allows the v4l2 code to be used resulting in a significant speed increase.
> 
> &re
> *----------------------------Open from NuppelVideRecorder.cpp
>    if (usingv4l2)
>    {
>        if (vcap.card[0] == 'B' && vcap.card[1] == 'T' && vcap.card[2] == 
> '8' && vcap.card[4] == '8')
>            correct_bttv = true;
> 
>        if (QString("cx8800") == QString((char *)vcap.driver))
>        {
>            channelfd = open(videodevice.ascii(), O_RDWR);
>            if (channelfd < 0)
>            {
>                VERBOSE(VB_IMPORTANT, QString("NVR: Can't open video 
> device: %1").arg(videodevice));
>                perror("open video:");
>                KillChildren();
>                return false;
>            }
> } //+++++++++++++ insert
>            inpixfmt = FMT_NONE;
>            InitFilters();
>            DoV4L2();
>            return false;
>        } //----------------- remove
>    }
>    channelfd = fd;
>    return true;
> 
> *

Yup, me too. I tried your change and my bt878 card is now using v4l2
too. I also set inpixfmt = FMT_YUV422P, because of the comment in
DoV4L2() that mentioned it as the preferred format.

BTW: I get a little scratchiness in the audio from my bt878 card. Do you
happen to see/hear this?

Regards,

Shane



More information about the mythtv-dev mailing list