Ticket #1573: eit1.diff
File eit1.diff, 10.2 KB (added by , 18 years ago) |
---|
-
mythtv/libs/libmythtv/dbcheck.cpp
10 10 #include "mythdbcon.h" 11 11 12 12 /// This is the DB schema version expected by the running MythTV instance. 13 const QString currentDatabaseVersion = "113 3";13 const QString currentDatabaseVersion = "1134"; 14 14 15 15 static bool UpdateDBVersionNumber(const QString &newnumber); 16 16 static bool performActualUpdate(const QString updates[], QString version, … … 2157 2157 return false; 2158 2158 } 2159 2159 2160 if (dbver == "1133") 2161 { 2162 const QString updates[] = { 2163 // Dish Network 2164 "INSERT INTO dtv_privatetypes (sitype, networkid, private_type, private_value)" 2165 " VALUES('dvb', 4102, 'force_guide_present', 'yes');", 2166 "INSERT INTO dtv_privatetypes (sitype, networkid, private_type, private_value)" 2167 " VALUES('dvb', 4102, 'extended_guide_tid', '229');", 2168 2169 // Bell ExpressVu 2170 "INSERT INTO dtv_privatetypes (sitype, networkid, private_type, private_value)" 2171 " VALUES('dvb', 256, 'force_guide_present', 'yes');", 2172 "INSERT INTO dtv_privatetypes (sitype, networkid, private_type, private_value)" 2173 " VALUES('dvb', 256, 'guide_on_single_tid', 'yes');", 2174 "INSERT INTO dtv_privatetypes (sitype, networkid, private_type, private_value)" 2175 " VALUES('dvb', 257, 'force_guide_present', 'yes');", 2176 "INSERT INTO dtv_privatetypes (sitype, networkid, private_type, private_value)" 2177 " VALUES('dvb', 257, 'guide_on_single_tid', 'yes');", 2178 "INSERT INTO dtv_privatetypes (sitype, networkid, private_type, private_value)" 2179 " VALUES('dvb', 256, 'standard_guide_tid', '4');", 2180 "INSERT INTO dtv_privatetypes (sitype, networkid, private_type, private_value)" 2181 " VALUES('dvb', 257, 'standard_guide_tid', '102');", 2182 "" 2183 }; 2184 2185 if (!performActualUpdate(updates, "1134", dbver)) 2186 return false; 2187 } 2188 2160 2189 //"ALTER TABLE capturecard DROP COLUMN dvb_recordts;" in 0.21 2161 2190 //"ALTER TABLE capturecard DROP COLUMN dvb_hw_decoder;" in 0.21 2162 2191 //"ALTER TABLE cardinput DROP COLUMN preference;" in 0.22 -
mythtv/libs/libmythtv/eitscanner.h
28 28 void StopPassiveScan(void); 29 29 30 30 void StartActiveScan(TVRec*, uint max_seconds_per_source, 31 bool ignore_source );31 bool ignore_source, bool limit_transport=false); 32 32 33 33 void StopActiveScan(void); 34 34 -
mythtv/libs/libmythtv/tv_rec.cpp
78 78 #define LOC QString("TVRec(%1): ").arg(cardid) 79 79 #define LOC_ERR QString("TVRec(%1) Error: ").arg(cardid) 80 80 81 /// How many seconds after entering kState_None should we start EIT Scanner82 const uint TVRec::kEITScanStartTimeout = 60; /* 1 minute */83 84 81 /// How many milliseconds the signal monitor should wait between checks 85 82 const uint TVRec::kSignalMonitoringRate = 50; /* msec */ 86 83 … … 768 765 { 769 766 // Add some randomness to avoid all cards starting 770 767 // EIT scanning at nearly the same time. 771 uint timeout = kEITScanStartTimeout + random() % 59; 768 uint idle_start = gContext->GetNumSetting("EITCrawIdleStart", 1); 769 uint timeout = (idle_start * 60) + random() % 59; 772 770 eitScanStartTime = eitScanStartTime.addSecs(timeout); 773 771 } 774 772 else … … 1207 1205 1208 1206 // Add some randomness to avoid all cards starting 1209 1207 // EIT scanning at nearly the same time. 1210 uint timeout = kEITScanStartTimeout + random() % 59; 1208 uint idle_start = gContext->GetNumSetting("EITCrawIdleStart", 1); 1209 uint timeout = (idle_start * 60) + random() % 59; 1211 1210 eitScanStartTime = QDateTime::currentDateTime().addSecs(timeout); 1212 1211 1213 1212 while (HasFlags(kFlagRunMainLoop)) … … 1343 1342 { 1344 1343 uint ttMin = gContext->GetNumSetting("EITTransportTimeout", 5); 1345 1344 uint ignore = gContext->GetNumSetting("EITIgnoresSource", 0); 1346 scanner->StartActiveScan(this, ttMin * 60, ignore); 1345 uint tid_limit = gContext->GetNumSetting("EITCrawLimitTransports", 0); 1346 scanner->StartActiveScan(this, ttMin * 60, ignore, tid_limit); 1347 1347 SetFlags(kFlagEITScannerRunning); 1348 1348 eitScanStartTime = QDateTime::currentDateTime().addYears(1); 1349 1349 } -
mythtv/libs/libmythtv/eitscanner.cpp
183 183 } 184 184 185 185 void EITScanner::StartActiveScan(TVRec *_rec, uint max_seconds_per_source, 186 bool _ignore_source )186 bool _ignore_source, bool limit_transports) 187 187 { 188 188 rec = _rec; 189 189 ignore_source = _ignore_source; … … 191 191 if (!activeScanChannels.size()) 192 192 { 193 193 MSqlQuery query(MSqlQuery::InitCon()); 194 query.prepare( 195 "SELECT channum, mplexid " 196 "FROM channel, cardinput, capturecard, videosource " 197 "WHERE cardinput.sourceid = channel.sourceid AND " 198 " videosource.sourceid = channel.sourceid AND " 199 " capturecard.cardid = cardinput.cardid AND " 200 " channel.mplexid IS NOT NULL AND " 201 " useonairguide = 1 AND " 202 " useeit = 1 AND " 203 " cardinput.cardid = :CARDID " 204 "ORDER BY cardinput.sourceid, atscsrcid"); 194 195 if (limit_transports) 196 query.prepare( 197 "SELECT MIN(channum), channel.mplexid " 198 "FROM channel, dtv_multiplex, dtv_privatetypes, videosource, " 199 "cardinput, capturecard " 200 "WHERE dtv_multiplex.networkid = dtv_privatetypes.networkid " 201 "AND videosource.sourceid = channel.sourceid " 202 "AND cardinput.sourceid = channel.sourceid " 203 "AND capturecard.cardid = cardinput.cardid " 204 "AND (private_type = 'extended_guide_tid' " 205 "OR private_type = 'standard_guide_tid') " 206 "AND private_value = transportid " 207 "AND channel.mplexid = dtv_multiplex.mplexid " 208 "AND useonairguide = 1 " 209 "AND useeit = 1 " 210 "AND cardinput.cardid = :CARDID " 211 "GROUP BY transportid"); 212 else 213 query.prepare( 214 "SELECT channum, mplexid " 215 "FROM channel, cardinput, capturecard, videosource " 216 "WHERE cardinput.sourceid = channel.sourceid AND " 217 " videosource.sourceid = channel.sourceid AND " 218 " capturecard.cardid = cardinput.cardid AND " 219 " channel.mplexid IS NOT NULL AND " 220 " useonairguide = 1 AND " 221 " useeit = 1 AND " 222 " cardinput.cardid = :CARDID " 223 "ORDER BY cardinput.sourceid, atscsrcid"); 224 205 225 query.bindValue(":CARDID", rec->GetCaptureCardNum()); 206 226 207 227 if (!query.exec() || !query.isActive()) -
mythtv/libs/libmythtv/tv_rec.h
372 372 QString rbFileExt; 373 373 374 374 public: 375 static const uint kEITScanStartTimeout;376 375 static const uint kSignalMonitoringRate; 377 376 378 377 // General State flags -
mythtv/setup/backendsettings.cpp
252 252 return gc; 253 253 }; 254 254 255 static GlobalSpinBox *EITCrawIdleStart() 256 { 257 GlobalSpinBox *gc = new GlobalSpinBox("EITCrawIdleStart", 1, 120, 1); 258 gc->setLabel(QObject::tr("Backend Idle Before EIT Craw (mins)")); 259 gc->setValue(1); 260 QString help = QObject::tr( 261 "The amount of idle time, in minutes, to wait before listings " 262 "data is collected."); 263 gc->setHelpText(help); 264 return gc; 265 } 255 266 267 static GlobalCheckBox *EITCrawLimitTransports() 268 { 269 GlobalCheckBox *gc = new GlobalCheckBox("EITCrawLimitTransports"); 270 gc->setLabel(QObject::tr("EIT Craw Limits Transports")); 271 gc->setValue(false); 272 QString help = QObject::tr("If set, listings data collected during " 273 "idle times will only be for providers which " 274 "have extended guide information available on " 275 "selective transports."); 276 gc->setHelpText(help); 277 return gc; 278 }; 279 256 280 static GlobalSpinBox *WOLbackendReconnectWaitTime() 257 281 { 258 282 GlobalSpinBox *gc = new GlobalSpinBox("WOLbackendReconnectWaitTime", 0, 1200, 5); … … 670 694 group2a1->setLabel(QObject::tr("EIT Scanner Options")); 671 695 group2a1->addChild(EITTransportTimeout()); 672 696 group2a1->addChild(EITIgnoresSource()); 697 group2a1->addChild(EITCrawIdleStart()); 698 group2a1->addChild(EITCrawLimitTransports()); 673 699 addChild(group2a1); 674 700 675 701 VerticalConfigurationGroup* group3 = new VerticalConfigurationGroup(false);