mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
zapit/src/capmt.cpp: allocate demuxes in constructor
This commit is contained in:
@@ -39,17 +39,14 @@
|
||||
#define DEMUX_SOURCE_2 2
|
||||
|
||||
#define LIVE_DEMUX 0
|
||||
#define STREAM_DEMUX 1
|
||||
#define RECORD_DEMUX 2
|
||||
#define PIP_DEMUX 3
|
||||
|
||||
|
||||
class CCam : public CBasicClient
|
||||
{
|
||||
private:
|
||||
virtual unsigned char getVersion(void) const;
|
||||
virtual const char *getSocketName(void) const;
|
||||
int camask, demuxes[MAX_DMX_UNITS];
|
||||
int camask;
|
||||
int *demuxes;
|
||||
int source_demux;
|
||||
uint8_t cabuf[2048];
|
||||
int calen;
|
||||
@@ -65,7 +62,7 @@ class CCam : public CBasicClient
|
||||
CAPMT_UPDATE = 0x05
|
||||
};
|
||||
CCam();
|
||||
virtual ~CCam() {};
|
||||
virtual ~CCam();
|
||||
bool sendMessage(const char * const data, const size_t length, bool update = false);
|
||||
bool makeCaPmt(CZapitChannel * channel, bool add_private, uint8_t list = CAPMT_ONLY, const CaIdVector &caids = CaIdVector());
|
||||
bool setCaPmt(bool update = false);
|
||||
|
@@ -39,12 +39,18 @@
|
||||
CCam::CCam()
|
||||
{
|
||||
camask = 0;
|
||||
demuxes = new int[MAX_DMX_UNITS];
|
||||
for(int i = 0; i < MAX_DMX_UNITS; i++)
|
||||
demuxes[i] = 0;
|
||||
source_demux = -1;
|
||||
calen = 0;
|
||||
}
|
||||
|
||||
CCam::~CCam()
|
||||
{
|
||||
delete []demuxes;
|
||||
}
|
||||
|
||||
unsigned char CCam::getVersion(void) const
|
||||
{
|
||||
return 0x9F;
|
||||
@@ -227,12 +233,6 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start
|
||||
source = channel->getRecordDemux();
|
||||
demux = channel->getRecordDemux();
|
||||
break;
|
||||
#if 0
|
||||
case STREAM:
|
||||
source = DEMUX_SOURCE_0;
|
||||
demux = STREAM_DEMUX;
|
||||
break;
|
||||
#endif
|
||||
case PIP:
|
||||
source = channel->getRecordDemux();
|
||||
demux = channel->getPipDemux();
|
||||
|
Reference in New Issue
Block a user