-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSCDVBDevice.h
More file actions
98 lines (89 loc) · 2.3 KB
/
SCDVBDevice.h
File metadata and controls
98 lines (89 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#ifndef ___SCDVBDEVICE_H
#define ___SCDVBDEVICE_H
#include <linux/dvb/ca.h>
#include <vdr/dvbdevice.h>
#include <vdr/thread.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include "DeCsaTSBuffer.h"
#include "DeCSA.h"
#include "UDPSocket.h"
#include "CAPMT.h"
#include "SCCIAdapter.h"
class SCCAMSlot;
class UDPSocket;
class CADevice;
class SCCIAdapter;
#define DVB_DEV_SPEC adapter,frontend
class SCDVBDevice : public cDvbDevice
{
public:
int adapter;
private:
bool initialCaDscr;
DeCSA *decsa;
DeCsaTsBuffer *tsBuffer;
cMutex switchMutex;
cMutex tsMutex;
SCCIAdapter *sCCIAdapter;
int fd_dvr, fd_ca, fd_ca2;
bool softcsa, fullts;
cMutex cafdMutex;
cTimeMs lastDump;
static int budget;
bool isReady;
CAPMT *cAPMT;
//
//
/*
#define MAX_LRU_CAID 10
struct LruCaid {
int src, tr, prg;
caid_t caids[MAXCAIDS+1];
} lrucaid[MAX_LRU_CAID];
cMutex lruMutex;
*/
//
//int FindLRUPrg(int source, int transponder, int prg);
// bool GetPrgCaids(int source, int transponder, int prg, caid_t *c);
protected:
virtual void CiStartDecrypting(void);
virtual bool CiAllowConcurrent(void) const;
virtual bool SetPid(cPidHandle *Handle, int Type, bool On);
virtual bool OpenDvr(void);
virtual void CloseDvr(void);
virtual bool GetTSPacket(uchar *&Data);
public:
SCDVBDevice(int Adapter, int Frontend, int cafd);
~SCDVBDevice();
virtual bool HasCi(void);
static void Capture(void);
static bool Initialize(void);
static void Startup(void);
static void Shutdown(void);
static void SetForceBudget(int n);
static bool ForceBudget(int n);
virtual bool SetCaDescr(ca_descr_t *ca_descr);
bool SoftCSA(bool live);
void CaidsChanged(void);
void LateInit(void);
void EarlyShutdown(void);
bool ScActive(void);
static void DvbName(const char *Name, int a, int f, char *buffer, int len);
static int DvbOpen(const char *Name, int a, int f, int Mode, bool ReportError=false);
static void OnPluginLoad(void);
static void OnPluginUnload(void);
bool SetChannelDevice(const cChannel *Channel, bool LiveView);
bool Ready(void);
bool SetCaPid(ca_pid_t *ca_pid);
CAPMT *GetCAPMT();
void SetReady(bool Ready);
};
#endif // ___SCDVBDEVICE_H