mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
capmt: remember source demux for updates; use record demux from channel
Origin commit data
------------------
Branch: ni/coolstream
Commit: 109d74c24b
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-01-13 (Fri, 13 Jan 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -46,6 +46,7 @@ class CCam : public CBasicClient
|
|||||||
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[3];
|
int camask, demuxes[3];
|
||||||
|
int source_demux;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CCam();
|
CCam();
|
||||||
@@ -53,6 +54,7 @@ class CCam : public CBasicClient
|
|||||||
bool setCaPmt(CCaPmt * const caPmt, int _demux = 0, int _camask = 1, bool update = false);
|
bool setCaPmt(CCaPmt * const caPmt, int _demux = 0, int _camask = 1, bool update = false);
|
||||||
int getCaMask(void) { return camask; };
|
int getCaMask(void) { return camask; };
|
||||||
int makeMask(int demux, bool add);
|
int makeMask(int demux, bool add);
|
||||||
|
int getSource() { return source_demux; };
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::map<t_channel_id, CCam*> cammap_t;
|
typedef std::map<t_channel_id, CCam*> cammap_t;
|
||||||
|
@@ -33,6 +33,7 @@ CCam::CCam()
|
|||||||
{
|
{
|
||||||
camask = 0;
|
camask = 0;
|
||||||
demuxes[0] = demuxes[1] = demuxes[2] = 0;
|
demuxes[0] = demuxes[1] = demuxes[2] = 0;
|
||||||
|
source_demux = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char CCam::getVersion(void) const
|
unsigned char CCam::getVersion(void) const
|
||||||
@@ -72,6 +73,7 @@ bool CCam::sendMessage(const char * const data, const size_t length, bool update
|
|||||||
bool CCam::setCaPmt(CCaPmt * const caPmt, int _demux, int _camask, bool update)
|
bool CCam::setCaPmt(CCaPmt * const caPmt, int _demux, int _camask, bool update)
|
||||||
{
|
{
|
||||||
camask = _camask;
|
camask = _camask;
|
||||||
|
source_demux = _demux;
|
||||||
|
|
||||||
printf("CCam::setCaPmt cam %x source %d camask %d update %s\n", (int) this, _demux, camask, update ? "yes" : "no" );
|
printf("CCam::setCaPmt cam %x source %d camask %d update %s\n", (int) this, _demux, camask, update ? "yes" : "no" );
|
||||||
if(camask == 0) {
|
if(camask == 0) {
|
||||||
@@ -140,7 +142,7 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start
|
|||||||
printf("CCamManager: channel %llx not found\n", channel_id);
|
printf("CCamManager: channel %llx not found\n", channel_id);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
printf("CCam::SetMode: channel %llx [%s] mode %d %s update %d\n", channel_id, channel->getName().c_str(), mode, start ? "START" : "STOP", force_update);
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
if(channel->getCaPmt() == NULL) {
|
if(channel->getCaPmt() == NULL) {
|
||||||
printf("CCamManager: channel %llx dont have caPmt\n", channel_id);
|
printf("CCamManager: channel %llx dont have caPmt\n", channel_id);
|
||||||
@@ -148,8 +150,6 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
sat_iterator_t sit = satellitePositions.find(channel->getSatellitePosition());
|
|
||||||
|
|
||||||
cammap_iterator_t it = channel_map.find(channel_id);
|
cammap_iterator_t it = channel_map.find(channel_id);
|
||||||
if(it != channel_map.end()) {
|
if(it != channel_map.end()) {
|
||||||
cam = it->second;
|
cam = it->second;
|
||||||
@@ -167,8 +167,8 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start
|
|||||||
demux = LIVE_DEMUX;
|
demux = LIVE_DEMUX;
|
||||||
break;
|
break;
|
||||||
case RECORD:
|
case RECORD:
|
||||||
source = DEMUX_SOURCE_0;
|
source = channel->getRecordDemux(); //DEMUX_SOURCE_0;//FIXME
|
||||||
demux = RECORD_DEMUX;//FIXME
|
demux = channel->getRecordDemux(); //RECORD_DEMUX;//FIXME
|
||||||
break;
|
break;
|
||||||
case STREAM:
|
case STREAM:
|
||||||
source = DEMUX_SOURCE_0;
|
source = DEMUX_SOURCE_0;
|
||||||
@@ -182,6 +182,10 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start
|
|||||||
else
|
else
|
||||||
newmask = cam->makeMask(demux, start);
|
newmask = cam->makeMask(demux, start);
|
||||||
|
|
||||||
|
if(cam->getSource() > 0)
|
||||||
|
source = cam->getSource();
|
||||||
|
|
||||||
|
printf("CCam::SetMode: source %d old mask %d new mask %d force update %s\n", source, oldmask, newmask, force_update ? "yes" : "no");
|
||||||
if((oldmask != newmask) || force_update)
|
if((oldmask != newmask) || force_update)
|
||||||
cam->setCaPmt(channel->getCaPmt(), source, newmask, true);
|
cam->setCaPmt(channel->getCaPmt(), source, newmask, true);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user