Ticket #1068: NuppelVideoRecorder.v4l2.only.diff

File NuppelVideoRecorder.v4l2.only.diff, 1.7 KB (added by gnome42@…, 18 years ago)

use V4L2 example patch

  • NuppelVideoRecorder.cpp

    old new  
    927927    }
    928928
    929929    usingv4l2 = true;
     930    if (getenv("NO_V4L2"))
     931    {
     932        VERBOSE(VB_IMPORTANT, "NVR: Not using V4L2 (NO_V4L2 is set)");
     933        usingv4l2 = false;
     934        channelfd = fd;
     935        return true;
     936    }
     937
    930938
    931939    struct v4l2_capability vcap;
    932940    memset(&vcap, 0, sizeof(vcap));
     
    955963            correct_bttv = true;
    956964
    957965        QString driver = (char *)vcap.driver;
    958         if (driver == "cx8800" || driver == "go7007")
    959         {
    960             channelfd = open(videodevice.ascii(), O_RDWR);
    961             if (channelfd < 0)
    962             {
    963                 VERBOSE(VB_IMPORTANT, QString("NVR: Can't open video device: %1").arg(videodevice));
    964                 perror("open video:");
    965                 KillChildren();
    966                 return false;
    967             }
    968 
    969             if (driver == "go7007")
    970             {
    971                 go7007 = true;
    972             }
    973            
    974             inpixfmt = FMT_NONE;
    975             InitFilters();
    976             DoV4L2();
     966        //if (driver == "cx8800" || driver == "go7007")
     967        channelfd = open(videodevice.ascii(), O_RDWR);
     968        if (channelfd < 0)
     969        {
     970            VERBOSE(VB_IMPORTANT, QString("NVR: Can't open video device: %1").arg(videodevice));
     971            perror("open video:");
     972            KillChildren();
    977973            return false;
    978974        }
     975
     976        if (driver == "go7007")
     977            go7007 = true;
     978           
     979        inpixfmt = FMT_NONE;
     980        InitFilters();
     981        DoV4L2();
     982        return false;
    979983    }
    980984
    981985    channelfd = fd;