[mythtv] V4L2 bug ??

myth myth at linuxide.org
Wed Feb 2 16:29:27 UTC 2005


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;

*


More information about the mythtv-dev mailing list