mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
Remove extern frontend, change demux
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1576 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: f677b002da
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:
@@ -46,7 +46,6 @@
|
|||||||
#include <dmx.h>
|
#include <dmx.h>
|
||||||
#include <zapit/satconfig.h>
|
#include <zapit/satconfig.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
extern CFrontend * frontend;
|
|
||||||
extern cVideo * videoDecoder;
|
extern cVideo * videoDecoder;
|
||||||
extern cAudio * audioDecoder;
|
extern cAudio * audioDecoder;
|
||||||
|
|
||||||
@@ -107,6 +106,7 @@ CStreamInfo2::CStreamInfo2 ()
|
|||||||
CStreamInfo2::~CStreamInfo2 ()
|
CStreamInfo2::~CStreamInfo2 ()
|
||||||
{
|
{
|
||||||
videoDecoder->Pig(-1, -1, -1, -1);
|
videoDecoder->Pig(-1, -1, -1, -1);
|
||||||
|
ts_close();
|
||||||
}
|
}
|
||||||
|
|
||||||
int CStreamInfo2::exec()
|
int CStreamInfo2::exec()
|
||||||
@@ -157,9 +157,9 @@ int CStreamInfo2::doSignalStrengthLoop ()
|
|||||||
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd_MS (100);
|
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd_MS (100);
|
||||||
g_RCInput->getMsgAbsoluteTimeout (&msg, &data, &timeoutEnd);
|
g_RCInput->getMsgAbsoluteTimeout (&msg, &data, &timeoutEnd);
|
||||||
|
|
||||||
ssig = frontend->getSignalStrength();
|
ssig = CFrontend::getInstance()->getSignalStrength();
|
||||||
ssnr = frontend->getSignalNoiseRatio();
|
ssnr = CFrontend::getInstance()->getSignalNoiseRatio();
|
||||||
ber = frontend->getBitErrorRate();
|
ber = CFrontend::getInstance()->getBitErrorRate();
|
||||||
|
|
||||||
signal.sig = ssig & 0xFFFF;
|
signal.sig = ssig & 0xFFFF;
|
||||||
signal.snr = ssnr & 0xFFFF;
|
signal.snr = ssnr & 0xFFFF;
|
||||||
@@ -283,7 +283,7 @@ void CStreamInfo2::paint_signal_fe_box(int _x, int _y, int w, int h)
|
|||||||
int xd = w/4;
|
int xd = w/4;
|
||||||
std::string tuner_name = g_Locale->getText(LOCALE_STREAMINFO_SIGNAL);
|
std::string tuner_name = g_Locale->getText(LOCALE_STREAMINFO_SIGNAL);
|
||||||
tuner_name += ": ";
|
tuner_name += ": ";
|
||||||
tuner_name += frontend->getInfo()->name;
|
tuner_name += CFrontend::getInstance()->getInfo()->name;
|
||||||
g_Font[font_small]->RenderString(_x, _y+iheight+15, width-10, tuner_name.c_str(), COL_INFOBAR, 0, true);
|
g_Font[font_small]->RenderString(_x, _y+iheight+15, width-10, tuner_name.c_str(), COL_INFOBAR, 0, true);
|
||||||
|
|
||||||
sigBox_x = _x;
|
sigBox_x = _x;
|
||||||
@@ -601,10 +601,10 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
|||||||
sat_iterator_t sit = satellitePositions.find(satellitePosition);
|
sat_iterator_t sit = satellitePositions.find(satellitePosition);
|
||||||
if(sit != satellitePositions.end()) {
|
if(sit != satellitePositions.end()) {
|
||||||
ypos += iheight;
|
ypos += iheight;
|
||||||
if(frontend->getInfo()->type == FE_QPSK) {
|
if(CFrontend::getInstance()->getInfo()->type == FE_QPSK) {
|
||||||
sprintf ((char *) buf, "%s:",g_Locale->getText (LOCALE_SATSETUP_SATELLITE));//swiped locale
|
sprintf ((char *) buf, "%s:",g_Locale->getText (LOCALE_SATSETUP_SATELLITE));//swiped locale
|
||||||
}
|
}
|
||||||
else if(frontend->getInfo()->type == FE_QAM) {
|
else if(CFrontend::getInstance()->getInfo()->type == FE_QAM) {
|
||||||
sprintf ((char *) buf, "%s:",g_Locale->getText (LOCALE_CHANNELLIST_PROVS));
|
sprintf ((char *) buf, "%s:",g_Locale->getText (LOCALE_CHANNELLIST_PROVS));
|
||||||
}
|
}
|
||||||
g_Font[font_info]->RenderString(xpos, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8
|
g_Font[font_info]->RenderString(xpos, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8
|
||||||
@@ -625,8 +625,8 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
|||||||
//tsfrequenz
|
//tsfrequenz
|
||||||
ypos += iheight;
|
ypos += iheight;
|
||||||
char * f=NULL, *s=NULL, *m=NULL;
|
char * f=NULL, *s=NULL, *m=NULL;
|
||||||
if(frontend->getInfo()->type == FE_QPSK) {
|
if(CFrontend::getInstance()->getInfo()->type == FE_QPSK) {
|
||||||
frontend->getDelSys((fe_code_rate_t)si.fec, dvbs_get_modulation((fe_code_rate_t)si.fec), f, s, m);
|
CFrontend::getInstance()->getDelSys((fe_code_rate_t)si.fec, dvbs_get_modulation((fe_code_rate_t)si.fec), f, s, m);
|
||||||
if (!strncmp(s,const_cast<char *>("DVB-S2"),6)){
|
if (!strncmp(s,const_cast<char *>("DVB-S2"),6)){
|
||||||
s=const_cast<char *>("S2");
|
s=const_cast<char *>("S2");
|
||||||
scaling = 27000;
|
scaling = 27000;
|
||||||
@@ -639,7 +639,7 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
|||||||
g_Font[font_info]->RenderString(xpos, ypos, box_width, "Tp. Freq.:" , COL_INFOBAR, 0, true); // UTF-8
|
g_Font[font_info]->RenderString(xpos, ypos, box_width, "Tp. Freq.:" , COL_INFOBAR, 0, true); // UTF-8
|
||||||
g_Font[font_info]->RenderString(xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8
|
g_Font[font_info]->RenderString(xpos+spaceoffset, ypos, box_width, buf, COL_INFOBAR, 0, true); // UTF-8
|
||||||
}
|
}
|
||||||
else if(frontend->getInfo()->type == FE_QAM) {
|
else if(CFrontend::getInstance()->getInfo()->type == FE_QAM) {
|
||||||
sprintf ((char *) buf, "%s",g_Locale->getText (LOCALE_SCANTS_FREQDATA));
|
sprintf ((char *) buf, "%s",g_Locale->getText (LOCALE_SCANTS_FREQDATA));
|
||||||
g_Font[font_info]->RenderString(xpos, ypos, box_width, buf , COL_INFOBAR, 0, true); // UTF-8
|
g_Font[font_info]->RenderString(xpos, ypos, box_width, buf , COL_INFOBAR, 0, true); // UTF-8
|
||||||
sprintf((char*) buf, "%d.%d MHz", si.tsfrequency/1000, si.tsfrequency%1000);
|
sprintf((char*) buf, "%d.%d MHz", si.tsfrequency/1000, si.tsfrequency%1000);
|
||||||
@@ -975,7 +975,7 @@ int CStreamInfo2::ts_setup ()
|
|||||||
if(vpid == 0 && apid == 0)
|
if(vpid == 0 && apid == 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
dmx = new cDemux(1);
|
dmx = new cDemux(0);//FIXME test
|
||||||
|
|
||||||
dmx->Open(DMX_TP_CHANNEL, NULL, 3 * 3008 * 62);
|
dmx->Open(DMX_TP_CHANNEL, NULL, 3 * 3008 * 62);
|
||||||
|
|
||||||
@@ -986,7 +986,7 @@ int CStreamInfo2::ts_setup ()
|
|||||||
} else
|
} else
|
||||||
dmx->pesFilter(apid);
|
dmx->pesFilter(apid);
|
||||||
|
|
||||||
dmx->Start();
|
dmx->Start(true);
|
||||||
|
|
||||||
gettimeofday (&first_tv, NULL);
|
gettimeofday (&first_tv, NULL);
|
||||||
last_tv.tv_sec = first_tv.tv_sec;
|
last_tv.tv_sec = first_tv.tv_sec;
|
||||||
|
Reference in New Issue
Block a user