use autodetect pip

Origin commit data
------------------
Commit: 7c76af8a9d
Author: TangoCash <eric@loxat.de>
Date: 2021-05-29 (Sat, 29 May 2021)
This commit is contained in:
TangoCash
2021-05-29 21:16:57 +02:00
committed by vanhofen
parent d020dd36ee
commit 6d7d1ed37f
4 changed files with 48 additions and 22 deletions

View File

@@ -3415,7 +3415,7 @@ void CNeutrinoApp::RealRun()
CRecordManager::getInstance()->StartTimeshift();
}
#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) && g_info.hw_caps->can_pip) {
int boxmode = getBoxMode();
if (boxmode > -1 && boxmode != 12)
ShowMsg(LOCALE_MESSAGEBOX_ERROR, LOCALE_BOXMODE12_NOT_ACTIVATED, CMsgBox::mbrOk, CMsgBox::mbOk, NEUTRINO_ICON_ERROR);
@@ -3429,7 +3429,7 @@ void CNeutrinoApp::RealRun()
}
}
#if !HAVE_CST_HARDWARE && !HAVE_GENERIC_HARDWARE
else if ((msg == (neutrino_msg_t) g_settings.key_pip_close_avinput) && ((g_info.hw_caps->has_SCART_input) || (g_info.hw_caps->has_HDMI_input))) {
else if ((msg == (neutrino_msg_t) g_settings.key_pip_close_avinput) && ((g_info.hw_caps->has_SCART_input) || (g_info.hw_caps->has_HDMI_input)) && g_info.hw_caps->can_pip) {
int boxmode = getBoxMode();
if (boxmode > -1 && boxmode != 12)
ShowMsg(LOCALE_MESSAGEBOX_ERROR, LOCALE_BOXMODE12_NOT_ACTIVATED, CMsgBox::mbrOk, CMsgBox::mbOk, NEUTRINO_ICON_ERROR);
@@ -3445,11 +3445,11 @@ void CNeutrinoApp::RealRun()
}
}
#endif
else if (msg == (neutrino_msg_t) g_settings.key_pip_setup) {
else if ((msg == (neutrino_msg_t) g_settings.key_pip_setup) && g_info.hw_caps->can_pip) {
CPipSetup pipsetup;
pipsetup.exec(NULL, "");
}
else if (msg == (neutrino_msg_t) g_settings.key_pip_swap) {
else if ((msg == (neutrino_msg_t) g_settings.key_pip_swap) && g_info.hw_caps->can_pip) {
t_channel_id pip_channel_id = CZapit::getInstance()->GetPipChannelID();
t_channel_id live_channel_id = CZapit::getInstance()->GetCurrentChannelID();
if (pip_channel_id && (pip_channel_id != live_channel_id)) {
@@ -4819,7 +4819,8 @@ void CNeutrinoApp::tvMode( bool rezap )
}
#ifdef ENABLE_PIP
pipDecoder->Pig(g_settings.pip_x, g_settings.pip_y,
if (g_info.hw_caps->can_pip)
pipDecoder->Pig(g_settings.pip_x, g_settings.pip_y,
g_settings.pip_width, g_settings.pip_height,
frameBuffer->getScreenWidth(true), frameBuffer->getScreenHeight(true));
#endif
@@ -5100,7 +5101,8 @@ void CNeutrinoApp::radioMode( bool rezap)
}
#ifdef ENABLE_PIP
pipDecoder->Pig(g_settings.pip_radio_x, g_settings.pip_radio_y,
if (g_info.hw_caps->can_pip)
pipDecoder->Pig(g_settings.pip_radio_x, g_settings.pip_radio_y,
g_settings.pip_radio_width, g_settings.pip_radio_height,
frameBuffer->getScreenWidth(true), frameBuffer->getScreenHeight(true));
#endif
@@ -5166,6 +5168,8 @@ void CNeutrinoApp::switchTvRadioMode(const int prev_mode)
#ifdef ENABLE_PIP
#if !HAVE_CST_HARDWARE && !HAVE_GENERIC_HARDWARE
void CNeutrinoApp::StartAVInputPiP() {
if (!g_info.hw_caps->can_pip) return;
if (!pipDemux) {
pipDemux = new cDemux(1);
pipDemux->Open(DMX_PIP_CHANNEL);
@@ -5184,6 +5188,8 @@ void CNeutrinoApp::StartAVInputPiP() {
}
void CNeutrinoApp::StopAVInputPiP() {
if (!g_info.hw_caps->can_pip) return;
pipDecoder->ShowPig(0);
pipDemux->Stop();
pipDecoder->Stop();
@@ -5972,10 +5978,15 @@ void CNeutrinoApp::getAnnounceEpgName(CTimerd::RecordingInfo * eventinfo, std::s
bool CNeutrinoApp::StartPip(const t_channel_id channel_id)
{
bool ret = false;
if (!g_info.hw_caps->can_pip) return ret;
CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(channel_id);
if (!channel)
return ret;
if (!g_info.hw_caps->can_pip)
return ret;
if (channel->getRecordDemux() == channel->getPipDemux())
CStreamManager::getInstance()->StopStream(channel_id);