mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed resetting the receiver for EMM pids for CAMs that need to receive the TS (cont'd)
This commit is contained in:
parent
34c79fdc50
commit
35f73199d4
9
ci.c
9
ci.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: ci.c 3.14 2015/01/09 09:41:20 kls Exp $
|
* $Id: ci.c 3.15 2015/01/12 10:44:58 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ci.h"
|
#include "ci.h"
|
||||||
@ -123,7 +123,7 @@ public:
|
|||||||
virtual ~cCaPidReceiver() { Detach(); }
|
virtual ~cCaPidReceiver() { Detach(); }
|
||||||
virtual void Receive(uchar *Data, int Length);
|
virtual void Receive(uchar *Data, int Length);
|
||||||
bool HasCaPids(void) { return NumPids() - emmPids.Size() - 1 > 0; }
|
bool HasCaPids(void) { return NumPids() - emmPids.Size() - 1 > 0; }
|
||||||
void Reset(void) { DelEmmPids(); }
|
void Reset(void) { DelEmmPids(); catVersion = -1; }
|
||||||
};
|
};
|
||||||
|
|
||||||
cCaPidReceiver::cCaPidReceiver(void)
|
cCaPidReceiver::cCaPidReceiver(void)
|
||||||
@ -163,6 +163,9 @@ void cCaPidReceiver::Receive(uchar *Data, int Length)
|
|||||||
if (v != catVersion) {
|
if (v != catVersion) {
|
||||||
if (Data[11] == 0 && Data[12] == 0) { // section number, last section number
|
if (Data[11] == 0 && Data[12] == 0) { // section number, last section number
|
||||||
if (l <= TS_SIZE - 8) {
|
if (l <= TS_SIZE - 8) {
|
||||||
|
cDevice *AttachedDevice = Device();
|
||||||
|
if (AttachedDevice)
|
||||||
|
AttachedDevice->Detach(this);
|
||||||
DelEmmPids();
|
DelEmmPids();
|
||||||
for (int i = 13; i < l + 8 - 4; i++) { // +8 = header, -4 = checksum
|
for (int i = 13; i < l + 8 - 4; i++) { // +8 = header, -4 = checksum
|
||||||
if (Data[i] == 0x09) {
|
if (Data[i] == 0x09) {
|
||||||
@ -179,6 +182,8 @@ void cCaPidReceiver::Receive(uchar *Data, int Length)
|
|||||||
i += Data[i + 1] - 1; // -1 to compensate for the loop increment
|
i += Data[i + 1] - 1; // -1 to compensate for the loop increment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (AttachedDevice)
|
||||||
|
AttachedDevice->AttachReceiver(this);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
dsyslog("multi packet CAT section - unhandled!");
|
dsyslog("multi packet CAT section - unhandled!");
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: receiver.h 3.1 2014/01/01 11:45:09 kls Exp $
|
* $Id: receiver.h 3.2 2015/01/12 10:24:20 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __RECEIVER_H
|
#ifndef __RECEIVER_H
|
||||||
@ -24,6 +24,7 @@ private:
|
|||||||
int numPids;
|
int numPids;
|
||||||
bool WantsPid(int Pid);
|
bool WantsPid(int Pid);
|
||||||
protected:
|
protected:
|
||||||
|
cDevice *Device(void) { return device; }
|
||||||
void Detach(void);
|
void Detach(void);
|
||||||
virtual void Activate(bool On) {}
|
virtual void Activate(bool On) {}
|
||||||
///< This function is called just before the cReceiver gets attached to
|
///< This function is called just before the cReceiver gets attached to
|
||||||
|
Loading…
x
Reference in New Issue
Block a user