Permalink
Browse files

Backports [25088] to 0.23-fixes. Fixes scrambling detection. Refs #8549.

git-svn-id: http://svn.mythtv.org/svn/branches/release-0-23-fixes@25318 7dbf422c-18fa-0310-86e9-fd20926502f2
  • Loading branch information...
1 parent 88981f9 commit 0f42d32d8101559aab8aa555852d30abd61ef7ea @daniel-kristjansson daniel-kristjansson committed Jul 9, 2010
@@ -329,7 +329,7 @@ void FirewireDevice::SetLastChannel(const uint channel)
void FirewireDevice::ProcessPATPacket(const TSPacket &tspacket)
{
- if (!tspacket.TransportError() && !tspacket.ScramplingControl() &&
+ if (!tspacket.TransportError() && !tspacket.Scrambled() &&
tspacket.HasPayload() && tspacket.PayloadStart() && !tspacket.PID())
{
PESPacket pes = PESPacket::View(tspacket);
@@ -128,7 +128,7 @@ void FirewireRecorder::ProcessTSPacket(const TSPacket &tspacket)
if (tspacket.TransportError())
return;
- if (tspacket.ScramplingControl())
+ if (tspacket.Scrambled())
return;
if (tspacket.HasAdaptationField())
@@ -211,7 +211,7 @@ void IPTVRecorder::ProcessTSPacket(const TSPacket& tspacket)
if (!_stream_data)
return;
- if (tspacket.TransportError() || tspacket.ScramplingControl())
+ if (tspacket.TransportError() || tspacket.Scrambled())
return;
if (tspacket.HasAdaptationField())
@@ -891,7 +891,7 @@ void MPEGStreamData::HandleTSTables(const TSPacket* tspacket)
if (!psip->IsCurrent()) // we don't cache the next table, for now
DONE_WITH_PES_PACKET();
- if (tspacket->ScramplingControl())
+ if (tspacket->Scrambled())
{ // scrambled! ATSC, DVB require tables not to be scrambled
VERBOSE(VB_RECORD,
"PSIP packet is scrambled, not ATSC/DVB compiant");
@@ -975,7 +975,7 @@ bool MPEGStreamData::ProcessTSPacket(const TSPacket& tspacket)
if (!ok)
return false;
- if (!tspacket.ScramplingControl() && tspacket.HasPayload())
+ if (!tspacket.Scrambled() && tspacket.HasPayload())
{
if (IsVideoPID(tspacket.PID()))
{
@@ -1004,7 +1004,7 @@ bool MPEGStreamData::ProcessTSPacket(const TSPacket& tspacket)
HandleTSTables(&tspacket);
}
}
- else if (!tspacket.ScramplingControl() && IsWritingPID(tspacket.PID()))
+ else if (!tspacket.Scrambled() && IsWritingPID(tspacket.PID()))
{
// PCRPID and other streams we're writing may not have payload...
for (uint j = 0; j < _ts_writing_listeners.size(); j++)
@@ -1728,7 +1728,7 @@ void MPEGStreamData::ProcessEncryptedPacket(const TSPacket& tspacket)
CryptStatus status = kEncUnknown;
- if (tspacket.ScramplingControl())
+ if (tspacket.Scrambled())
{
info.decrypted_packets = 0;
@@ -39,7 +39,7 @@ QString TSPacket::toString() const {
str.append(" payloadStart: %1\n").arg( PayloadStart() );
str.append(" priority: %1\n").arg( Priority() );
str.append(" pid: %1\n").arg( PID() );
- str.append(" scrampled: %1\n").arg( ScramplingControl() );
+ str.append(" scrambled (if>1): %1\n").arg( ScramblingControl() );
str.append(" adaptationFieldControl: %1\n").arg( AdaptationFieldControl() );
str.append(" continuityCounter: %1\n").arg( ContinuityCounter() );
return str;
@@ -67,7 +67,7 @@ class TSHeader {
return ((_tsdata[1] << 8) + _tsdata[2]) & 0x1fff;
}
//3.0 2 bit transport_scrambling_control (00,01 OK; 10,11 scrambled)
- unsigned int ScramplingControl() const { return (_tsdata[3] >> 6) & 0x3; }
+ unsigned int ScramblingControl() const { return (_tsdata[3] >> 6) & 0x3; }
//3.2 2 bit adaptation_field_control
// (01-no adaptation field,payload only
// 10-adaptation field only,no payload
@@ -82,7 +82,7 @@ class TSHeader {
unsigned int ContinuityCounter() const { return _tsdata[3] & 0xf; }
// shortcuts
- bool Scrampled() const { return bool(_tsdata[3]&0x80); }
+ bool Scrambled() const { return bool(_tsdata[3]&0x80); }
bool HasAdaptationField() const { return bool(_tsdata[3] & 0x20); }
bool HasPayload() const { return bool(_tsdata[3] & 0x10); }

0 comments on commit 0f42d32

Please sign in to comment.