From 4de9f5c45cbeff411dcb8a01eec1e070c14499ca Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 16 Oct 2021 22:08:35 +0200 Subject: [PATCH] configure: depending --enable-quadpip on --enable-pip * unify ENABLE_PIP defines * simplify ENABLE_QUADPIP defines Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/866ababb79578ed8f2698670f79ef8558f0f6e45 Author: vanhofen Date: 2021-10-16 (Sat, 16 Oct 2021) Origin message was: ------------------ - configure: depending --enable-quadpip on --enable-pip * unify ENABLE_PIP defines * simplify ENABLE_QUADPIP defines ------------------ This commit was generated by Migit --- configure.ac | 3 +++ src/driver/record.cpp | 2 +- src/driver/scanepg.cpp | 8 +++---- src/driver/streamts.cpp | 2 +- src/gui/channellist.cpp | 8 +++---- src/gui/infoviewer.cpp | 2 +- src/gui/keybind_setup.cpp | 2 +- src/gui/pipsetup.cpp | 4 ++-- src/gui/scan.cpp | 2 +- src/gui/screensaver.cpp | 4 ++-- src/gui/videosettings.cpp | 14 ++++++------- src/neutrino.cpp | 42 ++++++++++++++++++------------------- src/neutrino.h | 2 +- src/neutrino_menue.cpp | 6 +++--- src/system/settings.h | 4 ++-- src/zapit/src/femanager.cpp | 2 +- src/zapit/src/zapit.cpp | 26 +++++++++++------------ 17 files changed, 68 insertions(+), 65 deletions(-) diff --git a/configure.ac b/configure.ac index 2279a7fc0..d2d311d28 100644 --- a/configure.ac +++ b/configure.ac @@ -311,6 +311,9 @@ AC_ARG_ENABLE(quadpip, AC_DEFINE(ENABLE_QUADPIP, 1, [enable quad picture in picture support])) AM_CONDITIONAL(ENABLE_QUADPIP, test "$enable_quadpip" = "yes") +AS_IF(test "$enable_pip" != "yes", + AS_IF(test "$enable_quadpip" = "yes", AC_MSG_ERROR([--enable-quadpip depends on --enable-pip]))) + AC_ARG_ENABLE(dynamicdemux, AS_HELP_STRING([--enable-dynamicdemux], [enable dynamic demux @<:@default=no@:>@]), AC_DEFINE(DYNAMIC_DEMUX, 1, [enable dynamic demux])) diff --git a/src/driver/record.cpp b/src/driver/record.cpp index 4f8d8bf36..e6d468bf5 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -1855,7 +1855,7 @@ bool CRecordManager::CutBackNeutrino(const t_channel_id channel_id, CFrontend * ret = false; #endif if(ret) { -#ifdef ENABLE_PIP +#if ENABLE_PIP /* FIXME until proper demux management */ t_channel_id pip_channel_id = CZapit::getInstance()->GetPipChannelID(); if ((pip_channel_id == channel_id) && (channel->getRecordDemux() == channel->getPipDemux())) diff --git a/src/driver/scanepg.cpp b/src/driver/scanepg.cpp index a9921dd93..c843fd99c 100644 --- a/src/driver/scanepg.cpp +++ b/src/driver/scanepg.cpp @@ -342,7 +342,7 @@ void CEpgScan::EnterStandby() void CEpgScan::Next() { bool llocked = false; -#ifdef ENABLE_PIP +#if ENABLE_PIP bool plocked = false; #endif next_chid = 0; @@ -367,7 +367,7 @@ void CEpgScan::Next() */ CFEManager::getInstance()->Lock(); CFrontend *live_fe = NULL; -#ifdef ENABLE_PIP +#if ENABLE_PIP CFrontend *pip_fe = NULL; #endif if (!standby) { @@ -377,7 +377,7 @@ void CEpgScan::Next() live_fe = CZapit::getInstance()->GetLiveFrontend(); CFEManager::getInstance()->lockFrontend(live_fe); } -#ifdef ENABLE_PIP +#if ENABLE_PIP pip_fe = CZapit::getInstance()->GetPipFrontend(); if (pip_fe /* && pip_fe != live_fe*/) { plocked = true; @@ -407,7 +407,7 @@ _repeat: if (llocked) CFEManager::getInstance()->unlockFrontend(live_fe); -#ifdef ENABLE_PIP +#if ENABLE_PIP if (plocked) CFEManager::getInstance()->unlockFrontend(pip_fe); #endif diff --git a/src/driver/streamts.cpp b/src/driver/streamts.cpp index 89ceefa11..d5835ea3f 100644 --- a/src/driver/streamts.cpp +++ b/src/driver/streamts.cpp @@ -361,7 +361,7 @@ CFrontend * CStreamManager::FindFrontend(CZapitChannel * channel) ret = zapit.zapTo_serviceID(chid) > 0; if (ret) { -#ifdef ENABLE_PIP +#if ENABLE_PIP /* FIXME until proper demux management */ t_channel_id pip_channel_id = CZapit::getInstance()->GetPipChannelID(); if ((pip_channel_id == chid) && (channel->getRecordDemux() == channel->getPipDemux())) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 56537ea7f..9abb3b592 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -922,7 +922,7 @@ int CChannelList::show() { moveChannelToBouquet(); } -#ifdef ENABLE_PIP +#if ENABLE_PIP else if (!empty && ((msg == CRCInput::RC_play) || (msg == CRCInput::RC_playpause) || (msg == (neutrino_msg_t) g_settings.key_pip_close))) { int boxmode = getBoxMode(); if (boxmode > -1 && boxmode != 12) @@ -1125,7 +1125,7 @@ bool CChannelList::checkLockStatus(neutrino_msg_data_t data, bool pip) out: if (startvideo) { if(pip) { -#ifdef ENABLE_PIP +#if ENABLE_PIP if (CNeutrinoApp::getInstance()->StartPip((*chanlist)[selected]->getChannelID())) { calcSize(); paintBody(); @@ -1921,7 +1921,7 @@ void CChannelList::paintButtonBar(bool is_current) } if (i == 5) { //manage pip button -#ifdef ENABLE_PIP +#if ENABLE_PIP if (!is_current || IS_WEBCHAN(channel_id)) #endif continue; @@ -2038,7 +2038,7 @@ void CChannelList::paintItem(int pos, const bool firstpaint) //set pip icon const char *pip_icon = NULL; -#ifdef ENABLE_PIP +#if ENABLE_PIP if ((*chanlist)[curr]->getChannelID() == CZapit::getInstance()->GetPipChannelID()) pip_icon = NEUTRINO_ICON_MARKER_PIP; #endif diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 7580c0317..94a5ea799 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1184,7 +1184,7 @@ void CInfoViewer::loop(bool show_dot) setInfobarTimeout(); continue; } else -#ifdef ENABLE_PIP +#if ENABLE_PIP if ((msg == (neutrino_msg_t) g_settings.key_pip_close) || (msg == (neutrino_msg_t) g_settings.key_pip_setup) || (msg == (neutrino_msg_t) g_settings.key_pip_swap)) { diff --git a/src/gui/keybind_setup.cpp b/src/gui/keybind_setup.cpp index 50c265261..6f9fa33af 100644 --- a/src/gui/keybind_setup.cpp +++ b/src/gui/keybind_setup.cpp @@ -458,7 +458,7 @@ void CKeybindSetup::showKeyBindSetup(CMenuWidget *bindSettings) mf->setHint("", key_settings[NKEY_SCREENSHOT].hint); bindSettings->addItem(mf); #endif -#ifdef ENABLE_PIP +#if ENABLE_PIP // pip mf = new CMenuForwarder(key_settings[NKEY_PIP_CLOSE].keydescription, true, keychooser[NKEY_PIP_CLOSE]->getKeyName(), keychooser[NKEY_PIP_CLOSE]); mf->setHint("", key_settings[NKEY_PIP_CLOSE].hint); diff --git a/src/gui/pipsetup.cpp b/src/gui/pipsetup.cpp index 8c542593e..4d188d98c 100644 --- a/src/gui/pipsetup.cpp +++ b/src/gui/pipsetup.cpp @@ -18,7 +18,7 @@ #define XMOVE 5 #define YMOVE 5 -#ifdef ENABLE_PIP +#if ENABLE_PIP extern cVideo *pipVideoDecoder[3]; @@ -216,4 +216,4 @@ void CPipSetup::paint() g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+5, y+mheight*4, mwidth, hpos, COL_MENUCONTENT_TEXT); } -#endif //#ifdef ENABLE_PIP +#endif //#if ENABLE_PIP diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index 6c19b006e..09ae5558b 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -214,7 +214,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) CRecordManager::getInstance()->StopAutoRecord(); CNeutrinoApp::getInstance()->stopPlayBack(); -#ifdef ENABLE_PIP +#if ENABLE_PIP CZapit::getInstance()->StopPip(); #endif diff --git a/src/gui/screensaver.cpp b/src/gui/screensaver.cpp index 957e199f0..a8c5c8e75 100644 --- a/src/gui/screensaver.cpp +++ b/src/gui/screensaver.cpp @@ -134,7 +134,7 @@ void CScreenSaver::Start() if (g_RadiotextWin) g_Radiotext->OnAfterDecodeLine.block(); -#ifdef ENABLE_PIP +#if ENABLE_PIP pip_channel_id[0] = CZapit::getInstance()->GetPipChannelID(); if (pip_channel_id[0]) g_Zapit->stopPip(); @@ -186,7 +186,7 @@ void CScreenSaver::Stop() scr_clock = NULL; } -#ifdef ENABLE_PIP +#if ENABLE_PIP if(pip_channel_id[0]) { CNeutrinoApp::getInstance()->StartPip(pip_channel_id[0]); pip_channel_id[0] = 0; diff --git a/src/gui/videosettings.cpp b/src/gui/videosettings.cpp index 8e2b9808d..e4557c3ec 100644 --- a/src/gui/videosettings.cpp +++ b/src/gui/videosettings.cpp @@ -68,7 +68,7 @@ #endif extern cVideo *videoDecoder; -#ifdef ENABLE_PIP +#if ENABLE_PIP extern cVideo *pipVideoDecoder[3]; #include #endif @@ -528,7 +528,7 @@ int CVideoSettings::showVideoSetup() sd->setHint("", LOCALE_MENU_HINT_VIDEO_SDOSD); videosetup->addItem(sd); #endif -#ifdef ENABLE_PIP +#if ENABLE_PIP CPipSetup pip; CMenuForwarder * pipsetup = new CMenuForwarder(LOCALE_VIDEOMENU_PIP, g_info.hw_caps->can_pip, NULL, &pip); pipsetup->setHint("", LOCALE_MENU_HINT_VIDEO_PIP); @@ -611,7 +611,7 @@ void CVideoSettings::setVideoSettings() videoDecoder->setAspectRatio(g_settings.video_Format, -1); #endif videoDecoder->setAspectRatio(g_settings.video_Format, g_settings.video_43mode); -#ifdef ENABLE_PIP +#if ENABLE_PIP if (pipVideoDecoder[0] != NULL) pipVideoDecoder[0]->setAspectRatio(g_settings.video_Format, g_settings.video_43mode); #endif @@ -625,7 +625,7 @@ void CVideoSettings::setVideoSettings() changeNotify(LOCALE_VIDEOMENU_SATURATION, NULL); changeNotify(LOCALE_VIDEOMENU_SDOSD, NULL); #endif -#ifdef ENABLE_PIP +#if ENABLE_PIP if (pipVideoDecoder[0] != NULL) pipVideoDecoder[0]->Pig(g_settings.pip_x, g_settings.pip_y, g_settings.pip_width, g_settings.pip_height, g_settings.screen_width, g_settings.screen_height); #endif @@ -689,7 +689,7 @@ bool CVideoSettings::changeNotify(const neutrino_locale_t OptionName, void * /* g_Zapit->setMode43(g_settings.video_43mode); videoDecoder->setAspectRatio(g_settings.video_Format, -1); -#ifdef ENABLE_PIP +#if ENABLE_PIP if (pipVideoDecoder[0] != NULL) pipVideoDecoder[0]->setAspectRatio(g_settings.video_Format, g_settings.video_43mode); #endif @@ -758,7 +758,7 @@ void CVideoSettings::next43Mode(void) text = videomenu_43mode_options[curmode].value; g_settings.video_43mode = videomenu_43mode_options[curmode].key; g_Zapit->setMode43(g_settings.video_43mode); -#ifdef ENABLE_PIP +#if ENABLE_PIP if (pipVideoDecoder[0] != NULL) pipVideoDecoder[0]->setAspectRatio(-1, g_settings.video_43mode); #endif @@ -786,7 +786,7 @@ void CVideoSettings::SwitchFormat() g_settings.video_Format = VIDEOMENU_VIDEOFORMAT_OPTIONS[curmode].key; videoDecoder->setAspectRatio(g_settings.video_Format, -1); -#ifdef ENABLE_PIP +#if ENABLE_PIP if (pipVideoDecoder[0] != NULL) pipVideoDecoder[0]->setAspectRatio(g_settings.video_Format, -1); #endif diff --git a/src/neutrino.cpp b/src/neutrino.cpp index c72278771..3eda37f39 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -113,10 +113,10 @@ #include "gui/infoclock.h" #include "gui/timeosd.h" #include "gui/parentallock_setup.h" -#ifdef ENABLE_PIP +#if ENABLE_PIP #include "gui/pipsetup.h" #endif -#if ENABLE_PIP && ENABLE_QUADPIP +#if ENABLE_QUADPIP #include #endif #include "gui/themes.h" @@ -198,7 +198,7 @@ void * nhttpd_main_thread(void *data); //#define DISABLE_SECTIONSD extern cVideo *videoDecoder; -#ifdef ENABLE_PIP +#if ENABLE_PIP extern cVideo *pipVideoDecoder[3]; extern cDemux *pipVideoDemux[3]; #endif @@ -287,7 +287,7 @@ CNeutrinoApp::CNeutrinoApp() channelList_painted = false; blank_screen = false; //NI -#ifdef ENABLE_PIP +#if ENABLE_PIP #if !HAVE_CST_HARDWARE && !HAVE_GENERIC_HARDWARE avinput_pip = false; #endif @@ -1158,7 +1158,7 @@ int CNeutrinoApp::loadSetup(const char *fname) g_settings.adzap_writeData = configfile.getInt32("adzap_writeData", 0); // pip -#ifdef ENABLE_PIP +#if ENABLE_PIP g_settings.pip_x = configfile.getInt32("pip_x", 50); g_settings.pip_y = configfile.getInt32("pip_y", 50); g_settings.pip_width = configfile.getInt32("pip_width", 365); @@ -1170,8 +1170,9 @@ int CNeutrinoApp::loadSetup(const char *fname) g_settings.pip_radio_height = configfile.getInt32("pip_radio_height", g_settings.pip_height); #endif -#if ENABLE_PIP && ENABLE_QUADPIP - for (unsigned int i = 0; i < 4; i++) { +#if ENABLE_QUADPIP + for (unsigned int i = 0; i < 4; i++) + { sprintf(cfg_key, "quadpip_channel_window_%d", i); g_settings.quadpip_channel_window[i] = configfile.getString(cfg_key, "-"); sprintf(cfg_key, "quadpip_channel_id_window_%d", i); @@ -2174,7 +2175,7 @@ void CNeutrinoApp::saveSetup(const char *fname) configfile.setInt32("adzap_writeData", g_settings.adzap_writeData); // pip -#ifdef ENABLE_PIP +#if ENABLE_PIP configfile.setInt32("pip_x", g_settings.pip_x); configfile.setInt32("pip_y", g_settings.pip_y); configfile.setInt32("pip_width", g_settings.pip_width); @@ -2186,8 +2187,9 @@ void CNeutrinoApp::saveSetup(const char *fname) configfile.setInt32("pip_radio_height", g_settings.pip_radio_height); #endif -#if ENABLE_PIP && ENABLE_QUADPIP - for (unsigned int i = 0; i < 4; i++) { +#if ENABLE_QUADPIP + for (unsigned int i = 0; i < 4; i++) + { std::string qp = "quadpip_channel_window_" + to_string(i); configfile.setString(qp, g_settings.quadpip_channel_window[i]); qp = "quadpip_channel_id_window_" + to_string(i); @@ -3606,7 +3608,7 @@ void CNeutrinoApp::RealRun() #endif CRecordManager::getInstance()->StartTimeshift(); } -#ifdef ENABLE_PIP +#if ENABLE_PIP else if ((msg == (neutrino_msg_t) g_settings.key_pip_close) && g_info.hw_caps->can_pip) { int boxmode = getBoxMode(); if (boxmode > -1 && boxmode != 12) @@ -3629,12 +3631,10 @@ void CNeutrinoApp::RealRun() { if (CZapit::getInstance()->GetPipChannelID()) CZapit::getInstance()->StopPip(); -#if !HAVE_GENERIC_HARDWARE if (!avinput_pip) StartAVInputPiP(); else StopAVInputPiP(); -#endif } } #endif @@ -5020,7 +5020,7 @@ void CNeutrinoApp::tvMode( bool rezap ) videoDecoder->Standby(false); } -#ifdef ENABLE_PIP +#if ENABLE_PIP if (g_info.hw_caps->can_pip) { pipVideoDecoder[0]->Pig(g_settings.pip_x, g_settings.pip_y, @@ -5130,7 +5130,7 @@ void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby ) if(mode == NeutrinoModes::mode_radio && g_Radiotext) g_Radiotext->radiotext_stop(); -#ifdef ENABLE_PIP +#if ENABLE_PIP g_Zapit->stopPip(); #endif CMoviePlayerGui::getInstance().stopPlayBack(); @@ -5306,7 +5306,7 @@ void CNeutrinoApp::radioMode( bool rezap) videoDecoder->Standby(false); } -#ifdef ENABLE_PIP +#if ENABLE_PIP if (g_info.hw_caps->can_pip) { pipVideoDecoder[0]->Pig(g_settings.pip_radio_x, g_settings.pip_radio_y, @@ -5373,7 +5373,7 @@ void CNeutrinoApp::switchTvRadioMode(const int prev_mode) } } -#ifdef ENABLE_PIP +#if ENABLE_PIP #if !HAVE_CST_HARDWARE && !HAVE_GENERIC_HARDWARE void CNeutrinoApp::StartAVInputPiP() { if (!g_info.hw_caps->can_pip) @@ -5467,7 +5467,7 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey) returnval = menu_return::RETURN_EXIT_ALL; } -#ifdef ENABLE_PIP +#if ENABLE_PIP #if !HAVE_CST_HARDWARE && !HAVE_GENERIC_HARDWARE else if (actionKey=="avinput_pip") { if (CZapit::getInstance()->GetPipChannelID()) @@ -5876,7 +5876,7 @@ void CNeutrinoApp::loadKeys(const char *fname) g_settings.key_pageup = tconfig->getInt32("key_channelList_pageup", CRCInput::RC_page_up); g_settings.key_pic_mode_active = tconfig->getInt32("key_pic_mode_active", 1); g_settings.key_pic_size_active = tconfig->getInt32("key_pic_size_active", 1); -#ifdef ENABLE_PIP +#if ENABLE_PIP g_settings.key_pip_close = tconfig->getInt32("key_pip_close", CRCInput::RC_prev); g_settings.key_pip_close_avinput = tconfig->getInt32("key_pip_close_avinput", CRCInput::RC_nokey); g_settings.key_pip_setup = tconfig->getInt32("key_pip_setup", CRCInput::RC_nokey); @@ -5979,7 +5979,7 @@ void CNeutrinoApp::saveKeys(const char *fname) tconfig->setInt32("key_next43mode", g_settings.key_next43mode); tconfig->setInt32("key_pic_mode_active", g_settings.key_pic_mode_active); tconfig->setInt32("key_pic_size_active", g_settings.key_pic_size_active); -#ifdef ENABLE_PIP +#if ENABLE_PIP tconfig->setInt32("key_pip_close", g_settings.key_pip_close); tconfig->setInt32("key_pip_close_avinput", g_settings.key_pip_close_avinput); tconfig->setInt32("key_pip_setup", g_settings.key_pip_setup); @@ -6167,7 +6167,7 @@ void CNeutrinoApp::getAnnounceEpgName(CTimerd::RecordingInfo * eventinfo, std::s name += zAddData; } -#ifdef ENABLE_PIP +#if ENABLE_PIP bool CNeutrinoApp::StartPip(const t_channel_id channel_id, int pip) { bool ret = false; diff --git a/src/neutrino.h b/src/neutrino.h index ca8f6b53e..9a7019ffe 100644 --- a/src/neutrino.h +++ b/src/neutrino.h @@ -171,7 +171,7 @@ public: void channelsInit(bool bOnly = false); int run(int argc, char **argv); -#ifdef ENABLE_PIP +#if ENABLE_PIP #if !HAVE_CST_HARDWARE && !HAVE_GENERIC_HARDWARE bool avinput_pip; void StartAVInputPiP(); diff --git a/src/neutrino_menue.cpp b/src/neutrino_menue.cpp index 49d90718a..6c894a222 100644 --- a/src/neutrino_menue.cpp +++ b/src/neutrino_menue.cpp @@ -67,7 +67,7 @@ #include "gui/sleeptimer.h" #include "gui/timerlist.h" #include "gui/update_menue.h" -#if ENABLE_PIP && ENABLE_QUADPIP +#if ENABLE_QUADPIP #include #endif #ifdef ENABLE_TESTING @@ -176,7 +176,7 @@ void CNeutrinoApp::InitMenuMain() avinputmode->setHint(NEUTRINO_ICON_HINT_AVINPUTMODE, LOCALE_MENU_HINT_AVINPUTMODE); personalize.addItem(MENU_MAIN, avinputmode, &g_settings.personalize[SNeutrinoSettings::P_MAIN_AVINPUT]); -#ifdef ENABLE_PIP +#if ENABLE_PIP CMenuForwarder *avinputmode_pip = new CMenuForwarder(LOCALE_MAINMENU_AVINPUTMODE_PIP, g_info.hw_caps->can_pip, NULL, this, "avinput_pip"); avinputmode_pip->setHint(NEUTRINO_ICON_HINT_AVINPUTMODE_PIP, LOCALE_MENU_HINT_AVINPUTMODE_PIP); personalize.addItem(MENU_MAIN, avinputmode_pip, &g_settings.personalize[SNeutrinoSettings::P_MAIN_AVINPUT_PIP]); @@ -280,7 +280,7 @@ void CNeutrinoApp::InitMenuMain() personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_CISETTINGS]); } -#if ENABLE_PIP && ENABLE_QUADPIP +#if ENABLE_QUADPIP // temp, only for testing, changed later if (g_info.hw_caps->pip_devs >= 1) { CMenuForwarder *quadpip = new CMenuForwarder(LOCALE_QUADPIP, true, NULL, new CQuadPiPSetup(), NULL, CRCInput::RC_nokey); diff --git a/src/system/settings.h b/src/system/settings.h index e348f257b..cd39f0f63 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -947,7 +947,7 @@ struct SNeutrinoSettings }; // pip -#ifdef ENABLE_PIP +#if ENABLE_PIP int pip_width; int pip_height; int pip_x; @@ -958,7 +958,7 @@ struct SNeutrinoSettings int pip_radio_y; #endif -#if ENABLE_PIP && ENABLE_QUADPIP +#if ENABLE_QUADPIP std::string quadpip_channel_window[4]; t_channel_id quadpip_channel_id_window[4]; #endif diff --git a/src/zapit/src/femanager.cpp b/src/zapit/src/femanager.cpp index 9d38f63a0..ba582ce30 100644 --- a/src/zapit/src/femanager.cpp +++ b/src/zapit/src/femanager.cpp @@ -751,7 +751,7 @@ CFrontend * CFEManager::allocateFE(CZapitChannel * channel, bool forrecord) if(femap.size() > 1) #endif cDemux::SetSource(frontend->fenumber+1, frontend->fenumber); -#ifdef ENABLE_PIP +#if ENABLE_PIP /* FIXME until proper demux management */ if (unused_demux) channel->setPipDemux(unused_demux); diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index 17936806e..d1fca1ba7 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -95,7 +95,7 @@ extern cAudio *audioDecoder; extern cDemux *audioDemux; extern cDemux *videoDemux; -#ifdef ENABLE_PIP +#if ENABLE_PIP extern cVideo *pipVideoDecoder[3]; extern cDemux *pipVideoDemux[3]; extern cAudio * pipAudioDecoder[3]; @@ -556,7 +556,7 @@ bool CZapit::ZapIt(const t_channel_id channel_id, bool forupdate, bool startplay return true; } -#ifdef ENABLE_PIP +#if ENABLE_PIP /* executed async if zap NOWAIT, race possible with record lock/allocate */ CFEManager::getInstance()->Lock(); if (pip_fe[0]) @@ -617,7 +617,7 @@ bool CZapit::ZapIt(const t_channel_id channel_id, bool forupdate, bool startplay } SendEvent(CZapitClient::EVT_TUNE_COMPLETE, &live_channel_id, sizeof(t_channel_id)); -#ifdef ENABLE_PIP +#if ENABLE_PIP if (transponder_change && (live_fe == pip_fe[0])) StopPip(); #endif @@ -681,7 +681,7 @@ bool CZapit::ZapIt(const t_channel_id channel_id, bool forupdate, bool startplay return true; } -#ifdef ENABLE_PIP +#if ENABLE_PIP bool CZapit::StopPip(int pip) { if (!g_info.hw_caps->can_pip) @@ -855,7 +855,7 @@ bool CZapit::ZapForRecord(const t_channel_id channel_id) goto again; } -#ifdef ENABLE_PIP +#if ENABLE_PIP if (transponder_change && (frontend == pip_fe[0])) StopPip(); #endif @@ -891,7 +891,7 @@ bool CZapit::ZapForEpg(const t_channel_id channel_id, bool instandby) if (!instandby) { if (!IS_WEBCHAN(live_channel_id)) CFEManager::getInstance()->lockFrontend(live_fe); -#ifdef ENABLE_PIP +#if ENABLE_PIP if (pip_fe[0] /* && pip_fe[0] != live_fe */) CFEManager::getInstance()->lockFrontend(pip_fe[0]); #endif @@ -901,7 +901,7 @@ bool CZapit::ZapForEpg(const t_channel_id channel_id, bool instandby) if (!instandby) { if (!IS_WEBCHAN(live_channel_id)) CFEManager::getInstance()->unlockFrontend(live_fe); -#ifdef ENABLE_PIP +#if ENABLE_PIP if (pip_fe[0] /* && pip_fe[0] != live_fe */) CFEManager::getInstance()->unlockFrontend(pip_fe[0]); #endif @@ -1303,7 +1303,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd) CBasicServer::receive_data(connfd, &msgZaptoServiceID, sizeof(msgZaptoServiceID)); if(msgZaptoServiceID.record) msgResponseZapComplete.zapStatus = ZapForRecord(msgZaptoServiceID.channel_id); -#ifdef ENABLE_PIP +#if ENABLE_PIP else if(msgZaptoServiceID.pip) msgResponseZapComplete.zapStatus = StartPip(msgZaptoServiceID.channel_id, msgZaptoServiceID.pip_dev); #endif @@ -1873,7 +1873,7 @@ bool CZapit::ParseCommand(CBasicMessage::Header &rmsg, int connfd) break; } -#ifdef ENABLE_PIP +#if ENABLE_PIP case CZapitMessages::CMD_STOP_PIP: for (unsigned i=0; i < (unsigned int) g_info.hw_caps->pip_devs; i++) { @@ -2485,7 +2485,7 @@ void CZapit::enterStandby(void) SaveAudioMap(); SaveVolumeMap(); StopPlayBack(true); -#ifdef ENABLE_PIP +#if ENABLE_PIP for (unsigned i=0; i < (unsigned int) g_info.hw_caps->pip_devs; i++) { StopPip(i); @@ -2621,7 +2621,7 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg) audioDecoder->SetDemux(audioDemux); audioDecoder->SetVideo(videoDecoder); -#ifdef ENABLE_PIP +#if ENABLE_PIP #if HAVE_CST_HARDWARE int dnum = 1; // FIXME? #endif @@ -2644,7 +2644,7 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg) videoDecoder->Standby(false); audioDecoder = new cAudio(audioDemux->getBuffer(), videoDecoder->GetTVEnc(), NULL /*videoDecoder->GetTVEncSD()*/); -#ifdef ENABLE_PIP +#if ENABLE_PIP if (g_info.hw_caps->can_pip) { #if HAVE_CST_HARDWARE @@ -2871,7 +2871,7 @@ void CZapit::run() delete pmtDemux; delete audioDecoder; delete audioDemux; -#ifdef ENABLE_PIP +#if ENABLE_PIP for (unsigned i=0; i < (unsigned int) g_info.hw_caps->pip_devs; i++) { StopPip(i);