Ticket #1056: dishnet_eit_9143.patch
File dishnet_eit_9143.patch, 10.4 KB (added by , 20 years ago) |
---|
-
libs/libmythtv/mpeg/dvbtables.cpp
159 159 // Standard Future Event Information Tables for other transports 160 160 is_eit |= (TableID::SC_EITbego <= table_id && 161 161 TableID::SC_EITendo >= table_id); 162 // Dish Network Long Term Future Event Information for all transports 163 is_eit |= (TableID::DN_EITbego <= table_id && 164 TableID::DN_EITendo >= table_id); 162 165 163 166 return is_eit; 164 167 } -
libs/libmythtv/mpeg/mpegtables.h
183 183 DVB_RST_PID = 0x0013, 184 184 DVB_TOT_PID = 0x0013, 185 185 186 // Dishnet longterm EIT is on pid 0x300 187 DVB_DNLONG_EIT_PID = 0x0300, 188 186 189 ATSC_PSIP_PID = 0x1ffb, 187 190 }; 188 191 … … 225 228 DIT = 0x7e, // always on pid 0x1e 226 229 SIT = 0x7f, // always on pid 0x1f 227 230 231 // Dishnet Longterm EIT data 232 DN_EITbego = 0x80, // always on pid 0x300 233 DN_EITendo = 0xfe, // always on pid 0x300 234 228 235 // ATSC 229 236 STUFFING = 0x80, 230 237 CAPTION = 0x86, -
libs/libmythtv/dvbsiparser.cpp
91 91 SIParser::deleteLater(); 92 92 } 93 93 94 #ifdef USING_DVB_EIT 95 void DVBSIParser::SetDishNetEIT(bool onoff) 96 { 97 SIParser::SetDishNetEIT(onoff); 98 } 99 #endif 100 94 101 /** \fn DVBSIParser::SystemInfoThread(void*) 95 102 * \brief Thunk that allows siparser_thread pthread to 96 103 * call DVBSIParser::StartSectionReader(). -
libs/libmythtv/siparser.cpp
73 73 74 74 Reset(); 75 75 76 // Default to not watch for Dishnet longterm EIT events 77 eit_dn_long = false; 78 76 79 // Get a list of wanted languages and set up their priorities 77 80 // (Lowest number wins) 78 81 QStringList langPref = iso639_get_language_list(); … … 127 130 QObject::deleteLater(); 128 131 } 129 132 133 #ifdef USING_DVB_EIT 134 void SIParser::SetDishNetEIT(bool onoff) 135 { 136 eit_dn_long = onoff; 137 } 138 #endif 139 130 140 /* Resets all trackers, and closes all section filters */ 131 141 void SIParser::Reset() 132 142 { … … 1085 1095 Table[EVENTS]->DependencyMet(SERVICES); 1086 1096 //Table[EVENTS]->AddPid(0x12,0x00,0x00,true); // see ticket #755 1087 1097 Table[EVENTS]->AddPid(0x12,0x7F,0x80,0x12); // see ticket #755 1098 // This should only be added based on the user enabling 7-9day dishnet 1099 // EIT events 1100 1101 if (eit_dn_long) 1102 Table[EVENTS]->AddPid(0x300,0x00,0x00,true); 1103 1088 1104 #endif // USING_DVB_EIT 1089 1105 } 1090 1106 … … 1150 1166 // Event to use temporarily to fill in data 1151 1167 Event event; 1152 1168 event.ServiceID = eit->ServiceID(); 1169 event.TableID = eit->TableID(); 1153 1170 event.TransportID = eit->TSID(); 1154 1171 event.NetworkID = eit->OriginalNetworkID(); 1155 1172 event.EventID = eit->EventID(i); 1173 1156 1174 event.StartTime = MythUTCToLocal(eit->StartTimeUTC(i)); 1157 1175 event.EndTime = event.StartTime.addSecs(eit->DurationInSeconds(i)); 1158 1176 … … 1349 1367 } 1350 1368 break; 1351 1369 1370 case DescriptorID::dish_ename: 1371 { 1372 int ht = (event.TableID > 0x80) ? 2 : 1; 1373 if (data[1] > 1) 1374 event.Event_Name = atsc_huffman2_to_string(data+3, data[1]-1, ht); 1375 } 1376 break; 1377 1378 case DescriptorID::dish_edescription: 1379 { 1380 int ht = (event.TableID > 0x80) ? 2 : 1; 1381 if (data[1] > 2) 1382 { 1383 if ((data[3] & 0xf8) == 0x80) 1384 event.Description = atsc_huffman2_to_string(data+4, data[1]-2, ht); 1385 else 1386 event.Description = atsc_huffman2_to_string(data+3, data[1]-1, ht); 1387 } 1388 } 1389 break; 1390 1352 1391 default: 1353 1392 ProcessUnusedDescriptor(pid, data, descriptorLength + 2); 1354 1393 break; -
libs/libmythtv/eit.h
31 31 uint SourcePID; 32 32 uint TransportID; 33 33 uint NetworkID; 34 uint TableID; 34 35 uint ServiceID; ///< NOT the Virtual Channel Number used by ATSC 35 36 uint EventID; 36 37 bool Stereo; -
libs/libmythtv/videosource.cpp
1353 1353 private: 1354 1354 }; 1355 1355 1356 class DishNetEIT: public CheckBoxSetting, public CISetting 1357 { 1358 public: 1359 DishNetEIT(const CardInput& parent): 1360 CISetting(parent, "dishnet_eit") 1361 { 1362 setLabel(QObject::tr("Gather DishNet LongTerm EIT Data")); 1363 setValue(false); 1364 }; 1365 }; 1366 1356 1367 CardInput::CardInput(bool isDVBcard) 1357 1368 { 1358 1369 addChild(id = new ID()); … … 1397 1408 group->addChild(startchan); 1398 1409 group->addChild(new InputPreference(*this)); 1399 1410 1411 addChild(group); 1412 1400 1413 #ifdef USING_DVB 1401 1414 if (isDVBcard) 1402 1415 { 1403 group->addChild(diseqcpos = new DiSEqCPos(*this)); 1404 group->addChild(diseqcport = new DiSEqCPort(*this)); 1405 group->addChild(lnblofswitch = new LNBLofSwitch(*this)); 1406 group->addChild(lnblofhi = new LNBLofHi(*this)); 1407 group->addChild(lnbloflo = new LNBLofLo(*this)); 1416 ConfigurationGroup *dvbgroup = 1417 new VerticalConfigurationGroup(false, false, true, true); 1418 1419 dvbgroup->addChild(diseqcpos = new DiSEqCPos(*this)); 1420 dvbgroup->addChild(diseqcport = new DiSEqCPort(*this)); 1421 dvbgroup->addChild(lnblofswitch = new LNBLofSwitch(*this)); 1422 dvbgroup->addChild(lnblofhi = new LNBLofHi(*this)); 1423 dvbgroup->addChild(lnbloflo = new LNBLofLo(*this)); 1424 1408 1425 HorizontalConfigurationGroup *h1 = 1409 1426 new HorizontalConfigurationGroup(false, false, true, true); 1410 1427 h1->addChild(new FreeToAir(*this)); 1411 1428 h1->addChild(new RadioServices(*this)); 1412 group->addChild(h1); 1429 dvbgroup->addChild(h1); 1430 1431 dvbgroup->addChild(new DishNetEIT(*this)); 1432 addChild(dvbgroup); 1433 1413 1434 } 1414 1435 #endif 1415 1436 1416 addChild(group);1417 1418 1437 childid = new ChildID(*this); 1419 1438 addChild(childid); 1420 1439 … … 1423 1442 connect(srcfetch, SIGNAL(pressed()), SLOT(sourceFetch())); 1424 1443 connect(sourceid, SIGNAL(valueChanged(const QString&)), 1425 1444 startchan,SLOT( SetSourceID (const QString&))); 1445 1426 1446 } 1427 1447 1428 1448 QString CardInput::getSourceName(void) const -
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 = "112 7";13 const QString currentDatabaseVersion = "1128"; 14 14 15 15 static bool UpdateDBVersionNumber(const QString &newnumber); 16 16 static bool performActualUpdate(const QString updates[], QString version, … … 2048 2048 return false; 2049 2049 } 2050 2050 2051 if(dbver == "1128") 2052 { 2053 const QString updates[] = { 2054 "ALTER TABLE cardinput ADD COLUMN dishnet_eit TINYINT(1) NOT NULL DEFAULT 0;", 2055 "" 2056 }; 2057 if (!performActualUpdate(updates, "1128", dbver)) 2058 return false; 2059 } 2060 2051 2061 //"ALTER TABLE capturecard DROP COLUMN dvb_recordts;" in 0.21 2052 2062 //"ALTER TABLE capturecard DROP COLUMN dvb_hw_decoder;" in 0.21 2053 2063 -
libs/libmythtv/tv_rec.cpp
1064 1064 #endif // USING_V4L 1065 1065 } 1066 1066 1067 #ifdef USING_DVB_EIT 1068 bool TVRec::WantDishNetEIT(int cardnum) 1069 { 1070 MSqlQuery query(MSqlQuery::InitCon()); 1071 QString theQuery = QString("SELECT dishnet_eit FROM cardinput " 1072 "WHERE cardid = %1") 1073 .arg(cardnum); 1074 query.exec(theQuery); 1075 1076 // If we can pull the value, return it whatever it might be 1077 if (query.next()) 1078 return query.value(0).toBool(); 1079 1080 // Default to false 1081 return false; 1082 } 1083 #endif 1084 1067 1085 void TVRec::CreateSIParser(int program_num) 1068 1086 { 1069 1087 (void) program_num; … … 1088 1106 (program_num >= 0) ? program_num : service_id); 1089 1107 1090 1108 #ifdef USING_DVB_EIT 1109 if (WantDishNetEIT(GetCaptureCardNum())) 1110 { 1111 VERBOSE(VB_EIT, "Enabling DishNet Long Term EIT Support"); 1112 dvbsiparser->SetDishNetEIT(true); 1113 } 1114 1091 1115 if (scanner) 1092 1116 scanner->StartPassiveScan(dvbc, dvbsiparser); 1093 1117 #endif // USING_DVB_EIT -
libs/libmythtv/tv_rec.h
257 257 void TeardownSignalMonitor(void); 258 258 DTVSignalMonitor *GetDTVSignalMonitor(void); 259 259 260 #ifdef USING_DVB_EIT 261 bool WantDishNetEIT(int cardnum); 262 #endif 263 260 264 void CreateSIParser(int num); 261 265 void TeardownSIParser(void); 262 266 -
libs/libmythtv/dvbsiparser.h
76 76 void StartSectionReader(); 77 77 void StopSectionReader(); 78 78 79 #ifdef USING_DVB_EIT 80 void SetDishNetEIT(bool onoff); 81 #endif 82 79 83 public slots: 80 84 void deleteLater(void); 81 85 -
libs/libmythtv/siparser.h
121 121 void ParseTable(uint8_t* buffer, int size, uint16_t pid); 122 122 void CheckTrackers(void); 123 123 124 #ifdef USING_DVB_EIT 125 void SetDishNetEIT(bool onoff); 126 #endif 124 127 public slots: 125 128 virtual void deleteLater(void); 126 129 … … 239 242 #ifdef USING_DVB_EIT 240 243 /// EITFixUp instance 241 244 EITFixUp eitfixup; 245 246 bool eit_dn_long; 242 247 #endif 243 248 244 249 // statistics