mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
neutrino: fix parts of parental PIN handling
* don't send EVT_PROGRAMLOCKSTATUS whenever zap is finished, but only after EPG (or NOEPG event) has been received * for foreign zap event (pzapit...) check if channel is locked. git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1262 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -125,8 +125,10 @@ int CRemoteControl::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data
|
|||||||
zap_completion_timeout = 0;
|
zap_completion_timeout = 0;
|
||||||
g_InfoViewer->chanready = 1;
|
g_InfoViewer->chanready = 1;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
if ((!is_video_started) && (g_settings.parentallock_prompt != PARENTALLOCK_PROMPT_NEVER))
|
if ((!is_video_started) && (g_settings.parentallock_prompt != PARENTALLOCK_PROMPT_NEVER))
|
||||||
g_RCInput->postMsg( NeutrinoMessages::EVT_PROGRAMLOCKSTATUS, 0x100, false );
|
g_RCInput->postMsg( NeutrinoMessages::EVT_PROGRAMLOCKSTATUS, 0x100, false );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((msg == NeutrinoMessages::EVT_ZAP_COMPLETE) || (msg == NeutrinoMessages::EVT_ZAP_FAILED ) ||
|
if ((msg == NeutrinoMessages::EVT_ZAP_COMPLETE) || (msg == NeutrinoMessages::EVT_ZAP_FAILED ) ||
|
||||||
@@ -138,12 +140,14 @@ int CRemoteControl::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data
|
|||||||
if ((*(t_channel_id *)data) != current_channel_id) {
|
if ((*(t_channel_id *)data) != current_channel_id) {
|
||||||
t_channel_id new_id = *(t_channel_id *)data;
|
t_channel_id new_id = *(t_channel_id *)data;
|
||||||
tallchans_iterator cit = allchans.find(new_id);
|
tallchans_iterator cit = allchans.find(new_id);
|
||||||
if ( cit != allchans.end() )
|
is_video_started = true;
|
||||||
|
if (cit != allchans.end()) {
|
||||||
current_channel_name = cit->second.getName();
|
current_channel_name = cit->second.getName();
|
||||||
|
if (cit->second.bAlwaysLocked)
|
||||||
|
stopvideo();
|
||||||
|
}
|
||||||
CVFD::getInstance()->showServicename(current_channel_name); // UTF-8
|
CVFD::getInstance()->showServicename(current_channel_name); // UTF-8
|
||||||
current_channel_id = new_id;
|
current_channel_id = new_id;
|
||||||
is_video_started= true;
|
|
||||||
|
|
||||||
current_EPGid = 0;
|
current_EPGid = 0;
|
||||||
next_EPGid = 0;
|
next_EPGid = 0;
|
||||||
@@ -163,8 +167,10 @@ int CRemoteControl::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data
|
|||||||
if ( g_InfoViewer->is_visible )
|
if ( g_InfoViewer->is_visible )
|
||||||
g_RCInput->postMsg( NeutrinoMessages::SHOW_INFOBAR , 0 );
|
g_RCInput->postMsg( NeutrinoMessages::SHOW_INFOBAR , 0 );
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
if ((!is_video_started) && (g_settings.parentallock_prompt != PARENTALLOCK_PROMPT_NEVER))
|
if ((!is_video_started) && (g_settings.parentallock_prompt != PARENTALLOCK_PROMPT_NEVER))
|
||||||
g_RCInput->postMsg( NeutrinoMessages::EVT_PROGRAMLOCKSTATUS, 0x100, false );
|
g_RCInput->postMsg( NeutrinoMessages::EVT_PROGRAMLOCKSTATUS, 0x100, false );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if ((msg == NeutrinoMessages::EVT_ZAP_SUB_COMPLETE) || (msg == NeutrinoMessages:: EVT_ZAP_SUB_FAILED )) {
|
if ((msg == NeutrinoMessages::EVT_ZAP_SUB_COMPLETE) || (msg == NeutrinoMessages:: EVT_ZAP_SUB_FAILED )) {
|
||||||
@@ -708,7 +714,11 @@ void CRemoteControl::stopvideo()
|
|||||||
if ( is_video_started )
|
if ( is_video_started )
|
||||||
{
|
{
|
||||||
is_video_started= false;
|
is_video_started= false;
|
||||||
//g_Zapit->stopPlayBack();
|
#if HAVE_TRIPLEDRAGON
|
||||||
|
/* we need stopPlayback to blank video,
|
||||||
|
lockPlayback prevents it from being inadvertently starting */
|
||||||
|
g_Zapit->stopPlayBack();
|
||||||
|
#endif
|
||||||
g_Zapit->lockPlayBack();
|
g_Zapit->lockPlayBack();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1245,6 +1245,16 @@ CSectionsdClient::CurrentNextInfo CInfoViewer::getEPG (const t_channel_id for_ch
|
|||||||
sectionsd_getCurrentNextServiceKey(for_channel_id & 0xFFFFFFFFFFFFULL, info);
|
sectionsd_getCurrentNextServiceKey(for_channel_id & 0xFFFFFFFFFFFFULL, info);
|
||||||
|
|
||||||
//printf("CInfoViewer::getEPG: old uniqueKey %llx new %llx\n", oldinfo.current_uniqueKey, info.current_uniqueKey);
|
//printf("CInfoViewer::getEPG: old uniqueKey %llx new %llx\n", oldinfo.current_uniqueKey, info.current_uniqueKey);
|
||||||
|
|
||||||
|
/* of there is no EPG, send an event so that parental lock can work */
|
||||||
|
if (info.current_uniqueKey == 0 && info.next_uniqueKey == 0) {
|
||||||
|
oldinfo = info;
|
||||||
|
t_channel_id *p = new t_channel_id;
|
||||||
|
*p = for_channel_id;
|
||||||
|
g_RCInput->postMsg (NeutrinoMessages::EVT_NOEPG_YET, (const neutrino_msg_data_t) p, false);
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
if (info.current_uniqueKey != oldinfo.current_uniqueKey || info.next_uniqueKey != oldinfo.next_uniqueKey) {
|
if (info.current_uniqueKey != oldinfo.current_uniqueKey || info.next_uniqueKey != oldinfo.next_uniqueKey) {
|
||||||
if (info.flags & (CSectionsdClient::epgflags::has_current | CSectionsdClient::epgflags::has_next)) {
|
if (info.flags & (CSectionsdClient::epgflags::has_current | CSectionsdClient::epgflags::has_next)) {
|
||||||
CSectionsdClient::CurrentNextInfo * _info = new CSectionsdClient::CurrentNextInfo;
|
CSectionsdClient::CurrentNextInfo * _info = new CSectionsdClient::CurrentNextInfo;
|
||||||
|
Reference in New Issue
Block a user