neutrino: fix recording from standby

After the parental PIN fixes, zapit did no longer zap on leaving standby
in order to not bypass the parental PIN code. Unfortunately this broke
recording from soft standby if the channel to be recorded was the same
as the live channel before standby, since on wakeup it was not tuned.
Fix this by tuning the channel on zapit:leaveStandby(), but without
starting playback. Playback start is triggered by neutrino including the
PIN check.

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


Origin commit data
------------------
Commit: 0f43ce769b
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2011-03-20 (Sun, 20 Mar 2011)
This commit is contained in:
Stefan Seyfried
2011-03-20 10:35:37 +00:00
parent 76b98d2f10
commit 92f0727683
2 changed files with 16 additions and 11 deletions

View File

@@ -3993,12 +3993,18 @@ void CNeutrinoApp::standbyMode( bool bOnOff )
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
g_Zapit->setStandby(false); g_Zapit->setStandby(false);
if(was_record) /* the old code did:
g_Zapit->startPlayBack(); if(was_record) g_Zapit->startPlayBack()
else { unfortunately this bypasses the parental PIN code check if a record timer
channelList->setSelected(0xfffffff); /* make sure that zapTo_ChannelID will zap */ was set on a locked channel, then the box put in standby and after the
channelList->zapTo_ChannelID(live_channel_id); recording started, the box was woken up.
} The channelList->setSelected(); channelList->zapTo_ChannelID() sequence
does trigger the PIN check
If the channel is the same (as during a recording), then it will only
check PIN and not zap, so we should be fine here
*/
channelList->setSelected(0xfffffff); /* make sure that zapTo_ChannelID will zap */
channelList->zapTo_ChannelID(live_channel_id);
if(recordingstatus) was_record = 0; if(recordingstatus) was_record = 0;
videoDecoder->Standby(false); videoDecoder->Standby(false);

View File

@@ -387,7 +387,7 @@ void start_camd(bool forupdate = false)
static int pmt_update_fd = -1; static int pmt_update_fd = -1;
static bool update_pmt = true; static bool update_pmt = true;
int zapit(const t_channel_id channel_id, bool in_nvod, bool forupdate = 0, bool /*nowait*/ = 0) int zapit(const t_channel_id channel_id, bool in_nvod, bool forupdate = 0, bool startplayback = true)
{ {
bool transponder_change = false; bool transponder_change = false;
tallchans_iterator cit; tallchans_iterator cit;
@@ -592,7 +592,7 @@ printf("[zapit] saving channel, apid %x sub pid %x mode %d volume %d\n", g_curre
audioDecoder->setChannel(audio_mode); audioDecoder->setChannel(audio_mode);
} }
if (!we_playing) if (!we_playing && startplayback)
startPlayBack(g_current_channel); startPlayBack(g_current_channel);
printf("[zapit] sending capmt....\n"); printf("[zapit] sending capmt....\n");
@@ -2088,10 +2088,9 @@ void leaveStandby(void)
} }
standby = false; standby = false;
#if 0
if (g_current_channel) if (g_current_channel)
zapit(live_channel_id, current_is_nvod, false, true); /* tune channel, with stopped playback to not bypass the parental PIN check */
#endif zapit(live_channel_id, current_is_nvod, false, false);
} }
unsigned zapTo(const unsigned int bouquet, const unsigned int pchannel) unsigned zapTo(const unsigned int bouquet, const unsigned int pchannel)