mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-06 21:28:32 +02:00
zapit/src/zapit.cpp: cleanup unused code
This commit is contained in:
@@ -317,9 +317,6 @@ void CZapit::SendPMT(bool forupdate)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
CCamManager::getInstance()->Start(current_channel->getChannelID(), CCamManager::PLAY, forupdate);
|
CCamManager::getInstance()->Start(current_channel->getChannelID(), CCamManager::PLAY, forupdate);
|
||||||
int len;
|
|
||||||
unsigned char * pmt = current_channel->getRawPmt(len);
|
|
||||||
ca->SendPMT(DEMUX_SOURCE_0, pmt, len);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CZapit::SaveChannelPids(CZapitChannel* channel)
|
void CZapit::SaveChannelPids(CZapitChannel* channel)
|
||||||
@@ -397,43 +394,28 @@ audio_map_set_t * CZapit::GetSavedPids(const t_channel_id channel_id)
|
|||||||
|
|
||||||
bool CZapit::TuneChannel(CFrontend * frontend, CZapitChannel * channel, bool &transponder_change)
|
bool CZapit::TuneChannel(CFrontend * frontend, CZapitChannel * channel, bool &transponder_change)
|
||||||
{
|
{
|
||||||
//CFrontend * frontend = CFEManager::getInstance()->allocateFE(channel);
|
transponder_change = frontend->setInput(channel, current_is_nvod);
|
||||||
if(frontend == NULL) {
|
if(transponder_change && !current_is_nvod) {
|
||||||
ERROR("Cannot get frontend\n");
|
int waitForMotor = frontend->driveToSatellitePosition(channel->getSatellitePosition());
|
||||||
return false;
|
if(waitForMotor > 0) {
|
||||||
}
|
printf("[zapit] waiting %d seconds for motor to turn satellite dish.\n", waitForMotor);
|
||||||
transponder_change = false;
|
SendEvent(CZapitClient::EVT_ZAP_MOTOR, &waitForMotor, sizeof(waitForMotor));
|
||||||
#if 0
|
for(int i = 0; i < waitForMotor; i++) {
|
||||||
if (!(currentMode & RECORD_MODE))
|
sleep(1);
|
||||||
#endif
|
if(abort_zapit) {
|
||||||
{
|
abort_zapit = 0;
|
||||||
transponder_change = frontend->setInput(channel, current_is_nvod);
|
return false;
|
||||||
if(transponder_change && !current_is_nvod) {
|
|
||||||
int waitForMotor = frontend->driveToSatellitePosition(channel->getSatellitePosition());
|
|
||||||
if(waitForMotor > 0) {
|
|
||||||
printf("[zapit] waiting %d seconds for motor to turn satellite dish.\n", waitForMotor);
|
|
||||||
SendEvent(CZapitClient::EVT_ZAP_MOTOR, &waitForMotor, sizeof(waitForMotor));
|
|
||||||
for(int i = 0; i < waitForMotor; i++) {
|
|
||||||
sleep(1);
|
|
||||||
if(abort_zapit) {
|
|
||||||
abort_zapit = 0;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* if channel's transponder does not match frontend's tuned transponder ... */
|
/* if channel's transponder does not match frontend's tuned transponder ... */
|
||||||
if (transponder_change /* || current_is_nvod*/) {
|
if (transponder_change /* || current_is_nvod*/) {
|
||||||
if (frontend->tuneChannel(channel, current_is_nvod) == false) {
|
if (frontend->tuneChannel(channel, current_is_nvod) == false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
else if(!SAME_TRANSPONDER(channel->getChannelID(), live_channel_id))
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -488,7 +470,6 @@ bool CZapit::ZapIt(const t_channel_id channel_id, bool forupdate, bool startplay
|
|||||||
|
|
||||||
pmt_stop_update_filter(&pmt_update_fd);
|
pmt_stop_update_filter(&pmt_update_fd);
|
||||||
|
|
||||||
ca->SendPMT(0, (unsigned char*) "", 0, CA_SLOT_TYPE_CI);
|
|
||||||
StopPlayBack(!forupdate);
|
StopPlayBack(!forupdate);
|
||||||
|
|
||||||
if(!forupdate && current_channel)
|
if(!forupdate && current_channel)
|
||||||
@@ -679,11 +660,6 @@ void CZapit::SetRecordMode(bool enable)
|
|||||||
event = CZapitClient::EVT_RECORDMODE_ACTIVATED;
|
event = CZapitClient::EVT_RECORDMODE_ACTIVATED;
|
||||||
} else {
|
} else {
|
||||||
currentMode &= ~RECORD_MODE;
|
currentMode &= ~RECORD_MODE;
|
||||||
|
|
||||||
int demux = 2;
|
|
||||||
if(current_channel)
|
|
||||||
demux = current_channel->getRecordDemux();
|
|
||||||
ca->SendPMT(demux /*DEMUX_SOURCE_2*/, (unsigned char*) "", 0, CA_SLOT_TYPE_SMARTCARD);
|
|
||||||
event = CZapitClient::EVT_RECORDMODE_DEACTIVATED;
|
event = CZapitClient::EVT_RECORDMODE_DEACTIVATED;
|
||||||
}
|
}
|
||||||
SendEvent(event);
|
SendEvent(event);
|
||||||
@@ -1803,17 +1779,9 @@ bool CZapit::StartPlayBack(CZapitChannel *thisChannel)
|
|||||||
|
|
||||||
bool CZapit::StopPlayBack(bool send_pmt)
|
bool CZapit::StopPlayBack(bool send_pmt)
|
||||||
{
|
{
|
||||||
#if 1
|
if(send_pmt)
|
||||||
if(send_pmt) {
|
|
||||||
CCamManager::getInstance()->Stop(live_channel_id, CCamManager::PLAY);
|
CCamManager::getInstance()->Stop(live_channel_id, CCamManager::PLAY);
|
||||||
ca->SendPMT(0, (unsigned char*) "", 0, CA_SLOT_TYPE_SMARTCARD);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#if 0
|
|
||||||
if (send_pmt && !(currentMode & RECORD_MODE))
|
|
||||||
ca->SendPMT(0, (unsigned char*) "", 0, CA_SLOT_TYPE_SMARTCARD);
|
|
||||||
CCamManager::getInstance()->Stop(live_channel_id, CCamManager::PLAY);
|
|
||||||
#endif
|
|
||||||
INFO("standby %d playing %d forced %d", standby, playing, playbackStopForced);
|
INFO("standby %d playing %d forced %d", standby, playing, playbackStopForced);
|
||||||
|
|
||||||
if (!playing)
|
if (!playing)
|
||||||
|
Reference in New Issue
Block a user