mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
The pid of the PMT in which the CA descriptors of a given channel are broadcast is now stored together with the CA descriptors
This commit is contained in:
parent
bfdd611fde
commit
afc17c1168
6
HISTORY
6
HISTORY
@ -8307,7 +8307,7 @@ Video Disk Recorder Revision History
|
|||||||
- The APIVERSION has been increased to 2.0.6 due to the changes to pat.h, sdt.h and
|
- The APIVERSION has been increased to 2.0.6 due to the changes to pat.h, sdt.h and
|
||||||
the functional modification to cFont::CreateFont().
|
the functional modification to cFont::CreateFont().
|
||||||
|
|
||||||
2015-01-01: Version 2.1.7
|
2015-01-04: Version 2.1.7
|
||||||
|
|
||||||
- No longer logging an error message in DirSizeMB() if the given directory doesn't
|
- No longer logging an error message in DirSizeMB() if the given directory doesn't
|
||||||
exist. This avoids lots of log entries in case several VDRs use the same video
|
exist. This avoids lots of log entries in case several VDRs use the same video
|
||||||
@ -8323,3 +8323,7 @@ Video Disk Recorder Revision History
|
|||||||
- Updated the dvbhddevice plugin source.
|
- Updated the dvbhddevice plugin source.
|
||||||
- Fixed a bug in the Makefile when installing plugins with LCLBLD=1 (thanks to
|
- Fixed a bug in the Makefile when installing plugins with LCLBLD=1 (thanks to
|
||||||
Stefan Huelswitt).
|
Stefan Huelswitt).
|
||||||
|
- The pid of the PMT in which the CA descriptors of a given channel are broadcast
|
||||||
|
is now stored together with the CA descriptors and can be retrieved by calling
|
||||||
|
GetPmtPid() (this information is only required to receive encrypted channels
|
||||||
|
with the OctopusNet receiver via the 'satip' plugin).
|
||||||
|
27
pat.c
27
pat.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: pat.c 3.4 2014/02/19 08:57:43 kls Exp $
|
* $Id: pat.c 3.5 2015/01/04 13:14:01 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pat.h"
|
#include "pat.h"
|
||||||
@ -69,12 +69,13 @@ private:
|
|||||||
int source;
|
int source;
|
||||||
int transponder;
|
int transponder;
|
||||||
int serviceId;
|
int serviceId;
|
||||||
|
int pmtPid; // needed for OctopusNet - otherwise irrelevant!
|
||||||
int numCaIds;
|
int numCaIds;
|
||||||
int caIds[MAXCAIDS + 1];
|
int caIds[MAXCAIDS + 1];
|
||||||
cList<cCaDescriptor> caDescriptors;
|
cList<cCaDescriptor> caDescriptors;
|
||||||
void AddCaId(int CaId);
|
void AddCaId(int CaId);
|
||||||
public:
|
public:
|
||||||
cCaDescriptors(int Source, int Transponder, int ServiceId);
|
cCaDescriptors(int Source, int Transponder, int ServiceId, int PmtPid);
|
||||||
bool operator== (const cCaDescriptors &arg) const;
|
bool operator== (const cCaDescriptors &arg) const;
|
||||||
bool Is(int Source, int Transponder, int ServiceId);
|
bool Is(int Source, int Transponder, int ServiceId);
|
||||||
bool Is(cCaDescriptors * CaDescriptors);
|
bool Is(cCaDescriptors * CaDescriptors);
|
||||||
@ -82,14 +83,16 @@ public:
|
|||||||
void AddCaDescriptor(SI::CaDescriptor *d, int EsPid);
|
void AddCaDescriptor(SI::CaDescriptor *d, int EsPid);
|
||||||
int GetCaDescriptors(const int *CaSystemIds, int BufSize, uchar *Data, int EsPid);
|
int GetCaDescriptors(const int *CaSystemIds, int BufSize, uchar *Data, int EsPid);
|
||||||
int GetCaPids(const int *CaSystemIds, int BufSize, int *Pids);
|
int GetCaPids(const int *CaSystemIds, int BufSize, int *Pids);
|
||||||
|
const int GetPmtPid(void) { return pmtPid; };
|
||||||
const int *CaIds(void) { return caIds; }
|
const int *CaIds(void) { return caIds; }
|
||||||
};
|
};
|
||||||
|
|
||||||
cCaDescriptors::cCaDescriptors(int Source, int Transponder, int ServiceId)
|
cCaDescriptors::cCaDescriptors(int Source, int Transponder, int ServiceId, int PmtPid)
|
||||||
{
|
{
|
||||||
source = Source;
|
source = Source;
|
||||||
transponder = Transponder;
|
transponder = Transponder;
|
||||||
serviceId = ServiceId;
|
serviceId = ServiceId;
|
||||||
|
pmtPid = PmtPid;
|
||||||
numCaIds = 0;
|
numCaIds = 0;
|
||||||
caIds[0] = 0;
|
caIds[0] = 0;
|
||||||
}
|
}
|
||||||
@ -218,6 +221,7 @@ public:
|
|||||||
// and 2 if an existing descriptor was changed.
|
// and 2 if an existing descriptor was changed.
|
||||||
int GetCaDescriptors(int Source, int Transponder, int ServiceId, const int *CaSystemIds, int BufSize, uchar *Data, int EsPid);
|
int GetCaDescriptors(int Source, int Transponder, int ServiceId, const int *CaSystemIds, int BufSize, uchar *Data, int EsPid);
|
||||||
int GetCaPids(int Source, int Transponder, int ServiceId, const int *CaSystemIds, int BufSize, int *Pids);
|
int GetCaPids(int Source, int Transponder, int ServiceId, const int *CaSystemIds, int BufSize, int *Pids);
|
||||||
|
int GetPmtPid(int Source, int Transponder, int ServiceId);
|
||||||
};
|
};
|
||||||
|
|
||||||
int cCaDescriptorHandler::AddCaDescriptors(cCaDescriptors *CaDescriptors)
|
int cCaDescriptorHandler::AddCaDescriptors(cCaDescriptors *CaDescriptors)
|
||||||
@ -258,6 +262,16 @@ int cCaDescriptorHandler::GetCaPids(int Source, int Transponder, int ServiceId,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int cCaDescriptorHandler::GetPmtPid(int Source, int Transponder, int ServiceId)
|
||||||
|
{
|
||||||
|
cMutexLock MutexLock(&mutex);
|
||||||
|
for (cCaDescriptors *ca = First(); ca; ca = Next(ca)) {
|
||||||
|
if (ca->Is(Source, Transponder, ServiceId))
|
||||||
|
return ca->GetPmtPid();
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
cCaDescriptorHandler CaDescriptorHandler;
|
cCaDescriptorHandler CaDescriptorHandler;
|
||||||
|
|
||||||
int GetCaDescriptors(int Source, int Transponder, int ServiceId, const int *CaSystemIds, int BufSize, uchar *Data, int EsPid)
|
int GetCaDescriptors(int Source, int Transponder, int ServiceId, const int *CaSystemIds, int BufSize, uchar *Data, int EsPid)
|
||||||
@ -270,6 +284,11 @@ int GetCaPids(int Source, int Transponder, int ServiceId, const int *CaSystemIds
|
|||||||
return CaDescriptorHandler.GetCaPids(Source, Transponder, ServiceId, CaSystemIds, BufSize, Pids);
|
return CaDescriptorHandler.GetCaPids(Source, Transponder, ServiceId, CaSystemIds, BufSize, Pids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int GetPmtPid(int Source, int Transponder, int ServiceId)
|
||||||
|
{
|
||||||
|
return CaDescriptorHandler.GetPmtPid(Source, Transponder, ServiceId);
|
||||||
|
}
|
||||||
|
|
||||||
// --- cPatFilter ------------------------------------------------------------
|
// --- cPatFilter ------------------------------------------------------------
|
||||||
|
|
||||||
//#define DEBUG_PAT_PMT
|
//#define DEBUG_PAT_PMT
|
||||||
@ -384,7 +403,7 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|||||||
cChannel *Channel = Channels.GetByServiceID(Source(), Transponder(), pmt.getServiceId());
|
cChannel *Channel = Channels.GetByServiceID(Source(), Transponder(), pmt.getServiceId());
|
||||||
if (Channel) {
|
if (Channel) {
|
||||||
SI::CaDescriptor *d;
|
SI::CaDescriptor *d;
|
||||||
cCaDescriptors *CaDescriptors = new cCaDescriptors(Channel->Source(), Channel->Transponder(), Channel->Sid());
|
cCaDescriptors *CaDescriptors = new cCaDescriptors(Channel->Source(), Channel->Transponder(), Channel->Sid(), Pid);
|
||||||
// Scan the common loop:
|
// Scan the common loop:
|
||||||
for (SI::Loop::Iterator it; (d = (SI::CaDescriptor*)pmt.commonDescriptors.getNext(it, SI::CaDescriptorTag)); ) {
|
for (SI::Loop::Iterator it; (d = (SI::CaDescriptor*)pmt.commonDescriptors.getNext(it, SI::CaDescriptorTag)); ) {
|
||||||
CaDescriptors->AddCaDescriptor(d, 0);
|
CaDescriptors->AddCaDescriptor(d, 0);
|
||||||
|
5
pat.h
5
pat.h
@ -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: pat.h 3.3 2014/02/18 11:22:34 kls Exp $
|
* $Id: pat.h 3.4 2015/01/04 13:17:22 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __PAT_H
|
#ifndef __PAT_H
|
||||||
@ -56,4 +56,7 @@ int GetCaPids(int Source, int Transponder, int ServiceId, const int *CaSystemIds
|
|||||||
///< Returns the number of pids copied into Pids (0 if no CA descriptors are
|
///< Returns the number of pids copied into Pids (0 if no CA descriptors are
|
||||||
///< available), or -1 if BufSize was too small to hold all CA pids.
|
///< available), or -1 if BufSize was too small to hold all CA pids.
|
||||||
|
|
||||||
|
int GetPmtPid(int Source, int Transponder, int ServiceId);
|
||||||
|
///< Gets the Pid of the PMT in which the CA descriptors for this channel are defined.
|
||||||
|
|
||||||
#endif //__PAT_H
|
#endif //__PAT_H
|
||||||
|
Loading…
Reference in New Issue
Block a user