mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
Remove extern frontend
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1568 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 53f4be8a27
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2011-07-21 (Thu, 21 Jul 2011)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -59,14 +59,12 @@
|
||||
#include <gui/bouquetlist.h>
|
||||
#include <daemonc/remotecontrol.h>
|
||||
#include <zapit/client/zapittools.h>
|
||||
#include <driver/vcrcontrol.h>
|
||||
#include <gui/pictureviewer.h>
|
||||
#include <zapit/bouquets.h>
|
||||
#include <zapit/satconfig.h>
|
||||
#include <zapit/getservices.h>
|
||||
#include <zapit/frontend_c.h>
|
||||
|
||||
extern CFrontend * frontend;
|
||||
extern CBouquetList * bouquetList; /* neutrino.cpp */
|
||||
extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */
|
||||
extern SMSKeyInput * c_SMSKeyInput;
|
||||
@@ -543,7 +541,6 @@ int CChannelList::show()
|
||||
if (fadeValue >= 100) {
|
||||
fadeValue = g_settings.menu_Content_alpha;
|
||||
g_RCInput->killTimer (fadeTimer);
|
||||
fadeTimer = 0;
|
||||
loop = false;
|
||||
} else
|
||||
frameBuffer->setBlendLevel(fadeValue, fadeValue);
|
||||
@@ -552,7 +549,6 @@ int CChannelList::show()
|
||||
if (fadeValue <= g_settings.menu_Content_alpha) {
|
||||
fadeValue = g_settings.menu_Content_alpha;
|
||||
g_RCInput->killTimer (fadeTimer);
|
||||
fadeTimer = 0;
|
||||
fadeIn = false;
|
||||
//frameBuffer->setBlendLevel(FADE_RESET, g_settings.gtx_alpha2);
|
||||
frameBuffer->setBlendMode(1); // Set back to per pixel alpha
|
||||
@@ -572,7 +568,6 @@ int CChannelList::show()
|
||||
|
||||
if ( fadeIn ) {
|
||||
g_RCInput->killTimer(fadeTimer);
|
||||
fadeTimer = 0;
|
||||
fadeIn = false;
|
||||
}
|
||||
if ((!fadeOut) && g_settings.widget_fade) {
|
||||
@@ -877,7 +872,6 @@ int CChannelList::show()
|
||||
hide();
|
||||
if ( fadeIn || fadeOut ) {
|
||||
g_RCInput->killTimer(fadeTimer);
|
||||
fadeTimer = 0;
|
||||
//frameBuffer->setBlendLevel(FADE_RESET, g_settings.gtx_alpha2);
|
||||
frameBuffer->setBlendMode(1); // Set back to per pixel alpha
|
||||
}
|
||||
@@ -1629,13 +1623,13 @@ void CChannelList::paintDetails(int index)
|
||||
|
||||
if(tpI != transponders.end()) {
|
||||
char * f, *s, *m;
|
||||
switch(frontend->getInfo()->type) {
|
||||
switch(CFrontend::getInstance()->getInfo()->type) {
|
||||
case FE_QPSK:
|
||||
frontend->getDelSys(tpI->second.feparams.u.qpsk.fec_inner, dvbs_get_modulation(tpI->second.feparams.u.qpsk.fec_inner), f, s, m);
|
||||
CFrontend::getInstance()->getDelSys(tpI->second.feparams.u.qpsk.fec_inner, dvbs_get_modulation(tpI->second.feparams.u.qpsk.fec_inner), f, s, m);
|
||||
len += snprintf(&buf[len], sizeof(buf) - len, "%c %d %s %s %s ", tpI->second.polarization ? 'V' : 'H', tpI->second.feparams.u.qpsk.symbol_rate/1000, f, s, m);
|
||||
break;
|
||||
case FE_QAM:
|
||||
frontend->getDelSys(tpI->second.feparams.u.qam.fec_inner, tpI->second.feparams.u.qam.modulation, f, s, m);
|
||||
CFrontend::getInstance()->getDelSys(tpI->second.feparams.u.qam.fec_inner, tpI->second.feparams.u.qam.modulation, f, s, m);
|
||||
len += snprintf(&buf[len], sizeof(buf) - len, "%d %s %s %s ", tpI->second.feparams.u.qam.symbol_rate/1000, f, s, m);
|
||||
break;
|
||||
case FE_OFDM:
|
||||
|
@@ -46,8 +46,6 @@
|
||||
#include <zapit/satconfig.h>
|
||||
#include <zapit/frontend_c.h>
|
||||
|
||||
extern CFrontend * frontend;
|
||||
|
||||
static int g_sig;
|
||||
static int g_snr;
|
||||
static int last_snr = 0;
|
||||
@@ -416,7 +414,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
||||
}
|
||||
|
||||
hide();
|
||||
frontend->setTsidOnid(0);
|
||||
CFrontend::getInstance()->setTsidOnid(0);
|
||||
|
||||
return menu_return::RETURN_REPAINT;
|
||||
}
|
||||
@@ -703,8 +701,8 @@ void CMotorControl::showSNR()
|
||||
|
||||
int sw;
|
||||
|
||||
ssig = frontend->getSignalStrength();
|
||||
ssnr = frontend->getSignalNoiseRatio();
|
||||
ssig = CFrontend::getInstance()->getSignalStrength();
|
||||
ssnr = CFrontend::getInstance()->getSignalNoiseRatio();
|
||||
|
||||
snr = (ssnr & 0xFFFF) * 100 / 65535;
|
||||
sig = (ssig & 0xFFFF) * 100 / 65535;
|
||||
|
@@ -60,7 +60,6 @@
|
||||
#include <zapit/frontend_c.h>
|
||||
#include <video.h>
|
||||
extern cVideo * videoDecoder;
|
||||
extern CFrontend * frontend;
|
||||
|
||||
#define NEUTRINO_SCAN_START_SCRIPT CONFIGDIR "/scan.start"
|
||||
#define NEUTRINO_SCAN_STOP_SCRIPT CONFIGDIR "/scan.stop"
|
||||
@@ -147,11 +146,11 @@ void CScanTs::testFunc()
|
||||
int w = x + width - xpos2;
|
||||
char buffer[128];
|
||||
char * f, *s, *m;
|
||||
if(frontend->getInfo()->type == FE_QPSK) {
|
||||
frontend->getDelSys(TP.feparams.u.qpsk.fec_inner, dvbs_get_modulation((fe_code_rate_t)TP.feparams.u.qpsk.fec_inner), f, s, m);
|
||||
if(CFrontend::getInstance()->getInfo()->type == FE_QPSK) {
|
||||
CFrontend::getInstance()->getDelSys(TP.feparams.u.qpsk.fec_inner, dvbs_get_modulation((fe_code_rate_t)TP.feparams.u.qpsk.fec_inner), f, s, m);
|
||||
snprintf(buffer,sizeof(buffer), "%u %c %d %s %s %s", TP.feparams.frequency/1000, TP.polarization == 0 ? 'H' : 'V', TP.feparams.u.qpsk.symbol_rate/1000, f, s, m);
|
||||
} else if(frontend->getInfo()->type == FE_QAM) {
|
||||
frontend->getDelSys(scansettings.TP_fec, scansettings.TP_mod, f, s, m);
|
||||
} else if(CFrontend::getInstance()->getInfo()->type == FE_QAM) {
|
||||
CFrontend::getInstance()->getDelSys(scansettings.TP_fec, scansettings.TP_mod, f, s, m);
|
||||
snprintf(buffer,sizeof(buffer), "%u %d %s %s %s", atoi(scansettings.TP_freq)/1000, atoi(scansettings.TP_rate)/1000, f, s, m);
|
||||
}
|
||||
paintLine(xpos2, ypos_cur_satellite, w - 95, scansettings.satNameNoDiseqc);
|
||||
@@ -267,7 +266,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
||||
/* send scantype to zapit */
|
||||
g_Zapit->setScanType((CZapitClient::scanType) scansettings.scanType );
|
||||
|
||||
tuned = frontend->getStatus();
|
||||
tuned = CFrontend::getInstance()->getStatus();
|
||||
paint(test);
|
||||
/* go */
|
||||
if(test) {
|
||||
@@ -391,7 +390,7 @@ int CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data)
|
||||
int fec = (data >> 8) & 0xFF;
|
||||
int rate = data >> 16;
|
||||
char * f, *s, *m;
|
||||
frontend->getDelSys(fec, (fe_modulation_t)0, f, s, m); // FIXME
|
||||
CFrontend::getInstance()->getDelSys(fec, (fe_modulation_t)0, f, s, m); // FIXME
|
||||
snprintf(buffer,sizeof(buffer), " %c %d %s %s %s", pol == 0 ? 'H' : 'V', rate, f, s, m);
|
||||
//(pol == 0) ? sprintf(buffer, "-H") : sprintf(buffer, "-V");
|
||||
paintLine(xpos2 + xpos_frequency, ypos_frequency, w - xpos_frequency - (7*fw), buffer);
|
||||
@@ -450,8 +449,8 @@ void CScanTs::paintRadar(void)
|
||||
{
|
||||
char filename[30];
|
||||
|
||||
if(tuned != frontend->getStatus()) {
|
||||
tuned = frontend->getStatus();
|
||||
if(tuned != CFrontend::getInstance()->getStatus()) {
|
||||
tuned = CFrontend::getInstance()->getStatus();
|
||||
frameBuffer->loadPal(tuned ? "radar.pal" : "radar_red.pal", 18, 38);
|
||||
}
|
||||
|
||||
@@ -555,8 +554,8 @@ void CScanTs::showSNR ()
|
||||
int posx, posy;
|
||||
int sw;
|
||||
|
||||
ssig = frontend->getSignalStrength();
|
||||
ssnr = frontend->getSignalNoiseRatio();
|
||||
ssig = CFrontend::getInstance()->getSignalStrength();
|
||||
ssnr = CFrontend::getInstance()->getSignalNoiseRatio();
|
||||
snr = (ssnr & 0xFFFF) * 100 / 65535;
|
||||
sig = (ssig & 0xFFFF) * 100 / 65535;
|
||||
|
||||
|
@@ -54,8 +54,6 @@
|
||||
#include <zapit/satconfig.h>
|
||||
#include <zapit/fastscan.h>
|
||||
|
||||
|
||||
extern CFrontend * frontend;
|
||||
extern int scan_pids;
|
||||
extern CZapitChannel *g_current_channel;
|
||||
extern std::map<transponder_id_t, transponder> select_transponders;
|
||||
@@ -349,7 +347,7 @@ void CScanSetup::showScanMenu()
|
||||
//bouquet generate mode
|
||||
settings->addItem(new CMenuOptionChooser(LOCALE_SCANTS_BOUQUET, (int *)&scansettings.bouquetMode, SCANTS_BOUQUET_OPTIONS, SCANTS_BOUQUET_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++), "", true));
|
||||
|
||||
//t_satellite_position currentSatellitePosition = frontend->getCurrentSatellitePosition();
|
||||
//t_satellite_position currentSatellitePosition = CFrontend::getInstance()->getCurrentSatellitePosition();
|
||||
//sat/provider selector
|
||||
satSelect = new CMenuOptionStringChooser(satprov_locale, scansettings.satNameNoDiseqc, true, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED, true);
|
||||
satSetup = new CMenuWidget(satprov_locale, NEUTRINO_ICON_SETTINGS, width);
|
||||
@@ -647,7 +645,6 @@ void CScanSetup::addScanMenuAutoScanAll(CMenuWidget *auto_ScanAll)
|
||||
|
||||
for (sit = satellitePositions.begin(); sit != satellitePositions.end(); sit++)
|
||||
{
|
||||
/* printf("Adding sat menu for %s position %d\n", sit->second.name.c_str(), sit->first); */
|
||||
satSelect->addOption(sit->second.name.c_str());
|
||||
if (strcmp(scansettings.satNameNoDiseqc,sit->second.name.c_str()) == 0)
|
||||
sfound = 1;
|
||||
@@ -814,14 +811,14 @@ int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/
|
||||
char buf[128];
|
||||
sprintf(cnt, "%d", i);
|
||||
char * f, *s, *m;
|
||||
switch (frontend->getInfo()->type)
|
||||
switch (CFrontend::getInstance()->getInfo()->type)
|
||||
{
|
||||
case FE_QPSK:
|
||||
frontend->getDelSys(tI->second.feparams.u.qpsk.fec_inner, dvbs_get_modulation(tI->second.feparams.u.qpsk.fec_inner), f, s, m);
|
||||
CFrontend::getInstance()->getDelSys(tI->second.feparams.u.qpsk.fec_inner, dvbs_get_modulation(tI->second.feparams.u.qpsk.fec_inner), f, s, m);
|
||||
snprintf(buf, sizeof(buf), "%d %c %d %s %s %s ", tI->second.feparams.frequency/1000, tI->second.polarization ? 'V' : 'H', tI->second.feparams.u.qpsk.symbol_rate/1000, f, s, m);
|
||||
break;
|
||||
case FE_QAM:
|
||||
frontend->getDelSys(tI->second.feparams.u.qam.fec_inner, tI->second.feparams.u.qam.modulation, f, s, m);
|
||||
CFrontend::getInstance()->getDelSys(tI->second.feparams.u.qam.fec_inner, tI->second.feparams.u.qam.modulation, f, s, m);
|
||||
snprintf(buf, sizeof(buf), "%d %d %s %s %s ", tI->second.feparams.frequency/1000, tI->second.feparams.u.qam.symbol_rate/1000, f, s, m);
|
||||
break;
|
||||
case FE_OFDM:
|
||||
@@ -868,7 +865,7 @@ int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/
|
||||
|
||||
sprintf(scansettings.TP_freq, "%d", tmpI->second.feparams.frequency);
|
||||
|
||||
switch (frontend->getInfo()->type)
|
||||
switch (CFrontend::getInstance()->getInfo()->type)
|
||||
{
|
||||
case FE_QPSK:
|
||||
sprintf(scansettings.TP_rate, "%d", tmpI->second.feparams.u.qpsk.symbol_rate);
|
||||
|
@@ -48,12 +48,10 @@
|
||||
#include "gui/widget/hintbox.h"
|
||||
#include "gui/scan.h"
|
||||
#include "gui/scan_setup.h"
|
||||
#include <zapit/frontend_c.h>
|
||||
|
||||
extern int cs_test_card(int unit, char * str);
|
||||
|
||||
#include <zapit/frontend_c.h>
|
||||
extern CFrontend * frontend;
|
||||
|
||||
CTestMenu::CTestMenu()
|
||||
{
|
||||
width = w_max (50, 10);
|
||||
@@ -256,7 +254,7 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
|
||||
sprintf(scansettings.TP_freq, "%d", freq);
|
||||
#if 0 // not needed ?
|
||||
switch (frontend->getInfo()->type)
|
||||
switch (CFrontend::getInstance()->getInfo()->type)
|
||||
{
|
||||
case FE_QPSK:
|
||||
sprintf(scansettings.TP_rate, "%d", tmpI->second.feparams.u.qpsk.symbol_rate);
|
||||
@@ -281,7 +279,7 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
|
||||
int freq = 12538000;
|
||||
sprintf(scansettings.TP_freq, "%d", freq);
|
||||
switch (frontend->getInfo()->type)
|
||||
switch (CFrontend::getInstance()->getInfo()->type)
|
||||
{
|
||||
case FE_QPSK:
|
||||
sprintf(scansettings.TP_rate, "%d", 41250*1000);
|
||||
@@ -322,7 +320,6 @@ void CTestMenu::showTestMenu()
|
||||
CMenuWidget * TestMenu = new CMenuWidget(rev /*"Test menu"*/);
|
||||
TestMenu->setSelected(selected);
|
||||
TestMenu->addIntroItems();
|
||||
|
||||
TestMenu->addItem(new CMenuForwarderNonLocalized("VFD", true, NULL, this, "vfd"));
|
||||
TestMenu->addItem(new CMenuForwarderNonLocalized("Network", true, NULL, this, "network"));
|
||||
TestMenu->addItem(new CMenuForwarderNonLocalized("Smartcard 1", true, NULL, this, "card0"));
|
||||
|
@@ -54,7 +54,6 @@ extern CEventServer *eventServer;
|
||||
extern diseqc_t diseqcType;
|
||||
extern int useGotoXX;
|
||||
extern int motorRotationSpeed;
|
||||
extern CFrontend *frontend;
|
||||
extern xmlDocPtr scanInputParser;
|
||||
|
||||
void SaveServices(bool tocopy);
|
||||
@@ -91,8 +90,8 @@ std::map <transponder_id_t, transponder> nittransponders;
|
||||
|
||||
bool tuneFrequency(FrontendParameters *feparams, uint8_t polarization, t_satellite_position satellitePosition)
|
||||
{
|
||||
frontend->setInput(satellitePosition, feparams->frequency, polarization);
|
||||
int ret = frontend->driveToSatellitePosition(satellitePosition, false); //true);
|
||||
CFrontend::getInstance()->setInput(satellitePosition, feparams->frequency, polarization);
|
||||
int ret = CFrontend::getInstance()->driveToSatellitePosition(satellitePosition, false); //true);
|
||||
if(ret > 0) {
|
||||
printf("[scan] waiting %d seconds for motor to turn satellite dish.\n", ret);
|
||||
eventServer->sendEvent(CZapitClient::EVT_SCAN_PROVIDER, CEventServer::INITID_ZAPIT, (void *) "moving rotor", 13);
|
||||
@@ -102,7 +101,7 @@ bool tuneFrequency(FrontendParameters *feparams, uint8_t polarization, t_satelli
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return frontend->tuneFrequency(feparams, polarization, false);
|
||||
return CFrontend::getInstance()->tuneFrequency(feparams, polarization, false);
|
||||
}
|
||||
|
||||
int add_to_scan(transponder_id_t TsidOnid, FrontendParameters *feparams, uint8_t polarity, bool fromnit = 0)
|
||||
@@ -363,7 +362,7 @@ int scan_transponder(xmlNodePtr transponder, uint8_t diseqc_pos, t_satellite_pos
|
||||
feparams.u.qam.modulation = (fe_modulation_t) xmlGetNumericAttribute(transponder, "modulation", 0);
|
||||
diseqc_pos = 0;
|
||||
}
|
||||
else if (frontend->getInfo()->type == FE_QPSK) {
|
||||
else if (CFrontend::getInstance()->getInfo()->type == FE_QPSK) {
|
||||
feparams.u.qpsk.symbol_rate = xmlGetNumericAttribute(transponder, "symbol_rate", 0);
|
||||
polarization = xmlGetNumericAttribute(transponder, "polarization", 0);
|
||||
system = xmlGetNumericAttribute(transponder, "system", 0);
|
||||
@@ -494,7 +493,7 @@ void *start_scanthread(void *scanmode)
|
||||
scanedtransponders.clear();
|
||||
nittransponders.clear();
|
||||
|
||||
cable = (frontend->getInfo()->type == FE_QAM);
|
||||
cable = (CFrontend::getInstance()->getInfo()->type == FE_QAM);
|
||||
if (cable)
|
||||
frontendType = "cable";
|
||||
else
|
||||
@@ -577,7 +576,7 @@ void *start_scanthread(void *scanmode)
|
||||
myZapitClient.reloadCurrentServices();
|
||||
} else {
|
||||
stop_scan(false);
|
||||
frontend->setTsidOnid(0);
|
||||
CFrontend::getInstance()->setTsidOnid(0);
|
||||
zapit(live_channel_id, 0);
|
||||
}
|
||||
|
||||
@@ -606,7 +605,7 @@ void * scan_transponder(void * arg)
|
||||
scantransponders.clear();
|
||||
scanedtransponders.clear();
|
||||
nittransponders.clear();
|
||||
cable = (frontend->getInfo()->type == FE_QAM);
|
||||
cable = (CFrontend::getInstance()->getInfo()->type == FE_QAM);
|
||||
|
||||
strcpy(providerName, scanProviders.size() > 0 ? scanProviders.begin()->second.c_str() : "unknown provider");
|
||||
|
||||
@@ -657,7 +656,7 @@ void * scan_transponder(void * arg)
|
||||
myZapitClient.reloadCurrentServices();
|
||||
} else {
|
||||
stop_scan(false);
|
||||
frontend->setTsidOnid(0);
|
||||
CFrontend::getInstance()->setTsidOnid(0);
|
||||
zapit(live_channel_id, 0);
|
||||
}
|
||||
scantransponders.clear();
|
||||
|
@@ -140,7 +140,6 @@ int nvod_service_ids(
|
||||
return -1;
|
||||
}
|
||||
|
||||
extern CFrontend *frontend;
|
||||
int parse_sdt(
|
||||
t_transport_stream_id *p_transport_stream_id,
|
||||
t_original_network_id *p_original_network_id,
|
||||
@@ -177,7 +176,7 @@ int parse_sdt(
|
||||
|
||||
int flen;
|
||||
bool cable_hack_done = false;
|
||||
bool cable = (frontend->getInfo()->type == FE_QAM);
|
||||
bool cable = (CFrontend::getInstance()->getInfo()->type == FE_QAM);
|
||||
#if 1
|
||||
flen = 5;
|
||||
memset(filter, 0x00, DMX_FILTER_SIZE);
|
||||
|
Reference in New Issue
Block a user