mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-17 02:13:35 +02:00
Remove globals and use new zapit class members
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1698 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 6c6c2e9b29
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2011-09-18 (Sun, 18 Sep 2011)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -51,12 +51,12 @@
|
||||
#include <gui/widget/stringinput.h>
|
||||
|
||||
extern CBouquetList * bouquetList;
|
||||
extern t_channel_id live_channel_id;
|
||||
|
||||
#include <zapit/client/zapitclient.h> /* CZapitClient::Utf8_to_Latin1 */
|
||||
#include <driver/screen_max.h>
|
||||
|
||||
#include <zapit/client/zapittools.h>
|
||||
#include <zapit/zapit.h>
|
||||
|
||||
#include <algorithm>
|
||||
extern CPictureViewer * g_PicViewer;
|
||||
@@ -936,7 +936,7 @@ int CEventListHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*
|
||||
channelList = CNeutrinoApp::getInstance()->channelList;
|
||||
//e->exec(channelList->getActiveChannel_ChannelID(), channelList->getActiveChannelName()); // UTF-8
|
||||
//e->exec(g_Zapit->getCurrentServiceID(), channelList->getActiveChannelName()); // UTF-8
|
||||
e->exec(live_channel_id, channelList->getActiveChannelName()); // UTF-8
|
||||
e->exec(CZapit::getInstance()->GetCurrentChannelID(), channelList->getActiveChannelName()); // UTF-8
|
||||
delete e;
|
||||
|
||||
return res;
|
||||
|
@@ -46,7 +46,6 @@
|
||||
#include <gui/bouquetlist.h>
|
||||
|
||||
extern CBouquetList * bouquetList; /* neutrino.cpp */
|
||||
extern t_channel_id live_channel_id;
|
||||
extern CBouquetManager *g_bouquetManager;
|
||||
//
|
||||
// -- Add current channel to Favorites-Bouquet
|
||||
@@ -88,8 +87,7 @@ int CFavorites::addChannelToFavorites(bool show_list)
|
||||
}
|
||||
}
|
||||
|
||||
//channel_id = g_Zapit->getCurrentServiceID();
|
||||
channel_id = live_channel_id;
|
||||
channel_id = CZapit::getInstance()->GetCurrentChannelID();;
|
||||
|
||||
if(!g_bouquetManager->existsChannelInBouquet(bouquet_id, channel_id)) {
|
||||
CZapit::getInstance()->addChannelToBouquet(bouquet_id, channel_id);
|
||||
|
@@ -60,6 +60,7 @@
|
||||
|
||||
#include <zapit/satconfig.h>
|
||||
#include <zapit/frontend_c.h>
|
||||
#include <zapit/zapit.h>
|
||||
#include <video.h>
|
||||
|
||||
void sectionsd_getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventList &eList, char search = 0, std::string search_text = "");
|
||||
@@ -69,8 +70,6 @@ extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */
|
||||
extern CBouquetList * bouquetList; /* neutrino.cpp */
|
||||
extern CPictureViewer * g_PicViewer;
|
||||
extern cVideo * videoDecoder;
|
||||
extern t_channel_id live_channel_id; //zapit
|
||||
extern t_channel_id rec_channel_id; //zapit
|
||||
|
||||
#define COL_INFOBAR_BUTTONS (COL_INFOBAR_SHADOW + 1)
|
||||
#define COL_INFOBAR_BUTTONS_BACKGROUND (COL_INFOBAR_SHADOW_PLUS_1)
|
||||
@@ -131,7 +130,7 @@ void CInfoViewer::Init()
|
||||
/* we need to calculate this only once */
|
||||
info_time_width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getRenderWidth("22:22") + 10;
|
||||
|
||||
channel_id = live_channel_id;
|
||||
channel_id = CZapit::getInstance()->GetCurrentChannelID();;
|
||||
lcdUpdateTimer = 0;
|
||||
|
||||
int dummy_h;
|
||||
|
@@ -76,6 +76,7 @@
|
||||
|
||||
#include <video.h>
|
||||
#include "libtuxtxt/teletext.h"
|
||||
#include <zapit/zapit.h>
|
||||
|
||||
|
||||
//int dvbsub_start(int pid);//???
|
||||
@@ -85,7 +86,6 @@
|
||||
extern cVideo * videoDecoder;
|
||||
extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */
|
||||
extern CInfoClock *InfoClock;
|
||||
extern t_channel_id live_channel_id;
|
||||
|
||||
#define MINUTEOFFSET 117*262072
|
||||
#define MP_TS_SIZE 262072 // ~0.5 sec
|
||||
@@ -485,6 +485,7 @@ void CMoviePlayerGui::PlayFile(void)
|
||||
CVCRControl::getInstance()->GetPids(&g_vpid, &g_vtype, &CAPIDSelectExec::g_currentapid, &CAPIDSelectExec::g_currentac3, &g_numpida, CAPIDSelectExec::g_apids, CAPIDSelectExec::g_ac3flags);
|
||||
p_movie_info = CVCRControl::getInstance()->GetMovieInfo();
|
||||
#endif
|
||||
t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID();
|
||||
p_movie_info = CRecordManager::getInstance()->GetMovieInfo(live_channel_id);
|
||||
rec_filename = CRecordManager::getInstance()->GetFileName(live_channel_id) + ".ts";
|
||||
fillPids(p_movie_info);
|
||||
|
@@ -82,7 +82,6 @@ CScanTs::CScanTs()
|
||||
snrscale = new CProgressBar(true, BAR_WIDTH, BAR_HEIGHT);
|
||||
}
|
||||
|
||||
extern int scan_pids;
|
||||
extern int scan_fta_flag;//in zapit descriptors definiert
|
||||
extern int start_fast_scan(int scan_mode, int opid);
|
||||
#include <zapit/getservices.h>
|
||||
@@ -177,7 +176,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
||||
|
||||
CZapitClient::ScanSatelliteList satList;
|
||||
CZapitClient::commandSetScanSatelliteList sat;
|
||||
int _scan_pids = scan_pids;
|
||||
int _scan_pids = CZapit::getInstance()->scanPids();
|
||||
|
||||
hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
|
||||
mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight();
|
||||
@@ -211,7 +210,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
||||
//printf("[neutrino] scan_mode %d TP_freq %s TP_rate %s TP_fec %d TP_pol %d\n", scansettings.scan_mode, scansettings.TP_freq, scansettings.TP_rate, scansettings.TP_fec, scansettings.TP_pol);
|
||||
|
||||
if(manual) {
|
||||
scan_pids = true;
|
||||
CZapit::getInstance()->scanPids(true);
|
||||
TP.scan_mode = scansettings.scan_mode;
|
||||
TP.feparams.frequency = atoi(scansettings.TP_freq);
|
||||
if(g_info.delivery_system == DVB_S) {
|
||||
@@ -344,7 +343,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
||||
|
||||
hide();
|
||||
|
||||
scan_pids = _scan_pids;
|
||||
CZapit::getInstance()->scanPids(_scan_pids);
|
||||
videoDecoder->StopPicture();
|
||||
frameBuffer->Clear();
|
||||
g_Sectionsd->setPauseScanning(false);
|
||||
|
@@ -56,13 +56,10 @@
|
||||
#include <zapit/fastscan.h>
|
||||
#include <zapit/zapit.h>
|
||||
|
||||
extern int scan_pids;
|
||||
extern CZapitChannel *g_current_channel;
|
||||
extern std::map<transponder_id_t, transponder> select_transponders;
|
||||
extern Zapit_config zapitCfg;
|
||||
extern char zapit_lat[20];
|
||||
extern char zapit_long[20];
|
||||
extern int scan_pids;
|
||||
|
||||
static int all_usals = 1;
|
||||
sat_iterator_t sit;
|
||||
@@ -734,7 +731,7 @@ int CScanSetup::addListFlagsItems(CMenuWidget *listflags_menu, const int &shortc
|
||||
|
||||
CMenuOptionChooser *useNit = new CMenuOptionChooser(LOCALE_SATSETUP_USE_NIT, (int *)&scansettings.scan_mode, OPTIONS_OFF1_ON0_OPTIONS, OPTIONS_OFF1_ON0_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++));
|
||||
CMenuOptionChooser *ftaFlag = new CMenuOptionChooser(LOCALE_SATSETUP_USE_FTA_FLAG, (int *)&scansettings.scan_fta_flag, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF1_ON0_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++));
|
||||
CMenuOptionChooser *scanPid = new CMenuOptionChooser(LOCALE_EXTRA_ZAPIT_SCANPIDS, &scan_pids, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++));
|
||||
CMenuOptionChooser *scanPid = new CMenuOptionChooser(LOCALE_EXTRA_ZAPIT_SCANPIDS, &zapitCfg.scanPids, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++));
|
||||
|
||||
listflags_menu->addItem(useNit);
|
||||
listflags_menu->addItem(ftaFlag);
|
||||
@@ -827,9 +824,10 @@ int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*/
|
||||
break;
|
||||
}
|
||||
|
||||
if(!old_selected && g_current_channel && g_current_channel->getSatellitePosition() == position)
|
||||
CZapitChannel * channel = CZapit::getInstance()->GetCurrentChannel();
|
||||
if(!old_selected && channel && channel->getSatellitePosition() == position)
|
||||
{
|
||||
if(g_current_channel->getFreqId() == GET_FREQ_FROM_TPID(tI->first))
|
||||
if(channel->getFreqId() == GET_FREQ_FROM_TPID(tI->first))
|
||||
old_selected = i;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user