mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
Remove extern frontend
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1571 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 88fee9809b
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:
@@ -15,6 +15,7 @@ typedef struct sat_config {
|
||||
std::string name;
|
||||
int have_channels;
|
||||
t_satellite_position position;
|
||||
int input;
|
||||
} sat_config_t;
|
||||
|
||||
typedef enum diseqc_cmd_order {
|
||||
|
@@ -31,7 +31,6 @@ extern bool tuneFrequency(FrontendParameters *feparams, uint8_t polarization, t_
|
||||
extern void stop_scan(const bool success);
|
||||
extern CEventServer *eventServer;
|
||||
|
||||
extern CFrontend *frontend;
|
||||
extern CBouquetManager *g_bouquetManager;
|
||||
extern CBouquetManager* scanBouquetManager;
|
||||
extern CZapitClient::bouquetMode bouquetMode;
|
||||
@@ -150,7 +149,7 @@ void * start_fast_scan(void * arg)
|
||||
myZapitClient.reloadCurrentServices();
|
||||
} else {
|
||||
stop_scan(false);
|
||||
frontend->setTsidOnid(0);
|
||||
CFrontend::getInstance()->setTsidOnid(0);
|
||||
//zapit(live_channel_id, 0);
|
||||
}
|
||||
fast_services_sat.clear();
|
||||
@@ -355,7 +354,7 @@ int parse_fst(unsigned short pid, fast_scan_operator_t * op)
|
||||
newchannel->number = num;
|
||||
|
||||
char pname[100];
|
||||
if (frontend->getInfo()->type == FE_QPSK)
|
||||
if (CFrontend::getInstance()->getInfo()->type == FE_QPSK)
|
||||
snprintf(pname, 100, "[%c%03d.%d] %s", satellitePosition > 0? 'E' : 'W', abs(satellitePosition)/10, abs(satellitePosition)%10, providerName.c_str());
|
||||
else
|
||||
snprintf(pname, 100, "%s", providerName.c_str());
|
||||
|
@@ -35,7 +35,6 @@ extern transponder_list_t transponders;
|
||||
extern tallchans allchans;
|
||||
extern int scanSDT;
|
||||
static int newfound;
|
||||
extern CFrontend *frontend;
|
||||
|
||||
satellite_map_t satellitePositions;
|
||||
std::map<transponder_id_t, transponder> select_transponders;
|
||||
@@ -315,7 +314,7 @@ int LoadMotorPositions(void)
|
||||
FILE *fd = NULL;
|
||||
char buffer[256] = "";
|
||||
t_satellite_position satellitePosition;
|
||||
int spos = 0, mpos = 0, diseqc = 0, uncom = 0, com = 0, usals = 0, inuse;
|
||||
int spos = 0, mpos = 0, diseqc = 0, uncom = 0, com = 0, usals = 0, inuse, input = 0;
|
||||
int offH = 10600, offL = 9750, sw = 11700;
|
||||
|
||||
printf("[getservices] loading motor positions...\n");
|
||||
@@ -323,7 +322,7 @@ int LoadMotorPositions(void)
|
||||
if ((fd = fopen(SATCONFIG, "r"))) {
|
||||
fgets(buffer, 255, fd);
|
||||
while(!feof(fd)) {
|
||||
sscanf(buffer, "%d %d %d %d %d %d %d %d %d %d", &spos, &mpos, &diseqc, &com, &uncom, &offL, &offH, &sw, &inuse, &usals);
|
||||
sscanf(buffer, "%d %d %d %d %d %d %d %d %d %d %d", &spos, &mpos, &diseqc, &com, &uncom, &offL, &offH, &sw, &inuse, &usals, &input);
|
||||
|
||||
satellitePosition = spos;
|
||||
sat_iterator_t sit = satellitePositions.find(satellitePosition);
|
||||
@@ -337,6 +336,7 @@ int LoadMotorPositions(void)
|
||||
sit->second.lnbSwitch = sw;
|
||||
sit->second.use_in_scan = inuse;
|
||||
sit->second.use_usals = usals;
|
||||
sit->second.input = input;
|
||||
}
|
||||
fgets(buffer, 255, fd);
|
||||
}
|
||||
@@ -359,11 +359,11 @@ void SaveMotorPositions()
|
||||
printf("[zapit] cannot open %s\n", SATCONFIG);
|
||||
return;
|
||||
}
|
||||
fprintf(fd, "# sat position, stored rotor, diseqc, commited, uncommited, low, high, switch, use in full scan, use usals\n");
|
||||
fprintf(fd, "# sat position, stored rotor, diseqc, commited, uncommited, low, high, switch, use in full scan, use usals, input\n");
|
||||
for(sit = satellitePositions.begin(); sit != satellitePositions.end(); sit++) {
|
||||
fprintf(fd, "%d %d %d %d %d %d %d %d %d %d\n", sit->first, sit->second.motor_position,
|
||||
fprintf(fd, "%d %d %d %d %d %d %d %d %d %d %d\n", sit->first, sit->second.motor_position,
|
||||
sit->second.diseqc, sit->second.commited, sit->second.uncommited, sit->second.lnbOffsetLow,
|
||||
sit->second.lnbOffsetHigh, sit->second.lnbSwitch, sit->second.use_in_scan, sit->second.use_usals);
|
||||
sit->second.lnbOffsetHigh, sit->second.lnbSwitch, sit->second.use_in_scan, sit->second.use_usals, sit->second.input);
|
||||
}
|
||||
fdatasync(fileno(fd));
|
||||
fclose(fd);
|
||||
@@ -382,6 +382,7 @@ void init_sat(t_satellite_position position)
|
||||
satellitePositions[position].lnbSwitch = 11700;
|
||||
satellitePositions[position].use_in_scan = 0;
|
||||
satellitePositions[position].use_usals = 0;
|
||||
satellitePositions[position].input = 0;
|
||||
}
|
||||
|
||||
int LoadServices(fe_type_t frontendType, diseqc_t /*diseqcType*/, bool only_current)
|
||||
@@ -545,7 +546,7 @@ void SaveServices(bool tocopy)
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
switch (frontend->getInfo()->type) {
|
||||
switch (CFrontend::getInstance()->getInfo()->type) {
|
||||
case FE_QPSK: /* satellite */
|
||||
sprintf(tpstr, "\t\t<TS id=\"%04x\" on=\"%04x\" frq=\"%u\" inv=\"%hu\" sr=\"%u\" fec=\"%hu\" pol=\"%hu\">\n",
|
||||
tI->second.transport_stream_id, tI->second.original_network_id,
|
||||
@@ -569,7 +570,7 @@ void SaveServices(bool tocopy)
|
||||
for (ccI = allchans.begin(); ccI != allchans.end(); ccI++) {
|
||||
if(ccI->second.getTransponderId() == tpid) {
|
||||
if(!satdone) {
|
||||
switch (frontend->getInfo()->type) {
|
||||
switch (CFrontend::getInstance()->getInfo()->type) {
|
||||
case FE_QPSK: /* satellite */
|
||||
fprintf(fd, "\t<sat name=\"%s\" position=\"%hd\" diseqc=\"%hd\" uncommited=\"%hd\">\n",
|
||||
spos_it->second.name.c_str(), spos_it->first, spos_it->second.diseqc, spos_it->second.uncommited);
|
||||
@@ -608,7 +609,7 @@ void SaveServices(bool tocopy)
|
||||
if(tpdone) fprintf(fd, "\t\t</TS>\n");
|
||||
}
|
||||
if(satdone) {
|
||||
switch (frontend->getInfo()->type) {
|
||||
switch (CFrontend::getInstance()->getInfo()->type) {
|
||||
case FE_QPSK:
|
||||
fprintf(fd, "\t</sat>\n");
|
||||
break;
|
||||
|
Reference in New Issue
Block a user