Ticket #8645: encrypt-detect.patch
File encrypt-detect.patch, 3.5 KB (added by , 10 years ago) |
---|
-
libs/libmythtv/channelscan/channelscan_sm.cpp
359 359 QString("Got a Program Map Table for %1") 360 360 .arg((*current).FriendlyName) + "\n" + pmt->toString()); 361 361 362 if (!currentTestingDecryption && pmt->IsEncrypted( ))362 if (!currentTestingDecryption && pmt->IsEncrypted(GetDTVChannel()->GetSIStandard())) 363 363 currentEncryptionStatus[pmt->ProgramNumber()] = kEncUnknown; 364 364 } 365 365 … … 1172 1172 info.is_opencable = true; 1173 1173 } 1174 1174 1175 info.is_encrypted |= pmt->IsEncrypted( );1175 info.is_encrypted |= pmt->IsEncrypted(GetDTVChannel()->GetSIStandard()); 1176 1176 info.in_pmt = true; 1177 1177 } 1178 1178 -
libs/libmythtv/mpeg/mpegtables.cpp
467 472 return StreamID::IsAudio(stream_id); 468 473 } 469 474 470 /** \fn ProgramMapTable::IsEncrypted( void) const471 * \brief Returns true iff PMT contains CA descriptor .475 /** \fn ProgramMapTable::IsEncrypted(QString sistandard) const 476 * \brief Returns true iff PMT contains CA descriptor for a vid/aud stream. 472 477 */ 473 bool ProgramMapTable::IsEncrypted( void) const478 bool ProgramMapTable::IsEncrypted(QString sistandard) const 474 479 { 475 480 bool encrypted = IsProgramEncrypted(); 476 481 477 for (uint i = 0; !encrypted && i < StreamCount(); i++) 478 encrypted |= IsStreamEncrypted(i); 482 for (uint i = 0; !encrypted && i < StreamCount(); i++) { 483 /* Only check audio/video streams */ 484 if (IsAudio(i,sistandard) || IsVideo(i,sistandard)) 485 encrypted |= IsStreamEncrypted(i); 486 } 479 487 480 488 return encrypted; 481 489 } -
libs/libmythtv/mpeg/mpegtables.h
604 614 // helper methods 605 615 bool IsVideo(uint i, QString sistandard) const; 606 616 bool IsAudio(uint i, QString sistandard) const; 607 bool IsEncrypted( void) const;617 bool IsEncrypted(QString sistandard) const; 608 618 bool IsProgramEncrypted(void) const; 609 619 bool IsStreamEncrypted(uint pid) const; 610 620 /// Returns true iff PMT contains a still-picture video stream -
libs/libmythtv/dtvsignalmonitor.cpp
336 336 return; // Not the PMT we are looking for... 337 337 } 338 338 339 if (pmt->IsEncrypted()) 339 if (pmt->IsEncrypted(GetDTVChannel()->GetSIStandard())) { 340 VERBOSE(VB_IMPORTANT,QString("Pmt says it %1 is encrypted").arg(programNumber)); 340 341 GetStreamData()->TestDecryption(pmt); 342 343 } 341 344 342 345 // if PMT contains audio and/or video stream set as matching. 343 346 uint hasAudio = 0; … … 352 355 if ((hasVideo >= GetStreamData()->GetVideoStreamsRequired()) && 353 356 (hasAudio >= GetStreamData()->GetAudioStreamsRequired())) 354 357 { 355 if (pmt->IsEncrypted( ) && !ignore_encrypted)358 if (pmt->IsEncrypted(GetDTVChannel()->GetSIStandard()) && !ignore_encrypted) 356 359 AddFlags(kDTVSigMon_WaitForCrypt); 357 360 358 361 AddFlags(kDTVSigMon_PMTMatch);