Ticket #9595: mythtv-v4l2-fix.patch

File mythtv-v4l2-fix.patch, 21.3 KB (added by mike.gh.larsen@…, 9 years ago)

Patch against fixes/0.24

  • mythtv/configure

    diff --git a/mythtv/configure b/mythtv/configure
    index 7bcdf06..1efe803 100755
    a b Advanced options (experts only): 
    109109  --disable-iptv           disable support for recording RTSP/UDP/RTP streams
    110110  --disable-hdhomerun      disable support for HDHomeRun boxes
    111111  --disable-v4l            disable Video4Linux support
    112   --disable-v4l2           disable Video4Linux2 support
    113   --disable-ivtv           disable ivtv support (PVR-x50) req. v4l2 support
     112  --disable-ivtv           disable ivtv support (PVR-x50) req. v4l support
    114113  --disable-hdpvr          disable HD-PVR support
    115114  --disable-dvb            disable DVB support
    116115  --dvb-path=HDRLOC        location of directory containing
    MYTHTV_CONFIG_LIST=' 
    13161315    qtwebkit
    13171316    quartz_video
    13181317    v4l
    1319     v4l2
    13201318    valgrind
    13211319    x11
    13221320    xrandr
    audio_oss_deps_any="soundcard_h sys_soundcard_h" 
    17081706dvb_deps="backend"
    17091707firewire_deps="backend"
    17101708iptv_deps="backend"
    1711 ivtv_deps="backend v4l2"
    1712 hdpvr_deps="backend v4l2"
     1709ivtv_deps="backend v4l"
     1710hdpvr_deps="backend v4l"
    17131711hdhomerun_deps="backend"
    17141712mpegtsraw_demuxer_deps="merge_libavformat_mpegts_c"
    17151713mythtranscode_deps="backend frontend"
    opengl_deps_any="agl_h GL_gl_h darwin windows x11" 
    17171715opengl_video_deps="opengl"
    17181716opengl_vsync_deps="opengl"
    17191717v4l_deps="backend linux_videodev_h linux_videodev2_h"
    1720 v4l2_deps="backend linux_videodev2_h"
    17211718vdpau_deps="opengl vdpau_vdpau_h vdpau_vdpau_x11_h"
    17221719xrandr_deps="x11"
    17231720xv_deps="x11"
    enable opengl_vsync 
    19361933enable opengl_video
    19371934enable quartz_video
    19381935enable v4l
    1939 enable v4l2
    19401936enable x11
    19411937enable xrandr
    19421938enable xv
    EOF 
    30663062        fi
    30673063        disable opengl_vsync
    30683064        disable v4l
    3069         disable v4l2
    30703065        disable x11
    30713066        # Workaround compile errors from missing gmtime_r/localtime_r/uint def
    30723067        CFLAGS=`echo $CFLAGS | sed 's/-D_POSIX_C_SOURCE=200112//'`
    EOF 
    31113106        fi
    31123107        disable symver
    31133108        disable v4l
    3114         disable v4l2
    31153109        enable  windows
    31163110        disable x11
    31173111        ###### Standard ffmpeg configure stuff follows:
    enabled stripping || strip="echo skipping strip" 
    43814375
    43824376if enabled backend; then
    43834377  echo "Video4Linux sup.          ${v4l-no}"
    4384   echo "Video4Linux2 sup.         ${v4l2-no}"
    43854378  echo "ivtv support              ${ivtv-no}"
    43864379  echo "HD-PVR support            ${hdpvr-no}"
    43874380  echo "FireWire support          ${firewire-no}"
  • mythtv/libs/libmythtv/NuppelVideoRecorder.cpp

    diff --git a/mythtv/libs/libmythtv/NuppelVideoRecorder.cpp b/mythtv/libs/libmythtv/NuppelVideoRecorder.cpp
    index 39e5956..739634d 100644
    a b extern "C" { 
    4242#include "libswscale/swscale.h"
    4343}
    4444
    45 #if defined(USING_V4L) || defined(USING_V4L2)
    4645#ifdef USING_V4L
    4746#include <linux/videodev.h>
    48 #endif
    49 #ifdef USING_V4L2
    5047#include <linux/videodev2.h>
    51 #endif
    5248
    5349#include "go7007_myth.h"
    5450
    extern "C" { 
    5955extern "C" {
    6056#include "vbitext/vbi.h"
    6157}
    62 #else  // USING_V4L || USING_V4L2
     58#else  // USING_V4l
    6359#define VT_WIDTH 0
    64 #endif // USING_V4l || USING_V4L2
     60#endif // USING_V4l
    6561
    6662#define KEYFRAMEDIST   30
    6763
    bool NuppelVideoRecorder::Open(void) 
    10231019
    10241020void NuppelVideoRecorder::ProbeV4L2(void)
    10251021{
    1026 #if defined(USING_V4L) || defined(USING_V4L2)
     1022#ifdef USING_V4L
    10271023    usingv4l2 = true;
    10281024
    10291025    struct v4l2_capability vcap;
    void NuppelVideoRecorder::ProbeV4L2(void) 
    10531049    QString driver = (char *)vcap.driver;
    10541050    if (driver == "go7007")
    10551051        go7007 = true;
    1056 #endif // USING_V4L || USING_V4L2
     1052#endif // USING_V4L
    10571053}
    10581054
    10591055void NuppelVideoRecorder::StartRecording(void)
    void NuppelVideoRecorder::doAudioThread(void) 
    24642460        audio_device->Close();
    24652461}
    24662462
    2467 #if defined(USING_V4L) || defined(USING_V4L2)
     2463#ifdef USING_V4L
    24682464struct VBIData
    24692465{
    24702466    NuppelVideoRecorder *nvr;
    void NuppelVideoRecorder::FormatTeletextSubtitles(struct VBIData *vbidata) 
    26382634        act_text_buffer = 0;
    26392635    textbuffer[act]->freeToEncode = 1;
    26402636}
    2641 #else  // USING_V4L || USING_V4L2
     2637#else  // USING_V4L
    26422638void NuppelVideoRecorder::FormatTeletextSubtitles(struct VBIData *vbidata) {}
    2643 #endif // USING_V4L || USING_V4L2
     2639#endif // USING_V4L
    26442640
    26452641void NuppelVideoRecorder::FormatCC(struct cc *cc)
    26462642{
    void NuppelVideoRecorder::doVbiThread(void) 
    28672863    //VERBOSE(VB_RECORD, LOC + "vbi end");
    28682864}
    28692865
    2870 #else  // USING_V4L 
     2866#else  // USING_V4L
    28712867void NuppelVideoRecorder::doVbiThread(void) { }
    28722868#endif // USING_V4L
    28732869
  • mythtv/libs/libmythtv/analogsignalmonitor.cpp

    diff --git a/mythtv/libs/libmythtv/analogsignalmonitor.cpp b/mythtv/libs/libmythtv/analogsignalmonitor.cpp
    index fa5823a..2a4f4c5 100644
    a b  
    66#include <sys/ioctl.h>
    77#include <poll.h>
    88
    9 #ifdef USING_V4L
    109#include <linux/videodev.h>
    11 #endif
    1210
    1311#include "mythverbose.h"
    1412#include "analogsignalmonitor.h"
    void AnalogSignalMonitor::UpdateValues(void) 
    153151    }
    154152    else
    155153    {
    156 #ifdef USING_V4L
    157154        struct video_tuner tuner;
    158155        bzero(&tuner, sizeof(tuner));
    159156
    void AnalogSignalMonitor::UpdateValues(void) 
    166163        {
    167164            isLocked = tuner.signal;
    168165        }
    169 #endif
    170166    }
    171167
    172168    {
  • mythtv/libs/libmythtv/cardutil.cpp

    diff --git a/mythtv/libs/libmythtv/cardutil.cpp b/mythtv/libs/libmythtv/cardutil.cpp
    index 494f48a..8852682 100644
    a b  
    44
    55#include <algorithm>
    66
    7 #if defined(USING_V4L) || defined(USING_V4L2) || defined(USING_DVB)
     7#if defined(USING_V4L) || defined(USING_DVB)
    88#include <sys/ioctl.h>
    99#endif
    1010
     
    2828
    2929#ifdef USING_V4L
    3030#include <linux/videodev.h>
    31 #endif
    32 #ifdef USING_V4L2
    3331#include <linux/videodev2.h>
    3432#endif
    3533
    uint CardUtil::GetQuickTuning(uint cardid, const QString &input_name) 
    14571455bool CardUtil::hasV4L2(int videofd)
    14581456{
    14591457    (void) videofd;
    1460 #ifdef USING_V4L2
     1458#ifdef USING_V4L
    14611459    struct v4l2_capability vcap;
    14621460    bzero(&vcap, sizeof(vcap));
    14631461
    14641462    return ((ioctl(videofd, VIDIOC_QUERYCAP, &vcap) >= 0) &&
    14651463            (vcap.capabilities & V4L2_CAP_VIDEO_CAPTURE));
    1466 #else // if !USING_V4L2
     1464#else // if !USING_V4L
    14671465    return false;
    1468 #endif // !USING_V4L2
     1466#endif // !USING_V4L
    14691467}
    14701468
    14711469bool CardUtil::GetV4LInfo(
    bool CardUtil::GetV4LInfo( 
    14771475    if (videofd < 0)
    14781476        return false;
    14791477
    1480 #if defined(USING_V4L) || defined(USING_V4L2)
     1478#ifdef USING_V4L
    14811479    // First try V4L2 query
    14821480    struct v4l2_capability capability;
    14831481    bzero(&capability, sizeof(struct v4l2_capability));
    bool CardUtil::GetV4LInfo( 
    14891487    }
    14901488    else // Fallback to V4L1 query
    14911489    {
    1492 #ifdef USING_V4L
    14931490        struct video_capability capability;
    14941491        if (ioctl(videofd, VIDIOCGCAP, &capability) >= 0)
    14951492            card = QString::fromAscii((const char*)capability.name);
    1496 #endif //USING_V4L
    14971493    }
    1498 #endif // !USING_V4L || USING_V4L2
     1494#endif // !USING_V4L
    14991495
    15001496    if (!driver.isEmpty())
    15011497        driver.remove( QRegExp("\\[[0-9]\\]$") );
    InputNames CardUtil::ProbeV4LVideoInputs(int videofd, bool &ok) 
    15101506    InputNames list;
    15111507    ok = false;
    15121508
    1513 #if defined(USING_V4L) || defined(USING_V4L2)
     1509#ifdef USING_V4L
    15141510    bool usingv4l2 = hasV4L2(videofd);
    1515 #ifdef USING_V4L2
     1511
    15161512    // V4L v2 query
    15171513    struct v4l2_input vin;
    15181514    bzero(&vin, sizeof(vin));
    InputNames CardUtil::ProbeV4LVideoInputs(int videofd, bool &ok) 
    15271523        ok = true;
    15281524        return list;
    15291525    }
    1530 #endif
    15311526
    15321527    // V4L v1 query
    1533 #ifdef USING_V4L
    15341528    struct video_capability vidcap;
    15351529    bzero(&vidcap, sizeof(vidcap));
    15361530    if (ioctl(videofd, VIDIOCGCAP, &vidcap) != 0)
    InputNames CardUtil::ProbeV4LVideoInputs(int videofd, bool &ok) 
    15581552
    15591553        list[i] = test.name;
    15601554    }
    1561 #endif
     1555
    15621556    // Create an input on single input cards that don't advertise input
    15631557    if (!list.size())
    15641558        list[0] = "Television";
    15651559
    15661560    ok = true;
    1567 #else // if !USING_V4L || USING_V4L2
     1561#else // if !USING_V4L
    15681562    list[-1] += QObject::tr("ERROR, Compile with V4L support to query inputs");
    1569 #endif // !USING_V4L || USING_V4L2
     1563#endif // !USING_V4L
    15701564    return list;
    15711565}
    15721566
  • mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp

    diff --git a/mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp b/mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp
    index e35b186..832d0a8 100644
    a b const DVBChannel *ChannelScanSM::GetDVBChannel(void) const 
    13941394
    13951395V4LChannel *ChannelScanSM::GetV4LChannel(void)
    13961396{
    1397 #if defined(USING_V4L) || defined(USING_V4L2)
     1397#ifdef USING_V4L
    13981398    return dynamic_cast<V4LChannel*>(channel);
    13991399#else
    14001400    return NULL;
  • mythtv/libs/libmythtv/channelscan/channelscanner.cpp

    diff --git a/mythtv/libs/libmythtv/channelscan/channelscanner.cpp b/mythtv/libs/libmythtv/channelscan/channelscanner.cpp
    index 4d2b2cf..1595d6a 100644
    a b void ChannelScanner::PreScanCommon( 
    342342        channel = new DVBChannel(device);
    343343#endif
    344344
    345 #if defined(USING_V4L) || defined(USING_V4L2)
     345#ifdef USING_V4L
    346346    if (("V4L" == card_type) || ("MPEG" == card_type))
    347347        channel = new V4LChannel(NULL, device);
    348348#endif
  • mythtv/libs/libmythtv/channelscan/scanwizardconfig.cpp

    diff --git a/mythtv/libs/libmythtv/channelscan/scanwizardconfig.cpp b/mythtv/libs/libmythtv/channelscan/scanwizardconfig.cpp
    index 70e3469..00fd9d3 100644
    a b static QString card_types(void) 
    2727    cardTypes += "'DVB'";
    2828#endif // USING_DVB
    2929
    30 #if defined(USING_V4L) || defined(USING_V4L2)
     30#ifdef USING_V4L
    3131    if (!cardTypes.isEmpty())
    3232        cardTypes += ",";
    3333    cardTypes += "'V4L'";
    3434# ifdef USING_IVTV
    3535    cardTypes += ",'MPEG'";
    3636# endif // USING_IVTV
    37 #endif // USING_V4L || USING_V4L2
     37#endif // USING_V4L
    3838
    3939#ifdef USING_IPTV
    4040    if (!cardTypes.isEmpty())
  • mythtv/libs/libmythtv/libmythtv.pro

    diff --git a/mythtv/libs/libmythtv/libmythtv.pro b/mythtv/libs/libmythtv/libmythtv.pro
    index ea06ee7..3d26e0a 100644
    a b cygwin:DEFINES += _WIN32 
    119119using_valgrind:DEFINES += USING_VALGRIND
    120120
    121121# old libvbitext (Caption decoder)
    122 using_v4l || using_v4l2 {
     122using_v4l {
    123123    HEADERS += vbitext/cc.h vbitext/dllist.h vbitext/hamm.h vbitext/lang.h
    124124    HEADERS += vbitext/vbi.h vbitext/vt.h
    125125    SOURCES += vbitext/cc.cpp vbitext/vbi.c vbitext/hamm.c vbitext/lang.c
    using_backend { 
    471471    SOURCES += channelchangemonitor.cpp
    472472
    473473    # Support for Video4Linux devices
    474     using_v4l || using_v4l2 {
     474    using_v4l {
    475475        HEADERS += v4lchannel.h                analogsignalmonitor.h
    476476        SOURCES += v4lchannel.cpp              analogsignalmonitor.cpp
    477477
    478         using_v4l {
    479             DEFINES += USING_V4L
    480         }
    481 
    482         using_v4l2 {
    483             DEFINES += USING_V4L2
    484         }
     478        DEFINES += USING_V4L
    485479    }
    486480
    487481    # Support for cable boxes that provide Firewire out
  • mythtv/libs/libmythtv/signalmonitor.cpp

    diff --git a/mythtv/libs/libmythtv/signalmonitor.cpp b/mythtv/libs/libmythtv/signalmonitor.cpp
    index c199b3b..221efef 100644
    a b extern "C" { 
    2323#   include "dvbchannel.h"
    2424#endif
    2525
    26 #ifdef USING_V4L2
     26#ifdef USING_V4L
    2727#   include "analogsignalmonitor.h"
    2828#   include "v4lchannel.h"
    2929#endif
    SignalMonitor *SignalMonitor::Init(QString cardtype, int db_cardnum, 
    9595    }
    9696#endif
    9797
    98 #ifdef USING_V4L2
     98#ifdef USING_V4L
    9999    if ((cardtype.toUpper() == "HDPVR"))
    100100    {
    101101        V4LChannel *chan = dynamic_cast<V4LChannel*>(channel);
  • mythtv/libs/libmythtv/tv_rec.cpp

    diff --git a/mythtv/libs/libmythtv/tv_rec.cpp b/mythtv/libs/libmythtv/tv_rec.cpp
    index 3d9c7ad..b885eaa 100644
    a b using namespace std; 
    5757
    5858#include "channelgroup.h"
    5959
    60 #if defined(USING_V4L) || defined(USING_V4L2)
     60#ifdef USING_V4L
    6161#include "v4lchannel.h"
    6262#endif
    6363
    bool TVRec::CreateChannel(const QString &startchannel) 
    206206    }
    207207    else // "V4L" or "MPEG", ie, analog TV
    208208    {
    209 #if defined(USING_V4L) || defined(USING_V4L2)
     209#ifdef USING_V4L
    210210        channel = new V4LChannel(this, genOpt.videodev);
    211211        if (!channel->Open())
    212212            return false;
    bool TVRec::SetupRecorder(RecordingProfile &profile) 
    10821082    }
    10831083    else
    10841084    {
    1085 #if defined(USING_V4L) || defined(USING_V4L2)
     1085#ifdef USING_V4L
    10861086        // V4L/MJPEG/GO7007 from here on
    10871087        recorder = new NuppelVideoRecorder(this, channel);
    10881088        recorder->SetOption("skipbtaudio", genOpt.skip_btaudio);
    1089 #endif // USING_V4L || USING_V4L2
     1089#endif // USING_V4L
    10901090    }
    10911091
    10921092    if (recorder)
    FirewireChannel *TVRec::GetFirewireChannel(void) 
    12921292
    12931293V4LChannel *TVRec::GetV4LChannel(void)
    12941294{
    1295 #if defined(USING_V4L) || defined(USING_V4L2)
     1295#ifdef USING_V4L
    12961296    return dynamic_cast<V4LChannel*>(channel);
    12971297#else
    12981298    return NULL;
    1299 #endif // USING_V4L || USING_V4L2
     1299#endif // USING_V4L
    13001300}
    13011301
    13021302/** \fn TVRec::EventThread(void*)
    void TVRec::TuningNewRecorder(MPEGStreamData *streamData) 
    41374137                                  channel->GetCurrentName());
    41384138    }
    41394139
    4140 #if defined(USING_V4L) || defined(USING_V4L2)
     4140#ifdef USING_V4L
    41414141    if (GetV4LChannel())
    41424142    {
    41434143        channel->InitPictureAttributes();
  • mythtv/libs/libmythtv/v4lchannel.cpp

    diff --git a/mythtv/libs/libmythtv/v4lchannel.cpp b/mythtv/libs/libmythtv/v4lchannel.cpp
    index 7aa47ef..bc82b49 100644
    a b  
    1616#include <iostream>
    1717using namespace std;
    1818
    19 #ifdef USING_V4L
    2019#include <linux/videodev.h>
    21 #endif
    22 #ifdef USING_V4L2
    2320#include <linux/videodev2.h>
    24 #endif
    2521
    2622// MythTV headers
    2723#include "v4lchannel.h"
    static int format_to_mode(const QString &fmt, int v4l_version) 
    154150    {
    155151        if (fmt == "NTSC-JP")
    156152            return 6;
    157 #ifdef USING_V4L
    158153        else if (fmt.left(5) == "SECAM")
    159154            return VIDEO_MODE_SECAM;
    160 #endif
    161155        else if (fmt == "PAL-NC")
    162156            return 3;
    163157        else if (fmt == "PAL-M")
    static int format_to_mode(const QString &fmt, int v4l_version) 
    165159        else if (fmt == "PAL-N")
    166160            return 5;
    167161        // generics...
    168 #ifdef USING_V4L
    169162        else if (fmt.left(3) == "PAL")
    170163            return VIDEO_MODE_PAL;
    171164        else if (fmt.left(4) == "NTSC")
    static int format_to_mode(const QString &fmt, int v4l_version) 
    173166        else if (fmt.left(4) == "ATSC")
    174167            return VIDEO_MODE_NTSC; // We've dropped V4L ATSC support...
    175168        return VIDEO_MODE_NTSC;
    176 #endif
    177169    }
    178170
    179171    VERBOSE(VB_IMPORTANT,
    static QString mode_to_format(int mode, int v4l_version) 
    245237    }
    246238    else if (1 == v4l_version)
    247239    {
    248 #ifdef USING_V4L   
    249240        if (mode == VIDEO_MODE_NTSC)
    250241            return "NTSC";
    251242        else if (mode == VIDEO_MODE_PAL)
    static QString mode_to_format(int mode, int v4l_version) 
    258249            return "PAL-N";
    259250        else if (mode == 6)
    260251            return "NTSC-JP";
    261 #endif
    262252    }
    263253    else
    264254    {
    bool V4LChannel::Tune(uint frequency, QString inputname, 
    686676        return true;
    687677    }
    688678
    689 #ifdef USING_V4L
    690679    // Video4Linux version 1 tuning
    691680    uint freq = frequency / 62500;
    692681    ioctlval = ioctl(videofd, VIDIOCSFREQ, &freq);
    bool V4LChannel::Tune(uint frequency, QString inputname, 
    698687                .arg(device).arg(ioctlval).arg(strerror(errno)));
    699688        return false;
    700689    }
    701 #endif
    702690
    703691    SetSIStandard(si_std);
    704692
    bool V4LChannel::SetInputAndFormat(int inputNum, QString newFmt) 
    870858
    871859    if (usingv4l1)
    872860    {
    873 #ifdef USING_V4L
    874861        VERBOSE(VB_CHANNEL, LOC + msg + "(v4l v1)");
    875862
    876863        // read in old settings
    bool V4LChannel::SetInputAndFormat(int inputNum, QString newFmt) 
    888875        {
    889876            VERBOSE(VB_IMPORTANT, LOC_ERR + msg +
    890877                    "\n\t\t\twhile setting format (v4l v1)" + ENO);
    891         } else
    892 #endif
    893         if (usingv4l2)
     878        }
     879        else if (usingv4l2)
    894880        {
    895881            VERBOSE(VB_IMPORTANT, LOC + msg +
    896882                    "\n\t\t\tSetting video mode with v4l version 1 worked");
    bool V4LChannel::SwitchToInput(int inputnum, bool setstarting) 
    965951    return ok;
    966952}
    967953
    968 #ifdef USING_V4L
    969954static unsigned short *get_v4l1_field(
    970955    int v4l2_attrib, struct video_picture &vid_pic)
    971956{
    static unsigned short *get_v4l1_field( 
    985970    }
    986971    return NULL;
    987972}
    988 #endif
    989973
    990974static int get_v4l2_attribute(const QString &db_col_name)
    991975{
    bool V4LChannel::InitPictureAttribute(const QString db_col_name) 
    10831067    }
    10841068
    10851069    // V4L1
    1086 #ifdef USING_V4L
    10871070    unsigned short *setfield;
    10881071    struct video_picture vid_pic;
    10891072    bzero(&vid_pic, sizeof(vid_pic));
    bool V4LChannel::InitPictureAttribute(const QString db_col_name) 
    11041087        VERBOSE(VB_IMPORTANT, loc_err + "failed to set controls." + ENO);
    11051088        return false;
    11061089    }
    1107 #endif
     1090
    11081091    return true;
    11091092}
    11101093
    static int get_v4l2_attribute_value(int videofd, int v4l2_attrib) 
    11711154
    11721155static int get_v4l1_attribute_value(int videofd, int v4l2_attrib)
    11731156{
    1174 #ifdef USING_V4L
    11751157    struct video_picture vid_pic;
    11761158    bzero(&vid_pic, sizeof(vid_pic));
    11771159
    static int get_v4l1_attribute_value(int videofd, int v4l2_attrib) 
    11851167    unsigned short *setfield = get_v4l1_field(v4l2_attrib, vid_pic);
    11861168    if (setfield)
    11871169        return *setfield;
    1188 #endif
    11891170
    11901171    return -1;
    11911172}
    static int set_v4l2_attribute_value(int videofd, int v4l2_attrib, int newvalue) 
    12291210
    12301211static int set_v4l1_attribute_value(int videofd, int v4l2_attrib, int newvalue)
    12311212{
    1232 #ifdef USING_V4L
    12331213    unsigned short *setfield;
    12341214    struct video_picture vid_pic;
    12351215    bzero(&vid_pic, sizeof(vid_pic));
    static int set_v4l1_attribute_value(int videofd, int v4l2_attrib, int newvalue) 
    12561236        // ???
    12571237        return -1;
    12581238    }
    1259 #endif
     1239
    12601240    return 0;
    12611241}
    12621242
  • mythtv/libs/libmythtv/v4lchannel.h

    diff --git a/mythtv/libs/libmythtv/v4lchannel.h b/mythtv/libs/libmythtv/v4lchannel.h
    index aa6d934..b059c64 100644
    a b  
    44#define CHANNEL_H
    55
    66#include "dtvchannel.h"
    7 #ifdef USING_V4L2
     7#ifdef USING_V4L
    88#include <linux/videodev2.h> // needed for v4l2_std_id type
    99#else
    1010typedef uint64_t v4l2_std_id;
    11 #endif //USING_V4L2
     11#endif //USING_V4L
    1212
    1313using namespace std;
    1414
  • mythtv/libs/libmythtv/vbitext/vbi.c

    diff --git a/mythtv/libs/libmythtv/vbitext/vbi.c b/mythtv/libs/libmythtv/vbitext/vbi.c
    index 4c50e8d..15f8d85 100644
    a b  
    1414//       compiling with -std=c99.  We could remove this in the .pro file,
    1515//       but that would disable it for all .c files.
    1616#undef __STRICT_ANSI__
    17 #ifdef USING_V4L
    1817#include <linux/videodev.h>
    19 #endif
    20 #ifdef USING_V4L2
    2118#include <linux/videodev2.h>
    22 #endif
    2319
    2420// vbitext headers
    2521#include "vt.h"
    static int rawbuf_size; // its current size 
    3329
    3430
    3531/***** bttv api *****/
    36 #ifdef USING_V4L
    3732#define BTTV_VBISIZE           _IOR('v' , BASE_VIDIOCPRIVATE+8, int)
    38 #else // !USING_V4L
    39 #ifdef USING_V4L2
    40 #define BTTV_VBISIZE           _IOR('v' , BASE_VIDIOC_PRIVATE+8, int)
    41 #endif // USING_V4L2
    42 #endif // !USING_V4L
     33
    4334
    4435static void
    4536error(const char *str, ...)
  • mythtv/libs/libmythtv/videosource.cpp

    diff --git a/mythtv/libs/libmythtv/videosource.cpp b/mythtv/libs/libmythtv/videosource.cpp
    index 635faeb..5d7a508 100644
    a b using namespace std; 
    4545#include "dvbtypes.h"
    4646#endif
    4747
    48 #ifdef USING_V4L2
     48#ifdef USING_V4L
    4949#include <linux/videodev2.h>
    5050#endif
    5151
    CaptureCardGroup::CaptureCardGroup(CaptureCard &parent) : 
    20122012    setTrigger(cardtype);
    20132013    setSaveAll(false);
    20142014
    2015 #if defined(USING_V4L) || defined(USING_V4L2)
     2015#ifdef USING_V4L
    20162016    addTarget("V4L",       new V4LConfigurationGroup(parent));
    20172017# ifdef USING_IVTV
    20182018    addTarget("MPEG",      new MPEGConfigurationGroup(parent));
    CaptureCardGroup::CaptureCardGroup(CaptureCard &parent) : 
    20202020# ifdef USING_HDPVR
    20212021    addTarget("HDPVR",     new HDPVRConfigurationGroup(parent));
    20222022# endif // USING_HDPVR
    2023 #endif // USING_V4L || USING_V4L2
     2023#endif // USING_V4L
    20242024
    20252025#ifdef USING_DVB
    20262026    addTarget("DVB",       new DVBConfigurationGroup(parent));
    CardType::CardType(const CaptureCard &parent) : 
    22012201
    22022202void CardType::fillSelections(SelectSetting* setting)
    22032203{
    2204 #if defined(USING_V4L) || defined(USING_V4L2)
     2204#ifdef USING_V4L
    22052205    setting->addSelection(
    22062206        QObject::tr("Analog V4L capture card"), "V4L");
    22072207    setting->addSelection(
    void CardType::fillSelections(SelectSetting* setting) 
    22142214    setting->addSelection(
    22152215        QObject::tr("H.264 encoder card (HD-PVR)"), "HDPVR");
    22162216# endif // USING_HDPVR
    2217 #endif // USING_V4L || USING_V4L2
     2217#endif // USING_V4L
    22182218
    22192219#ifdef USING_DVB
    22202220    setting->addSelection(
    void CardType::fillSelections(SelectSetting* setting) 
    22262226        QObject::tr("FireWire cable box"), "FIREWIRE");
    22272227#endif // USING_FIREWIRE
    22282228
    2229 #if defined(USING_V4L) || defined(USING_V4L2)
     2229#ifdef USING_V4L
    22302230    setting->addSelection(
    22312231        QObject::tr("USB MPEG-4 encoder box (Plextor ConvertX, etc)"),
    22322232        "GO7007");
    2233 #endif // USING_V4L || USING_V4L2
     2233#endif // USING_V4L
    22342234
    22352235#ifdef USING_HDHOMERUN
    22362236    setting->addSelection(