Changeset 97047fc66 in mythtv
- Timestamp:
- Jan 20, 2012, 1:05:51 AM (13 years ago)
- 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
- Location:
- mythtv
- Files:
-
- 16 edited
-
libs/libmythbase/mythversion.h (modified) (1 diff)
-
libs/libmythservicecontracts/datacontracts/captureCard.h (modified) (4 diffs)
-
libs/libmythservicecontracts/services/captureServices.h (modified) (2 diffs)
-
libs/libmythtv/cardutil.cpp (modified) (7 diffs)
-
libs/libmythtv/cardutil.h (modified) (3 diffs)
-
libs/libmythtv/channelbase.cpp (modified) (3 diffs)
-
libs/libmythtv/channelbase.h (modified) (2 diffs)
-
libs/libmythtv/dbcheck.cpp (modified) (1 diff)
-
libs/libmythtv/tv_play.cpp (modified) (1 diff)
-
libs/libmythtv/tv_rec.cpp (modified) (9 diffs)
-
libs/libmythtv/tv_rec.h (modified) (3 diffs)
-
libs/libmythtv/videosource.cpp (modified) (21 diffs)
-
libs/libmythtv/videosource.h (modified) (7 diffs)
-
programs/mythbackend/services/capture.cpp (modified) (6 diffs)
-
programs/mythbackend/services/capture.h (modified) (3 diffs)
-
programs/mythtv-setup/main.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
mythtv/libs/libmythbase/mythversion.h
r43ca7d3fdd r97047fc66 13 13 /// Including changes in the libmythbase, libmyth, libmythtv, libmythav* and 14 14 /// libmythui class methods used by plug-ins. 15 #define MYTH_BINARY_VERSION "0.25.201201 03-1"15 #define MYTH_BINARY_VERSION "0.25.20120119-1" 16 16 17 17 /** \brief Increment this whenever the MythTV network protocol changes. -
mythtv/libs/libmythservicecontracts/datacontracts/captureCard.h
r43ca7d3fdd r97047fc66 36 36 { 37 37 Q_OBJECT 38 Q_CLASSINFO( "version" , "1. 0" );38 Q_CLASSINFO( "version" , "1.1" ); 39 39 40 40 Q_PROPERTY( uint CardId READ CardId WRITE setCardId ) … … 43 43 Q_PROPERTY( QString VBIDevice READ VBIDevice WRITE setVBIDevice ) 44 44 Q_PROPERTY( QString CardType READ CardType WRITE setCardType ) 45 Q_PROPERTY( QString DefaultInput READ DefaultInput WRITE setDefaultInput )46 45 Q_PROPERTY( uint AudioRateLimit READ AudioRateLimit WRITE setAudioRateLimit ) 47 46 Q_PROPERTY( QString HostName READ HostName WRITE setHostName ) … … 70 69 PROPERTYIMP( QString , VBIDevice ) 71 70 PROPERTYIMP( QString , CardType ) 72 PROPERTYIMP( QString , DefaultInput )73 71 PROPERTYIMP( uint , AudioRateLimit ) 74 72 PROPERTYIMP( QString , HostName ) … … 126 124 m_AudioDevice = src.m_AudioDevice; 127 125 m_CardType = src.m_CardType; 128 m_DefaultInput = src.m_DefaultInput;129 126 m_AudioRateLimit = src.m_AudioRateLimit; 130 127 m_HostName = src.m_HostName; -
mythtv/libs/libmythservicecontracts/services/captureServices.h
r43ca7d3fdd r97047fc66 52 52 { 53 53 Q_OBJECT 54 Q_CLASSINFO( "version" , "1. 3" );54 Q_CLASSINFO( "version" , "1.4" ); 55 55 Q_CLASSINFO( "RemoveCaptureCard_Method", "POST" ) 56 56 Q_CLASSINFO( "AddCaptureCard_Method", "POST" ) … … 84 84 const QString &VBIDevice, 85 85 const QString &CardType, 86 const QString &DefaultInput,87 86 const uint AudioRateLimit, 88 87 const QString &HostName, -
mythtv/libs/libmythtv/cardutil.cpp
r43ca7d3fdd r97047fc66 705 705 706 706 query.prepare( 707 "SELECT videodevice, cardtype, defaultinput,"707 "SELECT videodevice, cardtype, " 708 708 " hostname, signal_timeout, channel_timeout, " 709 709 " dvb_wait_for_seqstart, dvb_on_demand, dvb_tuning_delay, " … … 729 729 "SET videodevice = :V0, " 730 730 " 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 " 741 740 "WHERE cardid = :CARDID"); 742 741 for (uint i = 0; i < 12; i++) … … 1093 1092 } 1094 1093 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 1115 1096 * \param nCardID card id to check 1116 * \return the default input1097 * \return the start input 1117 1098 */ 1118 QString CardUtil::Get DefaultInput(uint nCardID)1099 QString CardUtil::GetStartInput(uint nCardID) 1119 1100 { 1120 1101 QString str = QString::null; 1121 1102 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"); 1125 1108 query.bindValue(":CARDID", nCardID); 1126 1109 1127 1110 if (!query.exec() || !query.isActive()) 1128 MythDB::DBError("CardUtil::Get DefaultInput()", query);1111 MythDB::DBError("CardUtil::GetStartInput()", query); 1129 1112 else if (query.next()) 1130 1113 str = query.value(0).toString(); … … 2108 2091 const QString &vbidevice, 2109 2092 const QString &cardtype, 2110 const QString &defaultinput,2111 2093 const uint audioratelimit, 2112 2094 const QString &hostname, … … 2134 2116 query.prepare( 2135 2117 "INSERT INTO capturecard " 2136 "(videodevice, audiodevice, vbidevice, cardtype, defaultinput,"2118 "(videodevice, audiodevice, vbidevice, cardtype, " 2137 2119 "audioratelimit, hostname, dvb_swfilter, dvb_sat_type, " 2138 2120 "dvb_wait_for_seqstart, skipbtaudio, dvb_on_demand, dvb_diseqc_type, " … … 2141 2123 "hue, diseqcid, dvb_eitscan) " 2142 2124 "VALUES (:VIDEODEVICE, :AUDIODEVICE, :VBIDEVICE, :CARDTYPE, " 2143 ": DEFAULTINPUT, :AUDIORATELIMIT, :HOSTNAME, :DVBSWFILTER, :DVBSATTYPE, "2125 ":AUDIORATELIMIT, :HOSTNAME, :DVBSWFILTER, :DVBSATTYPE, " 2144 2126 ":DVBWAITFORSEQSTART, :SKIPBTAUDIO, :DVBONDEMAND, :DVBDISEQCTYPE, " 2145 2127 ":FIREWIRESPEED, :FIREWIREMODEL, :FIREWIRECONNECTION, :SIGNALTIMEOUT, " … … 2151 2133 query.bindValue(":VBIDEVICE", vbidevice); 2152 2134 query.bindValue(":CARDTYPE", cardtype); 2153 query.bindValue(":DEFAULTINPUT", defaultinput);2154 2135 query.bindValue(":AUDIORATELIMIT", audioratelimit); 2155 2136 query.bindValue(":HOSTNAME", hostname); -
mythtv/libs/libmythtv/cardutil.h
r43ca7d3fdd r97047fc66 192 192 const QString &vbidevice, 193 193 const QString &cardtype, 194 const QString &defaultinput,195 194 const uint audioratelimit, 196 195 const QString &hostname, … … 260 259 static bool SetStartChannel(uint cardinputid, 261 260 const QString &channum); 262 static bool SetStartInput(uint cardid,263 const QString &inputname);264 261 265 262 // Input creation and deletion … … 285 282 286 283 static vector<uint> GetCardIDs(uint sourceid); 287 static QString Get DefaultInput(uint cardid);284 static QString GetStartInput(uint cardid); 288 285 static QStringList GetInputNames(uint cardid, uint sourceid = 0); 289 286 static bool GetInputInfo(InputInfo &info, -
mythtv/libs/libmythtv/channelbase.cpp
r43ca7d3fdd r97047fc66 970 970 ChannelUtil::SortChannels(m_allchannels, order, true); 971 971 972 m_currentInputID = Get DefaultInput(cardid);973 974 // In case that defaultinput is not set972 m_currentInputID = GetStartInput(cardid); 973 974 // In case that initial input is not set 975 975 if (m_currentInputID == -1) 976 976 m_currentInputID = GetNextInputNum(); … … 1041 1041 } 1042 1042 1043 /** \fn ChannelBase::Get DefaultInput(uint)1043 /** \fn ChannelBase::GetStartInput(uint) 1044 1044 * \brief Gets the default input for the cardid 1045 1045 * \param cardid ChannelBase::GetCardID() 1046 1046 */ 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); 1047 int ChannelBase::GetStartInput(uint cardid) 1048 { 1049 return GetInputByName(CardUtil::GetStartInput(cardid)); 1069 1050 } 1070 1051 … … 1250 1231 } 1251 1232 1252 QString input = genOpt.defaultinput, channum = startchannel; 1233 QString input = CardUtil::GetStartInput(tvrec->GetCaptureCardNum()); 1234 QString channum = startchannel; 1253 1235 channel->Init(input, channum, true); 1254 1236 -
mythtv/libs/libmythtv/channelbase.h
r43ca7d3fdd r97047fc66 108 108 /// Saves current channel as the default channel for the current input. 109 109 virtual void StoreInputChannels(void) 110 { StoreInputChannels(m_inputs); 111 StoreDefaultInput(GetCardID(), GetCurrentInput()); } 110 { StoreInputChannels(m_inputs); } 112 111 113 112 // Picture attribute settings … … 140 139 int inputNum, uint &mplexid_restriction) const; 141 140 142 int Get DefaultInput(uint cardid);141 int GetStartInput(uint cardid); 143 142 void ClearInputMap(void); 144 143 145 144 static void StoreInputChannels(const InputMap&); 146 static void StoreDefaultInput(uint cardid, const QString &input);147 145 148 146 protected: -
mythtv/libs/libmythtv/dbcheck.cpp
r43ca7d3fdd r97047fc66 133 133 The 'hostname' field is another important field for all cards 134 134 as it specifies which backend the capture card is connected to. 135 136 The 'defaultinput' field is a another important field for all137 cards except "FIREWIRE", "FREEBOX", "HDHOMERUN", and "IMPORT" cards.138 It specifies which139 input of the card to use. This does not have to mean a specific140 physical input, but may also indicate a different use for the141 same physical input.142 135 143 136 The 'signal_timeout' and 'channel_timeout' indicate in -
mythtv/libs/libmythtv/tv_play.cpp
r43ca7d3fdd r97047fc66 6469 6469 if (!channum.isEmpty()) 6470 6470 CardUtil::SetStartChannel(cardinputid, channum); 6471 CardUtil::SetStartInput(cardid, inputname);6472 6471 } 6473 6472 else -
mythtv/libs/libmythtv/tv_rec.cpp
r43ca7d3fdd r97047fc66 153 153 154 154 // configure the Channel instance 155 QString startchannel = GetStartChannel(cardid, genOpt.defaultinput); 155 QString startchannel = GetStartChannel(cardid, 156 CardUtil::GetStartInput(cardid)); 156 157 if (!CreateChannel(startchannel, true)) 157 158 return false; … … 1540 1541 query.prepare( 1541 1542 "SELECT videodevice, vbidevice, audiodevice, " 1542 " audioratelimit, defaultinput,cardtype, "1543 " audioratelimit, cardtype, " 1543 1544 " skipbtaudio, signal_timeout, channel_timeout, " 1544 1545 " dvb_wait_for_seqstart, " … … 1578 1579 test = query.value(4).toString(); 1579 1580 if (test != QString::null) 1580 gen_opts.defaultinput = test;1581 1582 test = query.value(5).toString();1583 if (test != QString::null)1584 1581 gen_opts.cardtype = test; 1585 1582 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); 1590 1587 1591 1588 // We should have at least 100 ms to acquire tables... … … 1595 1592 gen_opts.channel_timeout = gen_opts.signal_timeout + 2500; 1596 1593 1597 gen_opts.wait_for_seqstart = query.value( 9).toUInt();1594 gen_opts.wait_for_seqstart = query.value(8).toUInt(); 1598 1595 1599 1596 // DVB options 1600 uint dvboff = 10;1597 uint dvboff = 9; 1601 1598 dvb_opts.dvb_on_demand = query.value(dvboff + 0).toUInt(); 1602 1599 dvb_opts.dvb_tuning_delay = query.value(dvboff + 1).toUInt(); … … 1616 1613 } 1617 1614 1618 QString TVRec::GetStartChannel(uint cardid, const QString & defaultinput)1615 QString TVRec::GetStartChannel(uint cardid, const QString &startinput) 1619 1616 { 1620 1617 QString startchan = QString::null; … … 1628 1625 " inputname = :INPUTNAME"); 1629 1626 query.bindValue(":CARDID", cardid); 1630 query.bindValue(":INPUTNAME", defaultinput);1627 query.bindValue(":INPUTNAME", startinput); 1631 1628 1632 1629 if (!query.exec() || !query.isActive()) … … 1655 1652 " inputname = :INPUTNAME"); 1656 1653 query.bindValue(":CARDID", cardid); 1657 query.bindValue(":INPUTNAME", defaultinput);1654 query.bindValue(":INPUTNAME", startinput); 1658 1655 1659 1656 if (!query.exec() || !query.isActive()) … … 3296 3293 else 3297 3294 { 3298 input = genOpt.defaultinput;3295 input = CardUtil::GetStartInput(cardid); 3299 3296 channum = GetStartChannel(cardid, input); 3300 3297 } … … 3543 3540 3544 3541 GetDevices(newCardID, genOpt, dvbOpt, fwOpt); 3545 genOpt.defaultinput = inputname;3546 3542 CreateChannel(channum, false); 3547 3543 } -
mythtv/libs/libmythtv/tv_rec.h
r43ca7d3fdd r97047fc66 57 57 GeneralDBOptions() : 58 58 videodev(""), vbidev(""), 59 audiodev(""), defaultinput("Television"),59 audiodev(""), 60 60 cardtype("V4L"), 61 61 audiosamplerate(-1), skip_btaudio(false), … … 66 66 QString vbidev; 67 67 QString audiodev; 68 QString defaultinput;69 68 QString cardtype; 70 69 int audiosamplerate; … … 256 255 FireWireDBOptions &firewire_opts); 257 256 258 static QString GetStartChannel(uint cardid, const QString & defaultinput);257 static QString GetStartChannel(uint cardid, const QString &startinput); 259 258 260 259 void TeardownRecorder(uint request_flags); -
mythtv/libs/libmythtv/videosource.cpp
r43ca7d3fdd r97047fc66 972 972 "require the audio volume to be left alone.")); 973 973 }; 974 };975 976 class DVBInput : public ComboBoxSetting, public CaptureCardDBStorage977 {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 }992 974 }; 993 975 … … 1279 1261 addChild(new SignalTimeout(parent, 2000, 1000)); 1280 1262 addChild(new ChannelTimeout(parent, 9000, 1750)); 1281 addChild(new SingleCardInput(parent));1282 1263 1283 1264 model->SetGUID(dev->getValue()); … … 1575 1556 addChild(new IPTVHost(parent)); 1576 1557 addChild(new ChannelTimeout(parent, 3000, 1750)); 1577 addChild(new SingleCardInput(parent));1578 1558 addChild(new EmptyAudioDevice(parent)); 1579 1559 addChild(new EmptyVBIDevice(parent)); … … 1669 1649 device(new ASIDevice(parent)), 1670 1650 cardinfo(new TransLabelSetting()), 1671 input(new TunerCardInput(parent, device->getValue(), "ASI")),1672 1651 instances(new InstanceCount(parent)) 1673 1652 { … … 1676 1655 addChild(new EmptyVBIDevice(parent)); 1677 1656 addChild(cardinfo); 1678 addChild(input);1679 1657 addChild(instances); 1680 input->setVisible(false);1681 1658 1682 1659 connect(device, SIGNAL(valueChanged(const QString&)), … … 1713 1690 } 1714 1691 cardinfo->setValue(tr("Valid DVEO ASI card")); 1715 input->fillSelections(device);1716 1692 #else 1717 1693 cardinfo->setValue(QString("Not compiled with ASI support")); … … 1825 1801 addChild(cardip); 1826 1802 addChild(cardtuner); 1827 1828 addChild(new SingleCardInput(parent));1829 1803 1830 1804 TransButtonSetting *buttonRecOpt = new TransButtonSetting(); … … 2076 2050 addChild(desc); 2077 2051 2078 addChild(new SingleCardInput(parent));2079 2080 2052 connect(ip, SIGNAL(NewValue(const QString&)), 2081 2053 deviceid, SLOT( SetIP(const QString&))); … … 2097 2069 VerticalConfigurationGroup(false, true, false, false), 2098 2070 parent(a_parent), 2099 cardinfo(new TransLabelSetting()), vbidev(new VBIDevice(parent)), 2100 input(new TunerCardInput(parent)) 2071 cardinfo(new TransLabelSetting()), vbidev(new VBIDevice(parent)) 2101 2072 { 2102 2073 QString drv = "(?!ivtv|hdpvr|(saa7164(.*)))"; … … 2114 2085 addChild(new AudioDevice(parent)); 2115 2086 addChild(audgrp); 2116 addChild(input);2117 2087 2118 2088 connect(device, SIGNAL(valueChanged(const QString&)), … … 2139 2109 cardinfo->setValue(ci); 2140 2110 vbidev->setFilter(cn, dn); 2141 input->fillSelections(device);2142 2111 } 2143 2112 … … 2147 2116 parent(a_parent), 2148 2117 device(NULL), vbidevice(NULL), 2149 cardinfo(new TransLabelSetting()), 2150 input(new TunerCardInput(parent)) 2118 cardinfo(new TransLabelSetting()) 2151 2119 { 2152 2120 QString drv = "ivtv|(saa7164(.*))"; … … 2160 2128 addChild(vbidevice); 2161 2129 addChild(cardinfo); 2162 addChild(input);2163 2130 addChild(new ChannelTimeout(parent, 12000, 2000)); 2164 2131 … … 2187 2154 vbidevice->setVisible(dn!="ivtv"); 2188 2155 vbidevice->setFilter(cn, dn); 2189 input->fillSelections(device);2190 2156 } 2191 2157 … … 2250 2216 VerticalConfigurationGroup(false, true, false, false), 2251 2217 parent(a_parent), cardinfo(new TransLabelSetting()), 2252 videoinput(new TunerCardInput(parent)),2253 2218 audioinput(new TunerCardAudioInput(parent, QString::null, "HDPVR")) 2254 2219 { … … 2262 2227 addChild(new EmptyVBIDevice(parent)); 2263 2228 addChild(cardinfo); 2264 addChild(videoinput);2265 2229 addChild(audioinput); 2266 2230 addChild(new ChannelTimeout(parent, 12000, 2000)); … … 2287 2251 2288 2252 cardinfo->setValue(ci); 2289 videoinput->fillSelections(device);2290 2253 audioinput->fillSelections(device); 2291 2254 } … … 3745 3708 } 3746 3709 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 3776 3710 TunerCardAudioInput::TunerCardAudioInput(const CaptureCard &parent, 3777 3711 QString dev, QString type) : … … 3878 3812 diseqc_btn->setVisible(false); 3879 3813 addChild(diseqc_cfg); 3880 3881 defaultinput = new DVBInput(parent);3882 addChild(defaultinput);3883 defaultinput->setVisible(false);3884 3814 3885 3815 tuning_delay = new DVBTuningDelay(parent); … … 3910 3840 DTVDeviceTreeWizard diseqcWiz(*diseqc_tree); 3911 3841 diseqcWiz.exec(); 3912 defaultinput->fillSelections(diseqc_tree->IsInNeedOfConf());3913 3842 } 3914 3843 … … 3917 3846 VerticalConfigurationGroup::Load(); 3918 3847 diseqc_tree->Load(parent.getCardID()); 3919 defaultinput->fillSelections(diseqc_tree->IsInNeedOfConf());3920 3848 if (cardtype->getValue() == "DVB-S" || 3921 3849 cardtype->getValue() == "DVB-S2" || -
mythtv/libs/libmythtv/videosource.h
r43ca7d3fdd r97047fc66 291 291 }; 292 292 293 class TunerCardInput : public ComboBoxSetting, public CaptureCardDBStorage294 {295 Q_OBJECT296 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 TunerCardInput311 {312 Q_OBJECT313 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 330 293 class TunerCardAudioInput : public ComboBoxSetting, public CaptureCardDBStorage 331 294 { … … 480 443 TransLabelSetting *cardinfo; 481 444 VBIDevice *vbidev; 482 TunerCardInput *input;483 445 }; 484 446 … … 501 463 VBIDevice *vbidevice; 502 464 TransLabelSetting *cardinfo; 503 TunerCardInput *input;504 465 }; 505 466 … … 517 478 CaptureCard &parent; 518 479 TransLabelSetting *cardinfo; 519 TunerCardInput *videoinput;520 480 TunerCardAudioInput *audioinput; 521 481 }; 522 482 523 class TunerCardInput;524 483 class InstanceCount; 525 484 class ASIDevice; … … 539 498 ASIDevice *device; 540 499 TransLabelSetting *cardinfo; 541 TunerCardInput *input;542 500 InstanceCount *instances; 543 501 }; 544 502 545 class TunerCardInput;546 503 class InstanceCount; 547 504 … … 579 536 580 537 class DVBCardNum; 581 class DVBInput;582 538 class DVBCardName; 583 539 class DVBCardType; … … 606 562 607 563 DVBCardNum *cardnum; 608 DVBInput *defaultinput;609 564 DVBCardName *cardname; 610 565 DVBCardType *cardtype; -
mythtv/programs/mythbackend/services/capture.cpp
r43ca7d3fdd r97047fc66 48 48 49 49 QString str = "SELECT cardid, videodevice, audiodevice, vbidevice, " 50 "cardtype, defaultinput,audioratelimit, hostname, "50 "cardtype, audioratelimit, hostname, " 51 51 "dvb_swfilter, dvb_sat_type, dvb_wait_for_seqstart, " 52 52 "skipbtaudio, dvb_on_demand, dvb_diseqc_type, " … … 93 93 pCaptureCard->setVBIDevice ( query.value(3).toString() ); 94 94 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() ); 116 115 } 117 116 … … 135 134 136 135 QString str = "SELECT cardid, videodevice, audiodevice, vbidevice, " 137 "cardtype, defaultinput,audioratelimit, hostname, "136 "cardtype, audioratelimit, hostname, " 138 137 "dvb_swfilter, dvb_sat_type, dvb_wait_for_seqstart, " 139 138 "skipbtaudio, dvb_on_demand, dvb_diseqc_type, " … … 161 160 pCaptureCard->setVBIDevice ( query.value(3).toString() ); 162 161 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() ); 184 182 } 185 183 … … 209 207 const QString &sVBIDevice, 210 208 const QString &sCardType, 211 const QString &sDefaultInput,212 209 const uint nAudioRateLimit, 213 210 const QString &sHostName, … … 231 228 bool bDVBEITScan) 232 229 { 233 if ( sVideoDevice.isEmpty() || sCardType.isEmpty() || sHostName.isEmpty() || 234 sDefaultInput.isEmpty() ) 230 if ( sVideoDevice.isEmpty() || sCardType.isEmpty() || sHostName.isEmpty() ) 235 231 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." )); 237 233 238 234 int nResult = CardUtil::CreateCaptureCard(sVideoDevice, sAudioDevice, 239 sVBIDevice, sCardType, sDefaultInput,nAudioRateLimit,235 sVBIDevice, sCardType, nAudioRateLimit, 240 236 sHostName, nDVBSWFilter, nDVBSatType, bDVBWaitForSeqStart, 241 237 bSkipBTAudio, bDVBOnDemand, nDVBDiSEqCType, nFirewireSpeed, -
mythtv/programs/mythbackend/services/capture.h
r43ca7d3fdd r97047fc66 49 49 const QString &VBIDevice, 50 50 const QString &CardType, 51 const QString &DefaultInput,52 51 const uint AudioRateLimit, 53 52 const QString &HostName, … … 139 138 const QString &VBIDevice, 140 139 const QString &CardType, 141 const QString &DefaultInput,142 140 const uint AudioRateLimit, 143 141 const QString &HostName, … … 162 160 { 163 161 return m_obj.AddCaptureCard( VideoDevice, AudioDevice, VBIDevice, CardType, 164 DefaultInput,AudioRateLimit, HostName, DVBSWFilter,162 AudioRateLimit, HostName, DVBSWFilter, 165 163 DVBSatType, DVBWaitForSeqStart, SkipBTAudio, DVBOnDemand, 166 164 DVBDiSEqCType, FirewireSpeed, FirewireModel, FirewireConnection, -
mythtv/programs/mythtv-setup/main.cpp
r43ca7d3fdd r97047fc66 361 361 362 362 if (scanInputName.isEmpty()) 363 scanInputName = CardUtil::Get DefaultInput(scanCardId);363 scanInputName = CardUtil::GetStartInput(scanCardId); 364 364 365 365 bool okInputName = inputnames.contains(scanInputName);
Note: See TracChangeset
for help on using the changeset viewer.
