mirror of
https://github.com/rofafor/vdr-plugin-satip.git
synced 2023-10-10 13:37:42 +02:00
Merge commit '72a5ad34fb05ebd985465f998ad8d36a341c8ed6' into datathread
Conflicts: tuner.c tuner.h
This commit is contained in:
commit
bf9969f23a
12
tuner.c
12
tuner.c
@ -398,14 +398,14 @@ bool cSatipTuner::SetPid(int pidP, int typeP, bool onP)
|
||||
cMutexLock MutexLock(&mutexM);
|
||||
|
||||
if (onP) {
|
||||
pidsM.AppendUnique(pidP);
|
||||
addPidsM.AppendUnique(pidP);
|
||||
delPidsM.RemoveElement(pidP);
|
||||
pidsM.AddPid(pidP);
|
||||
addPidsM.AddPid(pidP);
|
||||
delPidsM.RemovePid(pidP);
|
||||
}
|
||||
else {
|
||||
pidsM.RemoveElement(pidP);
|
||||
delPidsM.AppendUnique(pidP);
|
||||
addPidsM.RemoveElement(pidP);
|
||||
pidsM.RemovePid(pidP);
|
||||
delPidsM.AddPid(pidP);
|
||||
addPidsM.RemovePid(pidP);
|
||||
}
|
||||
|
||||
pidUpdateCacheM.Set(ePidUpdateIntervalMs);
|
||||
|
32
tuner.h
32
tuner.h
@ -17,6 +17,32 @@
|
||||
#include "socket.h"
|
||||
#include "data.h"
|
||||
|
||||
class cSatipPid : public cVector<int> {
|
||||
private:
|
||||
int PidIndex(const int &pidP)
|
||||
{
|
||||
for (int i = 0; i < this->Size(); ++i) {
|
||||
if (pidP == this->At(i))
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public:
|
||||
void RemovePid(const int &pidP)
|
||||
{
|
||||
int i = PidIndex(pidP);
|
||||
if (i >= 0)
|
||||
this->Remove(i);
|
||||
}
|
||||
|
||||
void AddPid(int pidP)
|
||||
{
|
||||
if (PidIndex(pidP) < 0)
|
||||
this->Append(pidP);
|
||||
}
|
||||
};
|
||||
|
||||
class cSatipTuner : public cThread, public cSatipTunerStatistics {
|
||||
private:
|
||||
enum {
|
||||
@ -58,9 +84,9 @@ private:
|
||||
int signalStrengthM;
|
||||
int signalQualityM;
|
||||
int streamIdM;
|
||||
cSatipVector<int> addPidsM;
|
||||
cSatipVector<int> delPidsM;
|
||||
cSatipVector<int> pidsM;
|
||||
cSatipPid addPidsM;
|
||||
cSatipPid delPidsM;
|
||||
cSatipPid pidsM;
|
||||
|
||||
bool Connect(void);
|
||||
bool Disconnect(void);
|
||||
|
Loading…
Reference in New Issue
Block a user