mirror of
https://github.com/rofafor/vdr-plugin-satip.git
synced 2023-10-10 13:37:42 +02:00
Prefer section pids.
This commit is contained in:
parent
a5d57e9390
commit
d26658a22e
2
device.c
2
device.c
@ -363,7 +363,7 @@ bool cSatipDevice::SetPid(cPidHandle *handleP, int typeP, bool onP)
|
||||
if (pTunerM && handleP && handleP->pid >= 0) {
|
||||
if (onP)
|
||||
return pTunerM->SetPid(handleP->pid, typeP, true);
|
||||
else if (!handleP->used)
|
||||
else if (!handleP->used && pSectionFilterHandlerM && !pSectionFilterHandlerM->Exists(handleP->pid))
|
||||
return pTunerM->SetPid(handleP->pid, typeP, false);
|
||||
}
|
||||
return true;
|
||||
|
@ -338,6 +338,19 @@ cString cSatipSectionFilterHandler::GetInformation(void)
|
||||
return s;
|
||||
}
|
||||
|
||||
bool cSatipSectionFilterHandler::Exists(u_short pidP)
|
||||
{
|
||||
debug16("%s (%d) [device %d]", __PRETTY_FUNCTION__, pidP, deviceIndexM);
|
||||
cMutexLock MutexLock(&mutexM);
|
||||
for (unsigned int i = 0; i < eMaxSecFilterCount; ++i) {
|
||||
if (filtersM[i] && (pidP == filtersM[i]->GetPid())) {
|
||||
debug12("%s (%d) Found [device %d]", __PRETTY_FUNCTION__, pidP, deviceIndexM);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cSatipSectionFilterHandler::Delete(unsigned int indexP)
|
||||
{
|
||||
debug16("%s (%d) [device %d]", __PRETTY_FUNCTION__, indexP, deviceIndexM);
|
||||
|
@ -80,6 +80,7 @@ public:
|
||||
cSatipSectionFilterHandler(int deviceIndexP, unsigned int bufferLenP);
|
||||
virtual ~cSatipSectionFilterHandler();
|
||||
cString GetInformation(void);
|
||||
bool Exists(u_short pidP);
|
||||
int Open(u_short pidP, u_char tidP, u_char maskP);
|
||||
void Close(int handleP);
|
||||
int GetPid(int handleP);
|
||||
|
Loading…
Reference in New Issue
Block a user