Changeset 97047fc66 in mythtv


Ignore:
Timestamp:
Jan 20, 2012, 1:05:51 AM (13 years ago)
Author:
David Engel <dengel@…>
Branches:
devel/2020-player, devel/ffmpeg-resync, devel/gpu-commflag, fixes/0.25, fixes/0.26, fixes/0.27, fixes/0.28, fixes/29, fixes/30, fixes/31, github-templates, master
Children:
be8919faf
Parents:
43ca7d3fdd
Message:

Finish input ordering changes started in commit 3281cdd3.

Honor the livetvorder setting when choosing the starting input for
live TV. Onc correction from the previous commit is needed. It said
that the available input with the lowest, non-zero livetvorder is used
first. It is actually the available, local input witht the lowest,
non-zero livetvorder. If no local input is available, it is the
available, remote input with the loweset, non-zero order. In other
words, available inputs on local recorders are preferred over remote
inputs.

Please note that this change also does away with the concept of the
"defaultinput" for a card. It was actually the last used input. It
is no longer needed since livetvorder determines the chosen input.

Location:
mythtv
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • mythtv/libs/libmythbase/mythversion.h

    r43ca7d3fdd r97047fc66  
    1313/// Including changes in the libmythbase, libmyth, libmythtv, libmythav* and
    1414/// libmythui class methods used by plug-ins.
    15 #define MYTH_BINARY_VERSION "0.25.20120103-1"
     15#define MYTH_BINARY_VERSION "0.25.20120119-1"
    1616
    1717/** \brief Increment this whenever the MythTV network protocol changes.
  • mythtv/libs/libmythservicecontracts/datacontracts/captureCard.h

    r43ca7d3fdd r97047fc66  
    3636{
    3737    Q_OBJECT
    38     Q_CLASSINFO( "version"    , "1.0" );
     38    Q_CLASSINFO( "version"    , "1.1" );
    3939
    4040    Q_PROPERTY( uint            CardId              READ CardId             WRITE setCardId             )
     
    4343    Q_PROPERTY( QString         VBIDevice           READ VBIDevice          WRITE setVBIDevice          )
    4444    Q_PROPERTY( QString         CardType            READ CardType           WRITE setCardType           )
    45     Q_PROPERTY( QString         DefaultInput        READ DefaultInput       WRITE setDefaultInput       )
    4645    Q_PROPERTY( uint            AudioRateLimit      READ AudioRateLimit     WRITE setAudioRateLimit     )
    4746    Q_PROPERTY( QString         HostName            READ HostName           WRITE setHostName           )
     
    7069    PROPERTYIMP( QString    ,     VBIDevice         )
    7170    PROPERTYIMP( QString    ,     CardType          )
    72     PROPERTYIMP( QString    ,     DefaultInput      )
    7371    PROPERTYIMP( uint       ,     AudioRateLimit    )
    7472    PROPERTYIMP( QString    ,     HostName          )
     
    126124            m_AudioDevice        = src.m_AudioDevice;
    127125            m_CardType           = src.m_CardType;
    128             m_DefaultInput       = src.m_DefaultInput;
    129126            m_AudioRateLimit     = src.m_AudioRateLimit;
    130127            m_HostName           = src.m_HostName;
  • mythtv/libs/libmythservicecontracts/services/captureServices.h

    r43ca7d3fdd r97047fc66  
    5252{
    5353    Q_OBJECT
    54     Q_CLASSINFO( "version"    , "1.3" );
     54    Q_CLASSINFO( "version"    , "1.4" );
    5555    Q_CLASSINFO( "RemoveCaptureCard_Method",                 "POST" )
    5656    Q_CLASSINFO( "AddCaptureCard_Method",                    "POST" )
     
    8484                                                                 const QString    &VBIDevice,
    8585                                                                 const QString    &CardType,
    86                                                                  const QString    &DefaultInput,
    8786                                                                 const uint       AudioRateLimit,
    8887                                                                 const QString    &HostName,
  • mythtv/libs/libmythtv/cardutil.cpp

    r43ca7d3fdd r97047fc66  
    705705
    706706    query.prepare(
    707         "SELECT videodevice,           cardtype,       defaultinput,     "
     707        "SELECT videodevice,           cardtype,                         "
    708708        "       hostname,              signal_timeout, channel_timeout,  "
    709709        "       dvb_wait_for_seqstart, dvb_on_demand,  dvb_tuning_delay, "
     
    729729        "SET videodevice           = :V0, "
    730730        "    cardtype              = :V1, "
    731         "    defaultinput          = :V2, "
    732         "    hostname              = :V3, "
    733         "    signal_timeout        = :V4, "
    734         "    channel_timeout       = :V5, "
    735         "    dvb_wait_for_seqstart = :V6, "
    736         "    dvb_on_demand         = :V7, "
    737         "    dvb_tuning_delay      = :V8, "
    738         "    dvb_diseqc_type       = :V9, "
    739         "    diseqcid              = :V10,"
    740         "    dvb_eitscan           = :V11 "
     731        "    hostname              = :V2, "
     732        "    signal_timeout        = :V3, "
     733        "    channel_timeout       = :V4, "
     734        "    dvb_wait_for_seqstart = :V5, "
     735        "    dvb_on_demand         = :V6, "
     736        "    dvb_tuning_delay      = :V7, "
     737        "    dvb_diseqc_type       = :V8, "
     738        "    diseqcid              = :V9,"
     739        "    dvb_eitscan           = :V10 "
    741740        "WHERE cardid = :CARDID");
    742741    for (uint i = 0; i < 12; i++)
     
    10931092}
    10941093
    1095 bool CardUtil::SetStartInput(uint cardid, const QString &inputname)
    1096 {
    1097     MSqlQuery query(MSqlQuery::InitCon());
    1098     query.prepare("UPDATE capturecard "
    1099                   "SET defaultinput = :INNAME "
    1100                   "WHERE cardid = :CARDID");
    1101     query.bindValue(":INNAME", inputname);
    1102     query.bindValue(":CARDID", cardid);
    1103 
    1104     if (!query.exec())
    1105     {
    1106         MythDB::DBError("set_startinput", query);
    1107         return false;
    1108     }
    1109 
    1110     return true;
    1111 }
    1112 
    1113 /** \fn CardUtil::GetDefaultInput(uint)
    1114  *  \brief Returns the default input for the card
     1094/** \fn CardUtil::GetStartInput(uint)
     1095 *  \brief Returns the start input for the card
    11151096 *  \param nCardID card id to check
    1116  *  \return the default input
     1097 *  \return the start input
    11171098 */
    1118 QString CardUtil::GetDefaultInput(uint nCardID)
     1099QString CardUtil::GetStartInput(uint nCardID)
    11191100{
    11201101    QString str = QString::null;
    11211102    MSqlQuery query(MSqlQuery::InitCon());
    1122     query.prepare("SELECT defaultinput "
    1123                   "FROM capturecard "
    1124                   "WHERE capturecard.cardid = :CARDID");
     1103    query.prepare("SELECT inputname "
     1104                  "FROM cardinput "
     1105                  "WHERE cardinput.cardid = :CARDID "
     1106                  "ORDER BY livetvorder = 0, livetvorder, cardinputid "
     1107                  "LIMIT 1");
    11251108    query.bindValue(":CARDID", nCardID);
    11261109
    11271110    if (!query.exec() || !query.isActive())
    1128         MythDB::DBError("CardUtil::GetDefaultInput()", query);
     1111        MythDB::DBError("CardUtil::GetStartInput()", query);
    11291112    else if (query.next())
    11301113        str = query.value(0).toString();
     
    21082091                                 const QString &vbidevice,
    21092092                                 const QString &cardtype,
    2110                                  const QString &defaultinput,
    21112093                                 const uint audioratelimit,
    21122094                                 const QString &hostname,
     
    21342116    query.prepare(
    21352117        "INSERT INTO capturecard "
    2136         "(videodevice, audiodevice, vbidevice, cardtype, defaultinput, "
     2118        "(videodevice, audiodevice, vbidevice, cardtype, "
    21372119        "audioratelimit, hostname, dvb_swfilter, dvb_sat_type, "
    21382120        "dvb_wait_for_seqstart, skipbtaudio, dvb_on_demand, dvb_diseqc_type, "
     
    21412123        "hue, diseqcid, dvb_eitscan) "
    21422124        "VALUES (:VIDEODEVICE, :AUDIODEVICE, :VBIDEVICE, :CARDTYPE, "
    2143         ":DEFAULTINPUT, :AUDIORATELIMIT, :HOSTNAME, :DVBSWFILTER, :DVBSATTYPE, "
     2125        ":AUDIORATELIMIT, :HOSTNAME, :DVBSWFILTER, :DVBSATTYPE, "
    21442126        ":DVBWAITFORSEQSTART, :SKIPBTAUDIO, :DVBONDEMAND, :DVBDISEQCTYPE, "
    21452127        ":FIREWIRESPEED, :FIREWIREMODEL, :FIREWIRECONNECTION, :SIGNALTIMEOUT, "
     
    21512133    query.bindValue(":VBIDEVICE", vbidevice);
    21522134    query.bindValue(":CARDTYPE", cardtype);
    2153     query.bindValue(":DEFAULTINPUT", defaultinput);
    21542135    query.bindValue(":AUDIORATELIMIT", audioratelimit);
    21552136    query.bindValue(":HOSTNAME", hostname);
  • mythtv/libs/libmythtv/cardutil.h

    r43ca7d3fdd r97047fc66  
    192192                                          const QString &vbidevice,
    193193                                          const QString &cardtype,
    194                                           const QString &defaultinput,
    195194                                          const uint audioratelimit,
    196195                                          const QString &hostname,
     
    260259    static bool         SetStartChannel(uint cardinputid,
    261260                                        const QString &channum);
    262     static bool         SetStartInput(uint cardid,
    263                                       const QString &inputname);
    264261
    265262    // Input creation and deletion
     
    285282
    286283    static vector<uint> GetCardIDs(uint sourceid);
    287     static QString      GetDefaultInput(uint cardid);
     284    static QString      GetStartInput(uint cardid);
    288285    static QStringList  GetInputNames(uint cardid, uint sourceid = 0);
    289286    static bool         GetInputInfo(InputInfo &info,
  • mythtv/libs/libmythtv/channelbase.cpp

    r43ca7d3fdd r97047fc66  
    970970    ChannelUtil::SortChannels(m_allchannels, order, true);
    971971
    972     m_currentInputID = GetDefaultInput(cardid);
    973 
    974     // In case that defaultinput is not set
     972    m_currentInputID = GetStartInput(cardid);
     973
     974    // In case that initial input is not set
    975975    if (m_currentInputID == -1)
    976976        m_currentInputID = GetNextInputNum();
     
    10411041}
    10421042
    1043 /** \fn ChannelBase::GetDefaultInput(uint)
     1043/** \fn ChannelBase::GetStartInput(uint)
    10441044 *  \brief Gets the default input for the cardid
    10451045 *  \param cardid ChannelBase::GetCardID()
    10461046 */
    1047 int ChannelBase::GetDefaultInput(uint cardid)
    1048 {
    1049     return GetInputByName(CardUtil::GetDefaultInput(cardid));
    1050 }
    1051 
    1052 /** \fn ChannelBase::StoreDefaultInput(uint, const QString&)
    1053  *  \brief Sets default input for the cardid
    1054  *  \param cardid ChannelBase::GetCardID()
    1055  *  \param input  ChannelBase::GetCurrentInput()
    1056  */
    1057 void ChannelBase::StoreDefaultInput(uint cardid, const QString &input)
    1058 {
    1059     MSqlQuery query(MSqlQuery::InitCon());
    1060     query.prepare(
    1061         "UPDATE capturecard "
    1062         "SET defaultinput = :DEFAULTINPUT "
    1063         "WHERE cardid = :CARDID");
    1064     query.bindValue(":DEFAULTINPUT", input);
    1065     query.bindValue(":CARDID", cardid);
    1066 
    1067     if (!query.exec() || !query.isActive())
    1068         MythDB::DBError("StoreDefaultInput", query);
     1047int ChannelBase::GetStartInput(uint cardid)
     1048{
     1049    return GetInputByName(CardUtil::GetStartInput(cardid));
    10691050}
    10701051
     
    12501231    }
    12511232
    1252     QString input = genOpt.defaultinput, channum = startchannel;
     1233    QString input = CardUtil::GetStartInput(tvrec->GetCaptureCardNum());
     1234    QString channum = startchannel;
    12531235    channel->Init(input, channum, true);
    12541236
  • mythtv/libs/libmythtv/channelbase.h

    r43ca7d3fdd r97047fc66  
    108108    /// Saves current channel as the default channel for the current input.
    109109    virtual void StoreInputChannels(void)
    110         { StoreInputChannels(m_inputs);
    111           StoreDefaultInput(GetCardID(), GetCurrentInput()); }
     110        { StoreInputChannels(m_inputs); }
    112111
    113112    // Picture attribute settings
     
    140139        int inputNum, uint &mplexid_restriction) const;
    141140
    142     int GetDefaultInput(uint cardid);
     141    int GetStartInput(uint cardid);
    143142    void ClearInputMap(void);
    144143
    145144    static void StoreInputChannels(const InputMap&);
    146     static void StoreDefaultInput(uint cardid, const QString &input);
    147145
    148146  protected:
  • mythtv/libs/libmythtv/dbcheck.cpp

    r43ca7d3fdd r97047fc66  
    133133The 'hostname' field is another important field for all cards
    134134as it specifies which backend the capture card is connected to.
    135 
    136 The 'defaultinput' field is a another important field for all
    137 cards except "FIREWIRE", "FREEBOX", "HDHOMERUN", and "IMPORT" cards.
    138 It specifies which
    139 input of the card to use. This does not have to mean a specific
    140 physical input, but may also indicate a different use for the
    141 same physical input.
    142135
    143136The 'signal_timeout' and 'channel_timeout' indicate in
  • mythtv/libs/libmythtv/tv_play.cpp

    r43ca7d3fdd r97047fc66  
    64696469            if (!channum.isEmpty())
    64706470                CardUtil::SetStartChannel(cardinputid, channum);
    6471             CardUtil::SetStartInput(cardid, inputname);
    64726471        }
    64736472        else
  • mythtv/libs/libmythtv/tv_rec.cpp

    r43ca7d3fdd r97047fc66  
    153153
    154154    // configure the Channel instance
    155     QString startchannel = GetStartChannel(cardid, genOpt.defaultinput);
     155    QString startchannel = GetStartChannel(cardid,
     156                                           CardUtil::GetStartInput(cardid));
    156157    if (!CreateChannel(startchannel, true))
    157158        return false;
     
    15401541    query.prepare(
    15411542        "SELECT videodevice,      vbidevice,           audiodevice,     "
    1542         "       audioratelimit,   defaultinput,        cardtype,        "
     1543        "       audioratelimit,   cardtype,        "
    15431544        "       skipbtaudio,      signal_timeout,      channel_timeout, "
    15441545        "       dvb_wait_for_seqstart, "
     
    15781579    test = query.value(4).toString();
    15791580    if (test != QString::null)
    1580         gen_opts.defaultinput = test;
    1581 
    1582     test = query.value(5).toString();
    1583     if (test != QString::null)
    15841581        gen_opts.cardtype = test;
    15851582
    1586     gen_opts.skip_btaudio = query.value(6).toUInt();
    1587 
    1588     gen_opts.signal_timeout  = (uint) max(query.value(7).toInt(), 0);
    1589     gen_opts.channel_timeout = (uint) max(query.value(8).toInt(), 0);
     1583    gen_opts.skip_btaudio = query.value(5).toUInt();
     1584
     1585    gen_opts.signal_timeout  = (uint) max(query.value(6).toInt(), 0);
     1586    gen_opts.channel_timeout = (uint) max(query.value(7).toInt(), 0);
    15901587
    15911588    // We should have at least 100 ms to acquire tables...
     
    15951592        gen_opts.channel_timeout = gen_opts.signal_timeout + 2500;
    15961593
    1597     gen_opts.wait_for_seqstart = query.value(9).toUInt();
     1594    gen_opts.wait_for_seqstart = query.value(8).toUInt();
    15981595
    15991596    // DVB options
    1600     uint dvboff = 10;
     1597    uint dvboff = 9;
    16011598    dvb_opts.dvb_on_demand    = query.value(dvboff + 0).toUInt();
    16021599    dvb_opts.dvb_tuning_delay = query.value(dvboff + 1).toUInt();
     
    16161613}
    16171614
    1618 QString TVRec::GetStartChannel(uint cardid, const QString &defaultinput)
     1615QString TVRec::GetStartChannel(uint cardid, const QString &startinput)
    16191616{
    16201617    QString startchan = QString::null;
     
    16281625        "      inputname          = :INPUTNAME");
    16291626    query.bindValue(":CARDID",    cardid);
    1630     query.bindValue(":INPUTNAME", defaultinput);
     1627    query.bindValue(":INPUTNAME", startinput);
    16311628
    16321629    if (!query.exec() || !query.isActive())
     
    16551652        "      inputname          = :INPUTNAME");
    16561653    query.bindValue(":CARDID",    cardid);
    1657     query.bindValue(":INPUTNAME", defaultinput);
     1654    query.bindValue(":INPUTNAME", startinput);
    16581655
    16591656    if (!query.exec() || !query.isActive())
     
    32963293        else
    32973294        {
    3298             input   = genOpt.defaultinput;
     3295            input   = CardUtil::GetStartInput(cardid);
    32993296            channum = GetStartChannel(cardid, input);
    33003297        }
     
    35433540
    35443541        GetDevices(newCardID, genOpt, dvbOpt, fwOpt);
    3545         genOpt.defaultinput = inputname;
    35463542        CreateChannel(channum, false);
    35473543    }
  • mythtv/libs/libmythtv/tv_rec.h

    r43ca7d3fdd r97047fc66  
    5757    GeneralDBOptions() :
    5858        videodev(""),         vbidev(""),
    59         audiodev(""),         defaultinput("Television"),
     59        audiodev(""),
    6060        cardtype("V4L"),
    6161        audiosamplerate(-1),  skip_btaudio(false),
     
    6666    QString vbidev;
    6767    QString audiodev;
    68     QString defaultinput;
    6968    QString cardtype;
    7069    int     audiosamplerate;
     
    256255                           FireWireDBOptions  &firewire_opts);
    257256
    258     static QString GetStartChannel(uint cardid, const QString &defaultinput);
     257    static QString GetStartChannel(uint cardid, const QString &startinput);
    259258
    260259    void TeardownRecorder(uint request_flags);
  • mythtv/libs/libmythtv/videosource.cpp

    r43ca7d3fdd r97047fc66  
    972972                        "require the audio volume to be left alone."));
    973973   };
    974 };
    975 
    976 class DVBInput : public ComboBoxSetting, public CaptureCardDBStorage
    977 {
    978   public:
    979     DVBInput(const CaptureCard &parent) :
    980         ComboBoxSetting(this),
    981         CaptureCardDBStorage(this, parent, "defaultinput")
    982     {
    983         setLabel(QObject::tr("Default input"));
    984         fillSelections(false);
    985     }
    986 
    987     void fillSelections(bool diseqc)
    988     {
    989         clearSelections();
    990         addSelection((diseqc) ? "DVBInput #1" : "DVBInput");
    991     }
    992974};
    993975
     
    12791261        addChild(new SignalTimeout(parent, 2000, 1000));
    12801262        addChild(new ChannelTimeout(parent, 9000, 1750));
    1281         addChild(new SingleCardInput(parent));
    12821263
    12831264        model->SetGUID(dev->getValue());
     
    15751556        addChild(new IPTVHost(parent));
    15761557        addChild(new ChannelTimeout(parent, 3000, 1750));
    1577         addChild(new SingleCardInput(parent));
    15781558        addChild(new EmptyAudioDevice(parent));
    15791559        addChild(new EmptyVBIDevice(parent));
     
    16691649    device(new ASIDevice(parent)),
    16701650    cardinfo(new TransLabelSetting()),
    1671     input(new TunerCardInput(parent, device->getValue(), "ASI")),
    16721651    instances(new InstanceCount(parent))
    16731652{
     
    16761655    addChild(new EmptyVBIDevice(parent));
    16771656    addChild(cardinfo);
    1678     addChild(input);
    16791657    addChild(instances);
    1680     input->setVisible(false);
    16811658
    16821659    connect(device, SIGNAL(valueChanged(const QString&)),
     
    17131690    }
    17141691    cardinfo->setValue(tr("Valid DVEO ASI card"));
    1715     input->fillSelections(device);
    17161692#else
    17171693    cardinfo->setValue(QString("Not compiled with ASI support"));
     
    18251801    addChild(cardip);
    18261802    addChild(cardtuner);
    1827 
    1828     addChild(new SingleCardInput(parent));
    18291803
    18301804    TransButtonSetting *buttonRecOpt = new TransButtonSetting();
     
    20762050    addChild(desc);
    20772051
    2078     addChild(new SingleCardInput(parent));
    2079 
    20802052    connect(ip,       SIGNAL(NewValue(const QString&)),
    20812053            deviceid, SLOT(  SetIP(const QString&)));
     
    20972069    VerticalConfigurationGroup(false, true, false, false),
    20982070    parent(a_parent),
    2099     cardinfo(new TransLabelSetting()),  vbidev(new VBIDevice(parent)),
    2100     input(new TunerCardInput(parent))
     2071    cardinfo(new TransLabelSetting()),  vbidev(new VBIDevice(parent))
    21012072{
    21022073    QString drv = "(?!ivtv|hdpvr|(saa7164(.*)))";
     
    21142085    addChild(new AudioDevice(parent));
    21152086    addChild(audgrp);
    2116     addChild(input);
    21172087
    21182088    connect(device, SIGNAL(valueChanged(const QString&)),
     
    21392109    cardinfo->setValue(ci);
    21402110    vbidev->setFilter(cn, dn);
    2141     input->fillSelections(device);
    21422111}
    21432112
     
    21472116    parent(a_parent),
    21482117    device(NULL), vbidevice(NULL),
    2149     cardinfo(new TransLabelSetting()),
    2150     input(new TunerCardInput(parent))
     2118    cardinfo(new TransLabelSetting())
    21512119{
    21522120    QString drv = "ivtv|(saa7164(.*))";
     
    21602128    addChild(vbidevice);
    21612129    addChild(cardinfo);
    2162     addChild(input);
    21632130    addChild(new ChannelTimeout(parent, 12000, 2000));
    21642131
     
    21872154    vbidevice->setVisible(dn!="ivtv");
    21882155    vbidevice->setFilter(cn, dn);
    2189     input->fillSelections(device);
    21902156}
    21912157
     
    22502216    VerticalConfigurationGroup(false, true, false, false),
    22512217    parent(a_parent), cardinfo(new TransLabelSetting()),
    2252     videoinput(new TunerCardInput(parent)),
    22532218    audioinput(new TunerCardAudioInput(parent, QString::null, "HDPVR"))
    22542219{
     
    22622227    addChild(new EmptyVBIDevice(parent));
    22632228    addChild(cardinfo);
    2264     addChild(videoinput);
    22652229    addChild(audioinput);
    22662230    addChild(new ChannelTimeout(parent, 12000, 2000));
     
    22872251
    22882252    cardinfo->setValue(ci);
    2289     videoinput->fillSelections(device);
    22902253    audioinput->fillSelections(device);
    22912254}
     
    37453708}
    37463709
    3747 TunerCardInput::TunerCardInput(const CaptureCard &parent,
    3748                                QString dev, QString type) :
    3749     ComboBoxSetting(this), CaptureCardDBStorage(this, parent, "defaultinput"),
    3750     last_device(dev), last_cardtype(type), last_diseqct(-1)
    3751 {
    3752     setLabel(QObject::tr("Default input"));
    3753     int cardid = parent.getCardID();
    3754     if (cardid <= 0)
    3755         return;
    3756 
    3757     last_cardtype = CardUtil::GetRawCardType(cardid);
    3758     last_device   = CardUtil::GetVideoDevice(cardid);
    3759 }
    3760 
    3761 void TunerCardInput::fillSelections(const QString& device)
    3762 {
    3763     clearSelections();
    3764 
    3765     if (device.isEmpty())
    3766         return;
    3767 
    3768     last_device = device;
    3769     QStringList inputs =
    3770         CardUtil::ProbeVideoInputs(device, last_cardtype);
    3771 
    3772     for (QStringList::iterator i = inputs.begin(); i != inputs.end(); ++i)
    3773         addSelection(*i);
    3774 }
    3775 
    37763710TunerCardAudioInput::TunerCardAudioInput(const CaptureCard &parent,
    37773711                                         QString dev, QString type) :
     
    38783812    diseqc_btn->setVisible(false);
    38793813    addChild(diseqc_cfg);
    3880 
    3881     defaultinput = new DVBInput(parent);
    3882     addChild(defaultinput);
    3883     defaultinput->setVisible(false);
    38843814
    38853815    tuning_delay = new DVBTuningDelay(parent);
     
    39103840    DTVDeviceTreeWizard diseqcWiz(*diseqc_tree);
    39113841    diseqcWiz.exec();
    3912     defaultinput->fillSelections(diseqc_tree->IsInNeedOfConf());
    39133842}
    39143843
     
    39173846    VerticalConfigurationGroup::Load();
    39183847    diseqc_tree->Load(parent.getCardID());
    3919     defaultinput->fillSelections(diseqc_tree->IsInNeedOfConf());
    39203848    if (cardtype->getValue() == "DVB-S" ||
    39213849        cardtype->getValue() == "DVB-S2" ||
  • mythtv/libs/libmythtv/videosource.h

    r43ca7d3fdd r97047fc66  
    291291};
    292292
    293 class TunerCardInput : public ComboBoxSetting, public CaptureCardDBStorage
    294 {
    295     Q_OBJECT
    296   public:
    297     TunerCardInput(const CaptureCard &parent,
    298                    QString dev  = QString::null,
    299                    QString type = QString::null);
    300 
    301   public slots:
    302     void fillSelections(const QString &device);
    303 
    304   private:
    305     QString last_device;
    306     QString last_cardtype;
    307     int     last_diseqct;
    308 };
    309 
    310 class SingleCardInput : public TunerCardInput
    311 {
    312     Q_OBJECT
    313 
    314   public:
    315     SingleCardInput(const CaptureCard &parent) : TunerCardInput(parent)
    316     {
    317         setLabel(QObject::tr("Default input"));
    318         addSelection("MPEG2TS");
    319         setVisible(false);
    320     }
    321 
    322   public slots:
    323     void fillSelections(const QString&)
    324     {
    325         clearSelections();
    326         addSelection("MPEG2TS");
    327     }
    328 };
    329 
    330293class TunerCardAudioInput : public ComboBoxSetting, public CaptureCardDBStorage
    331294{
     
    480443    TransLabelSetting *cardinfo;
    481444    VBIDevice         *vbidev;
    482     TunerCardInput    *input;
    483445};
    484446
     
    501463    VBIDevice         *vbidevice;
    502464    TransLabelSetting *cardinfo;
    503     TunerCardInput    *input;
    504465};
    505466
     
    517478    CaptureCard         &parent;
    518479    TransLabelSetting   *cardinfo;
    519     TunerCardInput      *videoinput;
    520480    TunerCardAudioInput *audioinput;
    521481};
    522482
    523 class TunerCardInput;
    524483class InstanceCount;
    525484class ASIDevice;
     
    539498    ASIDevice         *device;
    540499    TransLabelSetting *cardinfo;
    541     TunerCardInput    *input;
    542500    InstanceCount     *instances;
    543501};
    544502
    545 class TunerCardInput;
    546503class InstanceCount;
    547504
     
    579536
    580537class DVBCardNum;
    581 class DVBInput;
    582538class DVBCardName;
    583539class DVBCardType;
     
    606562
    607563    DVBCardNum                   *cardnum;
    608     DVBInput                     *defaultinput;
    609564    DVBCardName                  *cardname;
    610565    DVBCardType                  *cardtype;
  • mythtv/programs/mythbackend/services/capture.cpp

    r43ca7d3fdd r97047fc66  
    4848
    4949    QString str = "SELECT cardid, videodevice, audiodevice, vbidevice, "
    50                   "cardtype, defaultinput, audioratelimit, hostname, "
     50                  "cardtype, audioratelimit, hostname, "
    5151                  "dvb_swfilter, dvb_sat_type, dvb_wait_for_seqstart, "
    5252                  "skipbtaudio, dvb_on_demand, dvb_diseqc_type, "
     
    9393        pCaptureCard->setVBIDevice         ( query.value(3).toString()    );
    9494        pCaptureCard->setCardType          ( query.value(4).toString()    );
    95         pCaptureCard->setDefaultInput      ( query.value(5).toString()    );
    96         pCaptureCard->setAudioRateLimit    ( query.value(6).toUInt()      );
    97         pCaptureCard->setHostName          ( query.value(7).toString()    );
    98         pCaptureCard->setDVBSWFilter       ( query.value(8).toUInt()      );
    99         pCaptureCard->setDVBSatType        ( query.value(9).toUInt()      );
    100         pCaptureCard->setDVBWaitForSeqStart( query.value(10).toBool()     );
    101         pCaptureCard->setSkipBTAudio       ( query.value(11).toBool()     );
    102         pCaptureCard->setDVBOnDemand       ( query.value(12).toBool()     );
    103         pCaptureCard->setDVBDiSEqCType     ( query.value(13).toUInt()     );
    104         pCaptureCard->setFirewireSpeed     ( query.value(14).toUInt()     );
    105         pCaptureCard->setFirewireModel     ( query.value(15).toString()   );
    106         pCaptureCard->setFirewireConnection( query.value(16).toUInt()     );
    107         pCaptureCard->setSignalTimeout     ( query.value(17).toUInt()     );
    108         pCaptureCard->setChannelTimeout    ( query.value(18).toUInt()     );
    109         pCaptureCard->setDVBTuningDelay    ( query.value(19).toUInt()     );
    110         pCaptureCard->setContrast          ( query.value(20).toUInt()     );
    111         pCaptureCard->setBrightness        ( query.value(21).toUInt()     );
    112         pCaptureCard->setColour            ( query.value(22).toUInt()     );
    113         pCaptureCard->setHue               ( query.value(23).toUInt()     );
    114         pCaptureCard->setDiSEqCId          ( query.value(24).toUInt()     );
    115         pCaptureCard->setDVBEITScan        ( query.value(25).toBool()     );
     95        pCaptureCard->setAudioRateLimit    ( query.value(5).toUInt()      );
     96        pCaptureCard->setHostName          ( query.value(6).toString()    );
     97        pCaptureCard->setDVBSWFilter       ( query.value(7).toUInt()      );
     98        pCaptureCard->setDVBSatType        ( query.value(8).toUInt()      );
     99        pCaptureCard->setDVBWaitForSeqStart( query.value(9).toBool()     );
     100        pCaptureCard->setSkipBTAudio       ( query.value(10).toBool()     );
     101        pCaptureCard->setDVBOnDemand       ( query.value(11).toBool()     );
     102        pCaptureCard->setDVBDiSEqCType     ( query.value(12).toUInt()     );
     103        pCaptureCard->setFirewireSpeed     ( query.value(13).toUInt()     );
     104        pCaptureCard->setFirewireModel     ( query.value(14).toString()   );
     105        pCaptureCard->setFirewireConnection( query.value(15).toUInt()     );
     106        pCaptureCard->setSignalTimeout     ( query.value(16).toUInt()     );
     107        pCaptureCard->setChannelTimeout    ( query.value(17).toUInt()     );
     108        pCaptureCard->setDVBTuningDelay    ( query.value(18).toUInt()     );
     109        pCaptureCard->setContrast          ( query.value(19).toUInt()     );
     110        pCaptureCard->setBrightness        ( query.value(20).toUInt()     );
     111        pCaptureCard->setColour            ( query.value(21).toUInt()     );
     112        pCaptureCard->setHue               ( query.value(22).toUInt()     );
     113        pCaptureCard->setDiSEqCId          ( query.value(23).toUInt()     );
     114        pCaptureCard->setDVBEITScan        ( query.value(24).toBool()     );
    116115    }
    117116
     
    135134
    136135    QString str = "SELECT cardid, videodevice, audiodevice, vbidevice, "
    137                   "cardtype, defaultinput, audioratelimit, hostname, "
     136                  "cardtype, audioratelimit, hostname, "
    138137                  "dvb_swfilter, dvb_sat_type, dvb_wait_for_seqstart, "
    139138                  "skipbtaudio, dvb_on_demand, dvb_diseqc_type, "
     
    161160        pCaptureCard->setVBIDevice         ( query.value(3).toString()    );
    162161        pCaptureCard->setCardType          ( query.value(4).toString()    );
    163         pCaptureCard->setDefaultInput      ( query.value(5).toString()    );
    164         pCaptureCard->setAudioRateLimit    ( query.value(6).toUInt()      );
    165         pCaptureCard->setHostName          ( query.value(7).toString()    );
    166         pCaptureCard->setDVBSWFilter       ( query.value(8).toUInt()      );
    167         pCaptureCard->setDVBSatType        ( query.value(9).toUInt()      );
    168         pCaptureCard->setDVBWaitForSeqStart( query.value(10).toBool()     );
    169         pCaptureCard->setSkipBTAudio       ( query.value(11).toBool()     );
    170         pCaptureCard->setDVBOnDemand       ( query.value(12).toBool()     );
    171         pCaptureCard->setDVBDiSEqCType     ( query.value(13).toUInt()     );
    172         pCaptureCard->setFirewireSpeed     ( query.value(14).toUInt()     );
    173         pCaptureCard->setFirewireModel     ( query.value(15).toString()   );
    174         pCaptureCard->setFirewireConnection( query.value(16).toUInt()     );
    175         pCaptureCard->setSignalTimeout     ( query.value(17).toUInt()     );
    176         pCaptureCard->setChannelTimeout    ( query.value(18).toUInt()     );
    177         pCaptureCard->setDVBTuningDelay    ( query.value(19).toUInt()     );
    178         pCaptureCard->setContrast          ( query.value(20).toUInt()     );
    179         pCaptureCard->setBrightness        ( query.value(21).toUInt()     );
    180         pCaptureCard->setColour            ( query.value(22).toUInt()     );
    181         pCaptureCard->setHue               ( query.value(23).toUInt()     );
    182         pCaptureCard->setDiSEqCId          ( query.value(24).toUInt()     );
    183         pCaptureCard->setDVBEITScan        ( query.value(25).toBool()     );
     162        pCaptureCard->setAudioRateLimit    ( query.value(5).toUInt()      );
     163        pCaptureCard->setHostName          ( query.value(6).toString()    );
     164        pCaptureCard->setDVBSWFilter       ( query.value(7).toUInt()      );
     165        pCaptureCard->setDVBSatType        ( query.value(8).toUInt()      );
     166        pCaptureCard->setDVBWaitForSeqStart( query.value(9).toBool()     );
     167        pCaptureCard->setSkipBTAudio       ( query.value(10).toBool()     );
     168        pCaptureCard->setDVBOnDemand       ( query.value(11).toBool()     );
     169        pCaptureCard->setDVBDiSEqCType     ( query.value(12).toUInt()     );
     170        pCaptureCard->setFirewireSpeed     ( query.value(13).toUInt()     );
     171        pCaptureCard->setFirewireModel     ( query.value(14).toString()   );
     172        pCaptureCard->setFirewireConnection( query.value(15).toUInt()     );
     173        pCaptureCard->setSignalTimeout     ( query.value(16).toUInt()     );
     174        pCaptureCard->setChannelTimeout    ( query.value(17).toUInt()     );
     175        pCaptureCard->setDVBTuningDelay    ( query.value(18).toUInt()     );
     176        pCaptureCard->setContrast          ( query.value(19).toUInt()     );
     177        pCaptureCard->setBrightness        ( query.value(20).toUInt()     );
     178        pCaptureCard->setColour            ( query.value(21).toUInt()     );
     179        pCaptureCard->setHue               ( query.value(22).toUInt()     );
     180        pCaptureCard->setDiSEqCId          ( query.value(23).toUInt()     );
     181        pCaptureCard->setDVBEITScan        ( query.value(24).toBool()     );
    184182    }
    185183
     
    209207                                  const QString    &sVBIDevice,
    210208                                  const QString    &sCardType,
    211                                   const QString    &sDefaultInput,
    212209                                  const uint       nAudioRateLimit,
    213210                                  const QString    &sHostName,
     
    231228                                  bool             bDVBEITScan)
    232229{
    233     if ( sVideoDevice.isEmpty() || sCardType.isEmpty() || sHostName.isEmpty() ||
    234          sDefaultInput.isEmpty() )
     230    if ( sVideoDevice.isEmpty() || sCardType.isEmpty() || sHostName.isEmpty() )
    235231        throw( QString( "This API requires at least a video device node, a card type, "
    236                         "a default input, and a hostname." ));
     232                        "and a hostname." ));
    237233
    238234    int nResult = CardUtil::CreateCaptureCard(sVideoDevice, sAudioDevice,
    239                       sVBIDevice, sCardType, sDefaultInput, nAudioRateLimit,
     235                      sVBIDevice, sCardType, nAudioRateLimit,
    240236                      sHostName, nDVBSWFilter, nDVBSatType, bDVBWaitForSeqStart,
    241237                      bSkipBTAudio, bDVBOnDemand, nDVBDiSEqCType, nFirewireSpeed,
  • mythtv/programs/mythbackend/services/capture.h

    r43ca7d3fdd r97047fc66  
    4949                                                         const QString    &VBIDevice,
    5050                                                         const QString    &CardType,
    51                                                          const QString    &DefaultInput,
    5251                                                         const uint       AudioRateLimit,
    5352                                                         const QString    &HostName,
     
    139138                                                         const QString    &VBIDevice,
    140139                                                         const QString    &CardType,
    141                                                          const QString    &DefaultInput,
    142140                                                         const uint       AudioRateLimit,
    143141                                                         const QString    &HostName,
     
    162160        {
    163161            return m_obj.AddCaptureCard( VideoDevice, AudioDevice, VBIDevice, CardType,
    164                                 DefaultInput, AudioRateLimit, HostName, DVBSWFilter,
     162                                AudioRateLimit, HostName, DVBSWFilter,
    165163                                DVBSatType, DVBWaitForSeqStart, SkipBTAudio, DVBOnDemand,
    166164                                DVBDiSEqCType, FirewireSpeed, FirewireModel, FirewireConnection,
  • mythtv/programs/mythtv-setup/main.cpp

    r43ca7d3fdd r97047fc66  
    361361
    362362        if (scanInputName.isEmpty())
    363             scanInputName = CardUtil::GetDefaultInput(scanCardId);
     363            scanInputName = CardUtil::GetStartInput(scanCardId);
    364364
    365365        bool okInputName = inputnames.contains(scanInputName);
Note: See TracChangeset for help on using the changeset viewer.