reload Channels after SDT scan in standby/shutdown mode

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2061 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
satbaby
2012-01-15 17:22:07 +00:00
parent 101870c27a
commit 49f0128b47
2 changed files with 28 additions and 4 deletions

View File

@@ -1550,6 +1550,7 @@ void CNeutrinoApp::InitZapper()
}
firstChannel();
lastChannelMode = g_settings.channel_mode;
SDTreloadChannels = false;
channelsInit();
if(firstchannel.mode == 't') {
@@ -2865,8 +2866,9 @@ _repeat:
return messages_return::handled;
}
else if (msg == NeutrinoMessages::EVT_SERVICES_UPD) {
ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_EXTRA_ZAPIT_SDT_CHANGED),
CMessageBox::mbrBack,CMessageBox::mbBack, NEUTRINO_ICON_INFO);
SDTreloadChannels = true;
// ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_EXTRA_ZAPIT_SDT_CHANGED),
// CMessageBox::mbrBack,CMessageBox::mbBack, NEUTRINO_ICON_INFO);
}
if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000))
delete [] (unsigned char*) data;
@@ -2889,6 +2891,11 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
}
if(do_shutdown) {
if(SDTreloadChannels){
SDT_ReloadChannels();
SDTreloadChannels = false;
}
CVFD::getInstance()->setMode(CVFD::MODE_SHUTDOWN);
delete CRecordManager::getInstance();
@@ -3321,7 +3328,10 @@ void CNeutrinoApp::standbyMode( bool bOnOff )
//g_Controld->setScartMode( 0 );
}
StopSubtitles();
if(SDTreloadChannels && !CRecordManager::getInstance()->RecordingStatus()){
SDT_ReloadChannels();
SDTreloadChannels = false;
}
frameBuffer->useBackground(false);
frameBuffer->paintBackground();
@@ -3937,3 +3947,16 @@ void CNeutrinoApp::SelectSubtitles()
}
}
}
void CNeutrinoApp::SDT_ReloadChannels()
{
g_Zapit->reinitChannels();
channelsInit();
t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID();
channelList->adjustToChannelID(live_channel_id);//FIXME what if deleted ?
if(old_b_id >= 0) {
bouquetList->activateBouquet(old_b_id, false);
old_b_id = -1;
g_RCInput->postMsg(CRCInput::RC_ok, 0);
}
}

View File

@@ -130,7 +130,7 @@ private:
// bool fromflash;
bool init_cec_setting;
int lastChannelMode;
bool SDTreloadChannels;
struct timeval standby_pressed_at;
CZapitClient::responseGetLastChannel firstchannel;
@@ -146,6 +146,7 @@ private:
COnekeyPluginChangeExec *OnekeyPluginChanger;
CIPChangeNotifier *MyIPChanger;
void SDT_ReloadChannels();
void firstChannel();
void setupNetwork( bool force= false );
void setupNFS();