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