Ticket #2830: scan.patch
| File scan.patch, 5.0 KB (added by , 20 years ago) |
|---|
-
libs/libmythtv/mpeg/mpegstreamdata.cpp
792 792 793 793 if (IsEncryptionTestPID(tspacket.PID())) 794 794 { 795 #if 0 795 796 ProcessEncryptedPacket(tspacket); 797 #else 798 pmt_cache_t::const_iterator it = _cached_pmts.begin(); 799 for (; it != _cached_pmts.end(); ++it) 800 { 801 ProgramMapTable* pmt = *it; 802 if (pmt->PCRPID() == tspacket.PID()) 803 { 804 if (ProcessEncryptedPacket(tspacket)) 805 { 806 pmt->ScrambledPCR = 1; 807 } 808 else 809 { 810 pmt->ScrambledPCR = 0; 811 } 812 } 813 } 814 #endif 796 815 } 797 816 else 798 817 if (ok && !tspacket.ScramplingControl() && tspacket.HasPayload() && … … 1333 1352 // QString("Setting up decryption monitoring " 1334 1353 // "for program %1").arg(pmt->ProgramNumber())); 1335 1354 1355 #if 0 1336 1356 bool encrypted = pmt->IsProgramEncrypted(); 1337 1357 for (uint i = 0; i < pmt->StreamCount(); i++) 1338 1358 { … … 1347 1367 pmt->ProgramNumber(), pmt->StreamPID(i), is_vid); 1348 1368 } 1349 1369 } 1370 #else 1371 AddEncryptionTestPID(pmt->ProgramNumber(), pmt->PCRPID(), 1); 1372 #endif 1350 1373 } 1351 1374 1352 1375 void MPEGStreamData::ResetDecryptionMonitoringState(void) … … 1383 1406 /** \fn MPEGStreamData::ProcessEncryptedPacket(const TSPacket& tspacket) 1384 1407 * \brief counts en/decrypted packets to decide if a stream is en/decrypted 1385 1408 */ 1386 voidMPEGStreamData::ProcessEncryptedPacket(const TSPacket& tspacket)1409 bool MPEGStreamData::ProcessEncryptedPacket(const TSPacket& tspacket) 1387 1410 { 1388 1411 QMutexLocker locker(&_encryption_lock); 1389 1412 … … 1409 1432 } 1410 1433 1411 1434 if (status == info.status) 1412 return ; // pid encryption status unchanged1435 return(!(info.status == kEncDecrypted)); // pid encryption status unchanged 1413 1436 1414 1437 info.status = status; 1415 1438 … … 1464 1487 1465 1488 for (uint i = 0; i < pnum_del_list.size(); i++) 1466 1489 RemoveEncryptionTestPIDs(pnums[i]); 1490 1491 return(!(info.status == kEncDecrypted)); 1467 1492 } -
libs/libmythtv/mpeg/mpegtables.h
513 513 { 514 514 assert(TableID::PMT == TableID()); 515 515 Parse(); 516 ScrambledPCR = 1; 516 517 } 517 518 518 519 ProgramMapTable(const PSIPTable& table) : PSIPTable(table) 519 520 { 520 521 assert(TableID::PMT == TableID()); 521 522 Parse(); 523 ScrambledPCR = 1; 522 524 } 523 525 524 526 static ProgramMapTable* Create(uint programNumber, uint basepid, … … 652 654 653 655 static const uint pmt_header = 4; // minimum PMT header offset 654 656 mutable vector<unsigned char*> _ptrs; // used to parse 657 public: 658 uint ScrambledPCR; 655 659 }; 656 660 657 661 /** \class ConditionalAccessTable -
libs/libmythtv/mpeg/mpegstreamdata.h
254 254 void DeletePartialPES(uint pid); 255 255 void ProcessPAT(const ProgramAssociationTable *pat); 256 256 void ProcessPMT(const ProgramMapTable *pmt); 257 voidProcessEncryptedPacket(const TSPacket&);257 bool ProcessEncryptedPacket(const TSPacket&); 258 258 259 259 static int ResyncStream(unsigned char *buffer, int curr_pos, int len); 260 260 -
libs/libmythtv/mpeg/mpegtables.cpp
451 451 */ 452 452 bool ProgramMapTable::IsEncrypted(void) const 453 453 { 454 #if 0 454 455 bool encrypted = IsProgramEncrypted(); 455 456 456 457 for (uint i = 0; !encrypted && i < StreamCount(); i++) 457 458 encrypted |= IsStreamEncrypted(i); 458 459 459 460 return encrypted; 461 #else 462 return ScrambledPCR; 463 #endif 460 464 } 461 465 462 466 /** \fn ProgramMapTable::IsProgramEncrypted(void) const -
libs/libmythtv/dtvsignalmonitor.cpp
312 312 AddFlags(kDTVSigMon_PMTSeen); 313 313 314 314 if (programNumber < 0) 315 { 316 #if 1 317 GetStreamData()->TestDecryption(pmt); 318 #endif 315 319 return; // don't print error messages during channel scan. 320 } 316 321 317 322 if (pmt->ProgramNumber() != (uint)programNumber) 318 323 { … … 322 327 return; // Not the PMT we are looking for... 323 328 } 324 329 330 #if 0 325 331 if (pmt->IsEncrypted()) 332 #endif 326 333 GetStreamData()->TestDecryption(pmt); 327 334 328 335 // if PMT contains audio and/or video stream set as matching. … … 338 345 if ((hasVideo >= GetStreamData()->GetVideoStreamsRequired()) && 339 346 (hasAudio >= GetStreamData()->GetAudioStreamsRequired())) 340 347 { 348 #if 0 341 349 if (pmt->IsEncrypted()) 350 #endif 342 351 AddFlags(kDTVSigMon_WaitForCrypt); 343 352 344 353 AddFlags(kDTVSigMon_PMTMatch);
