mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 18:01:13 +02:00
neutrino.cpp: start PiP on pip_close key, add StartPip() function
This commit is contained in:
@@ -2141,7 +2141,11 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu)
|
|||||||
}
|
}
|
||||||
#ifdef ENABLE_PIP
|
#ifdef ENABLE_PIP
|
||||||
else if (msg == (neutrino_msg_t) g_settings.key_pip_close) {
|
else if (msg == (neutrino_msg_t) g_settings.key_pip_close) {
|
||||||
CZapit::getInstance()->StopPip();
|
t_channel_id pip_channel_id = CZapit::getInstance()->GetPipChannelID();
|
||||||
|
if (pip_channel_id)
|
||||||
|
g_Zapit->stopPip();
|
||||||
|
else
|
||||||
|
StartPip(CZapit::getInstance()->GetCurrentChannelID());
|
||||||
}
|
}
|
||||||
else if (msg == (neutrino_msg_t) g_settings.key_pip_setup) {
|
else if (msg == (neutrino_msg_t) g_settings.key_pip_setup) {
|
||||||
CPipSetup pipsetup;
|
CPipSetup pipsetup;
|
||||||
@@ -2150,13 +2154,10 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu)
|
|||||||
else if (msg == (neutrino_msg_t) g_settings.key_pip_swap) {
|
else if (msg == (neutrino_msg_t) g_settings.key_pip_swap) {
|
||||||
t_channel_id pip_channel_id = CZapit::getInstance()->GetPipChannelID();
|
t_channel_id pip_channel_id = CZapit::getInstance()->GetPipChannelID();
|
||||||
t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID();
|
t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID();
|
||||||
if (pip_channel_id) {
|
if (pip_channel_id && (pip_channel_id != live_channel_id)) {
|
||||||
g_Zapit->stopPip();
|
g_Zapit->stopPip();
|
||||||
channelList->zapTo_ChannelID(pip_channel_id);
|
channelList->zapTo_ChannelID(pip_channel_id);
|
||||||
if (CRecordManager::getInstance()->GetRecordMode(live_channel_id) == CRecordManager::RECMODE_OFF) {
|
StartPip(live_channel_id);
|
||||||
if (!g_Zapit->zapTo_pip(live_channel_id))
|
|
||||||
DisplayErrorMessage(g_Locale->getText(LOCALE_VIDEOMENU_PIP_ERROR));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -3872,6 +3873,25 @@ void CNeutrinoApp::getAnnounceEpgName(CTimerd::RecordingInfo * eventinfo, std::s
|
|||||||
name += zAddData;
|
name += zAddData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_PIP
|
||||||
|
bool CNeutrinoApp::StartPip(const t_channel_id channel_id)
|
||||||
|
{
|
||||||
|
bool ret = false;
|
||||||
|
CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(channel_id);
|
||||||
|
if (!channel)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
int recmode = CRecordManager::getInstance()->GetRecordMode(channel_id);
|
||||||
|
if ((channel->getRecordDemux() != channel->getPipDemux()) || (recmode == CRecordManager::RECMODE_OFF)) {
|
||||||
|
if (!g_Zapit->zapTo_pip(channel_id))
|
||||||
|
DisplayErrorMessage(g_Locale->getText(LOCALE_VIDEOMENU_PIP_ERROR));
|
||||||
|
else
|
||||||
|
ret = true;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void CNeutrinoApp::Cleanup()
|
void CNeutrinoApp::Cleanup()
|
||||||
{
|
{
|
||||||
#ifdef EXIT_CLEANUP
|
#ifdef EXIT_CLEANUP
|
||||||
|
Reference in New Issue
Block a user