vdr 2.7.2
|
Public Member Functions | |
cCaPidReceiver (void) | |
virtual | ~cCaPidReceiver () |
virtual void | Receive (const uchar *Data, int Length) |
bool | HasCaPids (void) const |
void | Reset (void) |
bool | HandlingPid (void) |
![]() | |
cReceiver (const cChannel *Channel=NULL, int Priority=MINPRIORITY) | |
virtual | ~cReceiver () |
int | Priority (void) |
void | SetPriority (int Priority) |
bool | AddPid (int Pid) |
bool | AddPids (const int *Pids) |
bool | AddPids (int Pid1, int Pid2, int Pid3=0, int Pid4=0, int Pid5=0, int Pid6=0, int Pid7=0, int Pid8=0, int Pid9=0) |
bool | SetPids (const cChannel *Channel) |
void | DelPid (int Pid) |
void | DelPids (const int *Pids) |
tChannelID | ChannelID (void) |
int | NumPids (void) const |
bool | IsAttached (void) |
Private Member Functions | |
void | AddEmmPid (int Pid) |
void | DelEmmPids (void) |
Private Attributes | |
int | catVersion |
cVector< int > | emmPids |
uchar | buffer [1024] |
uchar * | bufp |
uchar | mtdCatBuffer [CAT_MAXPACKETS][TS_SIZE] |
int | mtdNumCatPackets |
int | length |
cMutex | mutex |
bool | handlingPid |
Additional Inherited Members | |
![]() | |
cDevice * | Device (void) |
void | Detach (void) |
virtual void | Activate (bool On) |
cCaPidReceiver::cCaPidReceiver | ( | void | ) |
Definition at line 148 of file ci.c.
References cReceiver::AddPid(), bufp, CATPID, catVersion, handlingPid, length, mtdNumCatPackets, and mutex.
|
inlinevirtual |
Definition at line 133 of file ci.c.
References cReceiver::Detach().
|
private |
Definition at line 161 of file ci.c.
References cReceiver::AddPid(), cVector< T >::Append(), emmPids, handlingPid, mutex, and cVector< T >::Size().
Referenced by Receive().
|
private |
Definition at line 174 of file ci.c.
References cVector< T >::Clear(), cReceiver::DelPid(), emmPids, handlingPid, mutex, and cVector< T >::Size().
bool cCaPidReceiver::HandlingPid | ( | void | ) |
The cCaPidReceiver adds/deletes PIDs to/from the base class cReceiver, which in turn does the same on the cDevice it is attached to.
The cDevice then sets the PIDs on the assigned cCamSlot, which can cause a deadlock on the cCamSlot's mutex if a cReceiver is detached from the device at the same time. Since these PIDs, however, are none that have to be decrypted, it is not necessary to set them in the CAM. Therefore this function is used in cCamSlot::SetPid() to detect this situation, and thus avoid the deadlock.
Definition at line 297 of file ci.c.
References handlingPid, and mutex.
Referenced by cCamSlot::SetPid().
|
inline |
Definition at line 135 of file ci.c.
References emmPids, cReceiver::NumPids(), and cVector< T >::Size().
|
virtual |
This function is called from the cDevice we are attached to, and delivers one TS packet from the set of PIDs the cReceiver has requested.
The data packet must be accepted immediately, and the call must return as soon as possible, without any unnecessary delay. Each TS packet will be delivered only ONCE, so the cReceiver must make sure that it will be able to buffer the data if necessary.
Implements cReceiver.
Definition at line 184 of file ci.c.
References AddEmmPid(), buffer, bufp, cDevice::CamSlot(), CATPID, catVersion, SI::CRC32::crc32(), DelEmmPids(), cReceiver::Device(), dsyslog, esyslog, length, min(), mtdCatBuffer, cMtdCamSlot::MtdMapper(), MtdMapPid(), mtdNumCatPackets, Peek13(), cMtdCamSlot::PutCat(), SI::TableIdCAT, TS_SIZE, TsPayloadStart(), and TsPid().
|
inline |
Definition at line 136 of file ci.c.
References catVersion, and DelEmmPids().
Referenced by cCamSlot::Assign().
|
private |
|
private |
Definition at line 122 of file ci.c.
Referenced by cCaPidReceiver(), and Receive().
|
private |
Definition at line 119 of file ci.c.
Referenced by cCaPidReceiver(), Receive(), and Reset().
|
private |
Definition at line 120 of file ci.c.
Referenced by AddEmmPid(), DelEmmPids(), and HasCaPids().
|
private |
Definition at line 128 of file ci.c.
Referenced by AddEmmPid(), cCaPidReceiver(), DelEmmPids(), and HandlingPid().
|
private |
Definition at line 126 of file ci.c.
Referenced by cCaPidReceiver(), and Receive().
|
private |
|
private |
Definition at line 125 of file ci.c.
Referenced by cCaPidReceiver(), and Receive().
|
private |
Definition at line 127 of file ci.c.
Referenced by AddEmmPid(), cCaPidReceiver(), DelEmmPids(), and HandlingPid().