More checks for recording on zap; Quick zap redirected to open current TP channel list; Hack for crash at exit for testing

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@251 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Commit: e575a81c38
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2010-02-02 (Tue, 02 Feb 2010)
This commit is contained in:
[CST] Focus
2010-02-02 13:41:10 +00:00
parent 6c7fff61ec
commit f77d735902
5 changed files with 53 additions and 18 deletions

View File

@@ -947,9 +947,10 @@ int CChannelList::numericZap(int key)
// -- quickzap "0" to last seen channel...
if (key == g_settings.key_lastchannel) {
t_channel_id channel_id = lastChList.getlast(1);
if(channel_id) {
if(channel_id && SameTP(channel_id)) {
lastChList.clear_storedelay (); // ignore store delay
zapTo_ChannelID(channel_id);
res = 0;
}
return res;
}
@@ -1099,7 +1100,10 @@ int CChannelList::numericZap(int key)
if ( doZap ) {
if(g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] == 0)
g_InfoViewer->killTitle();
zapTo( chn );
if(SameTP(chanlist[chn]->channel_id)) {
zapTo( chn );
res = 0;
}
} else {
showInfo(tuned);
g_InfoViewer->killTitle();
@@ -1206,7 +1210,8 @@ void CChannelList::virtual_zap_mode(bool up)
{
if(g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] == 0)
g_InfoViewer->killTitle();
zapTo( chn );
if(SameTP(chanlist[chn]->channel_id))
zapTo( chn );
}
else
{
@@ -1221,8 +1226,8 @@ void CChannelList::virtual_zap_mode(bool up)
void CChannelList::quickZap(int key, bool cycle)
{
if(chanlist.size() == 0)
return;
if(chanlist.size() == 0)
return;
int bsize = bouquetList->Bouquets.size();
if(!cycle && bsize > 1) {
@@ -1268,9 +1273,7 @@ printf("CChannelList::quickZap: new selected %d total %d active bouquet %d total
else if ((key==g_settings.key_quickzap_up) || (key == CRCInput::RC_right)) {
selected = (selected+1)%chanlist.size();
}
//printf("[neutrino] quick zap selected = %d bouquetList %x getActiveBouquetNumber %d orgChannelList %x\n", selected, bouquetList, bouquetList->getActiveBouquetNumber(), bouquetList->orgChannelList);
CNeutrinoApp::getInstance()->channelList->zapTo(getKey(selected)-1);
}
g_RCInput->clearRCMsg(); //FIXME test for n.103
@@ -1437,7 +1440,7 @@ void CChannelList::paintItem(int pos)
bool iscurrent = true;
unsigned int curr = liststart + pos;
if(!autoshift && CNeutrinoApp::getInstance()->recordingstatus && curr < chanlist.size()) {
if(CNeutrinoApp::getInstance()->recordingstatus && !autoshift && curr < chanlist.size()) {
iscurrent = (chanlist[curr]->channel_id >> 16) == (rec_channel_id >> 16);
//printf("recording %llx current %llx current = %s\n", rec_channel_id, chanlist[liststart + pos]->channel->channel_id, iscurrent? "yes" : "no");
}
@@ -1681,12 +1684,15 @@ int CChannelList::getSelectedChannelIndex() const
return this->selected;
}
bool CChannelList::SameTP()
bool CChannelList::SameTP(t_channel_id channel_id)
{
bool iscurrent = true;
if(!autoshift && CNeutrinoApp::getInstance()->recordingstatus )
iscurrent = (chanlist[selected]->channel_id >> 16) == (rec_channel_id >> 16);
if(channel_id == 0)
channel_id = chanlist[selected]->channel_id;
if(CNeutrinoApp::getInstance()->recordingstatus && !autoshift)
iscurrent = (channel_id >> 16) == (rec_channel_id >> 16);
return iscurrent;
}

View File

@@ -130,7 +130,7 @@ class CChannelList
void SortAlpha(void);
void SortSat(void);
void ClearList(void);
bool SameTP();
bool SameTP(t_channel_id channel_id = 0);
//friend class CZapitChannel;
};
#endif

View File

@@ -43,7 +43,7 @@
#include <fcntl.h>
#include <gui/infoviewer.h>
#include <gui/bouquetlist.h>
#include <gui/widget/icons.h>
#include <gui/widget/hintbox.h>
@@ -66,6 +66,7 @@ void sectionsd_getEventsServiceKey(t_channel_id serviceUniqueKey, CChannelEventL
void sectionsd_getCurrentNextServiceKey(t_channel_id uniqueServiceKey, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next );
extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */
extern CBouquetList * bouquetList; /* neutrino.cpp */
extern CPictureViewer * g_PicViewer;
extern CFrontend * frontend;
extern cVideo * videoDecoder;
@@ -771,8 +772,13 @@ fprintf(stderr, "after showchannellogo, mode = %d ret = %d logo_ok = %d\n",g_set
g_RCInput->killTimer (fadeTimer);
frameBuffer->setBlendLevel(g_settings.gtx_alpha1, g_settings.gtx_alpha2);
}
if (virtual_zap_mode)
CNeutrinoApp::getInstance()->channelList->virtual_zap_mode(msg == CRCInput::RC_right);
if (virtual_zap_mode) {
/* if bouquet cycle set, do virtual over current bouquet */
if(g_settings.zap_cycle && (bouquetList != NULL) && !(bouquetList->Bouquets.empty()))
bouquetList->Bouquets[bouquetList->getActiveBouquetNumber()]->channelList->virtual_zap_mode(msg == CRCInput::RC_right);
else
CNeutrinoApp::getInstance()->channelList->virtual_zap_mode(msg == CRCInput::RC_right);
}
}
aspectRatio = 0;