Ticket #5882: inappropriate_mux.diff
File inappropriate_mux.diff, 4.7 KB (added by , 15 years ago) |
---|
-
channelutil.cpp
old new 130 130 .arg(db_source_id).arg(sistandard) 131 131 .arg(frequency).arg(modulation)); 132 132 133 // some tables have extra blank entries 134 if (frequency == 0) 135 { 136 VERBOSE(VB_IMPORTANT, "insert_dtv_multiplex: will not create a multiplex with a zero frequency"); 137 return 0; 138 } 139 133 140 // If transport is already present, skip insert 134 141 int mplex = get_dtv_multiplex( 135 142 db_source_id, sistandard, frequency, … … 289 296 } 290 297 291 298 void handle_transport_desc(vector<uint> &muxes, const MPEGDescriptor &desc, 292 uint sourceid, uint tsid, uint netid )299 uint sourceid, uint tsid, uint netid, DTVTunerType tuner_type) 293 300 { 294 301 uint tag = desc.DescriptorTag(); 295 302 … … 298 305 const TerrestrialDeliverySystemDescriptor cd(desc); 299 306 uint64_t freq = cd.FrequencyHz(); 300 307 308 // some tables have extra blank entries 309 if (cd.FrequencyHz() == 0) return; 310 311 if ((DTVTunerType::kTunerTypeDVB_T != tuner_type) && 312 (DTVTunerType::kTunerTypeOFDM != tuner_type) 313 ) 314 { 315 VERBOSE(VB_IMPORTANT, QString("handle_transport_desc: DVB-T descriptor on %1 tuner"). 316 arg(tuner_type.toString())); 317 return; 318 } 319 301 320 // Use the frequency we already have for this mplex 302 321 // as it may be one of the other_frequencies for this mplex 303 322 int mux = ChannelUtil::GetMplexID(sourceid, tsid, netid); … … 342 361 { 343 362 const SatelliteDeliverySystemDescriptor cd(desc); 344 363 364 // some tables have extra blank entries 365 if (cd.FrequencyHz() == 0) return; 366 367 if ((DTVTunerType::kTunerTypeDVB_S != tuner_type) && 368 (DTVTunerType::kTunerTypeDVB_S2 != tuner_type) && 369 (DTVTunerType::kTunerTypeQPSK != tuner_type) 370 ) 371 { 372 VERBOSE(VB_IMPORTANT, QString("handle_transport_desc: DVB-S descriptor on %1 tuner"). 373 arg(tuner_type.toString())); 374 return; 375 } 376 345 377 uint mux = ChannelUtil::CreateMultiplex( 346 378 sourceid, "dvb", 347 379 cd.FrequencyHz(), cd.ModulationString(), … … 366 398 { 367 399 const CableDeliverySystemDescriptor cd(desc); 368 400 401 // some tables have extra blank entries 402 if (cd.FrequencyHz() == 0) return; 403 404 if ((DTVTunerType::kTunerTypeDVB_C != tuner_type) && 405 (DTVTunerType::kTunerTypeQAM != tuner_type) 406 ) 407 { 408 VERBOSE(VB_IMPORTANT, QString("handle_transport_desc: DVB-C descriptor on %1 tuner"). 409 arg(tuner_type.toString())); 410 return; 411 } 412 369 413 uint mux = ChannelUtil::CreateMultiplex( 370 414 sourceid, "dvb", 371 415 cd.FrequencyHz(), cd.ModulationString(), … … 450 494 * 451 495 */ 452 496 vector<uint> ChannelUtil::CreateMultiplexes( 453 int sourceid, const NetworkInformationTable *nit)497 DTVTunerType tuner_type, int sourceid, const NetworkInformationTable *nit) 454 498 { 455 499 vector<uint> muxes; 456 500 … … 468 512 for (uint j = 0; j < list.size(); ++j) 469 513 { 470 514 const MPEGDescriptor desc(list[j]); 471 handle_transport_desc(muxes, desc, sourceid, tsid, netid); 515 516 handle_transport_desc(muxes, desc, sourceid, tsid, netid, tuner_type); 472 517 } 473 518 } 474 519 return muxes; -
libmythtv/siscan.cpp
330 330 tr("Network %1 Processing").arg(nit->NetworkName())); 331 331 332 332 vector<uint> mp; 333 mp = ChannelUtil::CreateMultiplexes( sourceID, nit);333 mp = ChannelUtil::CreateMultiplexes(GetDVBChannel()->GetCardType(), sourceID, nit); 334 334 VERBOSE(VB_SIPARSER, QString("Created %1 multiplexes from NIT") 335 335 .arg(mp.size())); 336 336 -
channelutil.h
old new 74 74 int transport_id, int network_id); 75 75 76 76 static vector<uint> CreateMultiplexes( 77 int sourceid, const NetworkInformationTable *nit);77 DTVTunerType tuner_type, int sourceid, const NetworkInformationTable *nit); 78 78 79 79 static uint GetMplexID(uint sourceid, const QString &channum); 80 80 static int GetMplexID(uint sourceid, uint frequency);