mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 01:41:12 +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;
|
std::string name;
|
||||||
int have_channels;
|
int have_channels;
|
||||||
t_satellite_position position;
|
t_satellite_position position;
|
||||||
|
int input;
|
||||||
} sat_config_t;
|
} sat_config_t;
|
||||||
|
|
||||||
typedef enum diseqc_cmd_order {
|
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 void stop_scan(const bool success);
|
||||||
extern CEventServer *eventServer;
|
extern CEventServer *eventServer;
|
||||||
|
|
||||||
extern CFrontend *frontend;
|
|
||||||
extern CBouquetManager *g_bouquetManager;
|
extern CBouquetManager *g_bouquetManager;
|
||||||
extern CBouquetManager* scanBouquetManager;
|
extern CBouquetManager* scanBouquetManager;
|
||||||
extern CZapitClient::bouquetMode bouquetMode;
|
extern CZapitClient::bouquetMode bouquetMode;
|
||||||
@@ -150,7 +149,7 @@ void * start_fast_scan(void * arg)
|
|||||||
myZapitClient.reloadCurrentServices();
|
myZapitClient.reloadCurrentServices();
|
||||||
} else {
|
} else {
|
||||||
stop_scan(false);
|
stop_scan(false);
|
||||||
frontend->setTsidOnid(0);
|
CFrontend::getInstance()->setTsidOnid(0);
|
||||||
//zapit(live_channel_id, 0);
|
//zapit(live_channel_id, 0);
|
||||||
}
|
}
|
||||||
fast_services_sat.clear();
|
fast_services_sat.clear();
|
||||||
@@ -355,7 +354,7 @@ int parse_fst(unsigned short pid, fast_scan_operator_t * op)
|
|||||||
newchannel->number = num;
|
newchannel->number = num;
|
||||||
|
|
||||||
char pname[100];
|
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());
|
snprintf(pname, 100, "[%c%03d.%d] %s", satellitePosition > 0? 'E' : 'W', abs(satellitePosition)/10, abs(satellitePosition)%10, providerName.c_str());
|
||||||
else
|
else
|
||||||
snprintf(pname, 100, "%s", providerName.c_str());
|
snprintf(pname, 100, "%s", providerName.c_str());
|
||||||
|
@@ -35,7 +35,6 @@ extern transponder_list_t transponders;
|
|||||||
extern tallchans allchans;
|
extern tallchans allchans;
|
||||||
extern int scanSDT;
|
extern int scanSDT;
|
||||||
static int newfound;
|
static int newfound;
|
||||||
extern CFrontend *frontend;
|
|
||||||
|
|
||||||
satellite_map_t satellitePositions;
|
satellite_map_t satellitePositions;
|
||||||
std::map<transponder_id_t, transponder> select_transponders;
|
std::map<transponder_id_t, transponder> select_transponders;
|
||||||
@@ -315,7 +314,7 @@ int LoadMotorPositions(void)
|
|||||||
FILE *fd = NULL;
|
FILE *fd = NULL;
|
||||||
char buffer[256] = "";
|
char buffer[256] = "";
|
||||||
t_satellite_position satellitePosition;
|
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;
|
int offH = 10600, offL = 9750, sw = 11700;
|
||||||
|
|
||||||
printf("[getservices] loading motor positions...\n");
|
printf("[getservices] loading motor positions...\n");
|
||||||
@@ -323,7 +322,7 @@ int LoadMotorPositions(void)
|
|||||||
if ((fd = fopen(SATCONFIG, "r"))) {
|
if ((fd = fopen(SATCONFIG, "r"))) {
|
||||||
fgets(buffer, 255, fd);
|
fgets(buffer, 255, fd);
|
||||||
while(!feof(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;
|
satellitePosition = spos;
|
||||||
sat_iterator_t sit = satellitePositions.find(satellitePosition);
|
sat_iterator_t sit = satellitePositions.find(satellitePosition);
|
||||||
@@ -337,6 +336,7 @@ int LoadMotorPositions(void)
|
|||||||
sit->second.lnbSwitch = sw;
|
sit->second.lnbSwitch = sw;
|
||||||
sit->second.use_in_scan = inuse;
|
sit->second.use_in_scan = inuse;
|
||||||
sit->second.use_usals = usals;
|
sit->second.use_usals = usals;
|
||||||
|
sit->second.input = input;
|
||||||
}
|
}
|
||||||
fgets(buffer, 255, fd);
|
fgets(buffer, 255, fd);
|
||||||
}
|
}
|
||||||
@@ -359,11 +359,11 @@ void SaveMotorPositions()
|
|||||||
printf("[zapit] cannot open %s\n", SATCONFIG);
|
printf("[zapit] cannot open %s\n", SATCONFIG);
|
||||||
return;
|
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++) {
|
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.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));
|
fdatasync(fileno(fd));
|
||||||
fclose(fd);
|
fclose(fd);
|
||||||
@@ -382,6 +382,7 @@ void init_sat(t_satellite_position position)
|
|||||||
satellitePositions[position].lnbSwitch = 11700;
|
satellitePositions[position].lnbSwitch = 11700;
|
||||||
satellitePositions[position].use_in_scan = 0;
|
satellitePositions[position].use_in_scan = 0;
|
||||||
satellitePositions[position].use_usals = 0;
|
satellitePositions[position].use_usals = 0;
|
||||||
|
satellitePositions[position].input = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LoadServices(fe_type_t frontendType, diseqc_t /*diseqcType*/, bool only_current)
|
int LoadServices(fe_type_t frontendType, diseqc_t /*diseqcType*/, bool only_current)
|
||||||
@@ -545,7 +546,7 @@ void SaveServices(bool tocopy)
|
|||||||
#endif
|
#endif
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
switch (frontend->getInfo()->type) {
|
switch (CFrontend::getInstance()->getInfo()->type) {
|
||||||
case FE_QPSK: /* satellite */
|
case FE_QPSK: /* satellite */
|
||||||
sprintf(tpstr, "\t\t<TS id=\"%04x\" on=\"%04x\" frq=\"%u\" inv=\"%hu\" sr=\"%u\" fec=\"%hu\" pol=\"%hu\">\n",
|
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,
|
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++) {
|
for (ccI = allchans.begin(); ccI != allchans.end(); ccI++) {
|
||||||
if(ccI->second.getTransponderId() == tpid) {
|
if(ccI->second.getTransponderId() == tpid) {
|
||||||
if(!satdone) {
|
if(!satdone) {
|
||||||
switch (frontend->getInfo()->type) {
|
switch (CFrontend::getInstance()->getInfo()->type) {
|
||||||
case FE_QPSK: /* satellite */
|
case FE_QPSK: /* satellite */
|
||||||
fprintf(fd, "\t<sat name=\"%s\" position=\"%hd\" diseqc=\"%hd\" uncommited=\"%hd\">\n",
|
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);
|
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(tpdone) fprintf(fd, "\t\t</TS>\n");
|
||||||
}
|
}
|
||||||
if(satdone) {
|
if(satdone) {
|
||||||
switch (frontend->getInfo()->type) {
|
switch (CFrontend::getInstance()->getInfo()->type) {
|
||||||
case FE_QPSK:
|
case FE_QPSK:
|
||||||
fprintf(fd, "\t</sat>\n");
|
fprintf(fd, "\t</sat>\n");
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user