pip variables renamed

Origin commit data
------------------
Commit: d276e32778
Author: BPanther <bpanther_ts@hotmail.com>
Date: 2021-10-15 (Fri, 15 Oct 2021)
This commit is contained in:
BPanther
2021-10-15 14:55:29 +02:00
committed by vanhofen
parent dfd012a85d
commit 674070a09e
4 changed files with 85 additions and 85 deletions

View File

@@ -20,7 +20,7 @@
#ifdef ENABLE_PIP #ifdef ENABLE_PIP
extern cVideo *pipDecoder; extern cVideo *pipVideoDecoder[3];
CPipSetup::CPipSetup() CPipSetup::CPipSetup()
{ {
@@ -69,8 +69,8 @@ void CPipSetup::move(int x, int y, bool abs)
*gy = y_coord; *gy = y_coord;
printf("CPipSetup::move: x %d y %d\n", x_coord, y_coord); printf("CPipSetup::move: x %d y %d\n", x_coord, y_coord);
if (pipDecoder != NULL) if (pipVideoDecoder[0] != NULL)
pipDecoder->Pig(x_coord, y_coord, width, height, maxw, maxh); pipVideoDecoder[0]->Pig(x_coord, y_coord, width, height, maxw, maxh);
} }
// w and h is percent, if not absolute // w and h is percent, if not absolute
@@ -102,8 +102,8 @@ void CPipSetup::resize(int w, int h, bool abs)
*gh = height; *gh = height;
printf("CPipSetup::resize: w %d h %d \n", width, height); printf("CPipSetup::resize: w %d h %d \n", width, height);
if (pipDecoder != NULL) if (pipVideoDecoder[0] != NULL)
pipDecoder->Pig(x_coord, y_coord, width, height, maxw, maxh); pipVideoDecoder[0]->Pig(x_coord, y_coord, width, height, maxw, maxh);
} }
int CPipSetup::exec(CMenuTarget* parent, const std::string &) int CPipSetup::exec(CMenuTarget* parent, const std::string &)
@@ -125,8 +125,8 @@ int CPipSetup::exec(CMenuTarget* parent, const std::string &)
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU]); uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
#if !HAVE_CST_HARDWARE #if !HAVE_CST_HARDWARE
if (pipDecoder != NULL) if (pipVideoDecoder[0] != NULL)
pipDecoder->ShowPig(1); pipVideoDecoder[0]->ShowPig(1);
#endif #endif
bool loop=true; bool loop=true;
while (loop) { while (loop) {
@@ -174,8 +174,8 @@ void CPipSetup::hide()
{ {
frameBuffer->Clear(); frameBuffer->Clear();
#if !HAVE_CST_HARDWARE #if !HAVE_CST_HARDWARE
if (pipDecoder != NULL) if (pipVideoDecoder[0] != NULL)
pipDecoder->ShowPig(0); pipVideoDecoder[0]->ShowPig(0);
#endif #endif
} }
@@ -204,8 +204,8 @@ void CPipSetup::paint()
int x = (frameBuffer->getScreenWidth() - mwidth)/2; int x = (frameBuffer->getScreenWidth() - mwidth)/2;
int y = (frameBuffer->getScreenHeight() - mheight*4)/2; int y = (frameBuffer->getScreenHeight() - mheight*4)/2;
if (pipDecoder != NULL) if (pipVideoDecoder[0] != NULL)
if (pipDecoder->getBlank()) if (pipVideoDecoder[0]->getBlank())
frameBuffer->paintBoxRel(x_coord, y_coord, width, height, COL_MENUCONTENT_PLUS_0); frameBuffer->paintBoxRel(x_coord, y_coord, width, height, COL_MENUCONTENT_PLUS_0);
frameBuffer->paintBoxRel(x, y, mwidth, mheight*4, COL_MENUCONTENT_PLUS_0); frameBuffer->paintBoxRel(x, y, mwidth, mheight*4, COL_MENUCONTENT_PLUS_0);

View File

@@ -69,7 +69,7 @@
extern cVideo *videoDecoder; extern cVideo *videoDecoder;
#ifdef ENABLE_PIP #ifdef ENABLE_PIP
extern cVideo *pipDecoder; extern cVideo *pipVideoDecoder[3];
#include <gui/pipsetup.h> #include <gui/pipsetup.h>
#endif #endif
extern int prev_video_mode; extern int prev_video_mode;
@@ -612,8 +612,8 @@ void CVideoSettings::setVideoSettings()
#endif #endif
videoDecoder->setAspectRatio(g_settings.video_Format, g_settings.video_43mode); videoDecoder->setAspectRatio(g_settings.video_Format, g_settings.video_43mode);
#ifdef ENABLE_PIP #ifdef ENABLE_PIP
if (pipDecoder != NULL) if (pipVideoDecoder[0] != NULL)
pipDecoder->setAspectRatio(g_settings.video_Format, g_settings.video_43mode); pipVideoDecoder[0]->setAspectRatio(g_settings.video_Format, g_settings.video_43mode);
#endif #endif
videoDecoder->SetDBDR(g_settings.video_dbdr); videoDecoder->SetDBDR(g_settings.video_dbdr);
@@ -626,8 +626,8 @@ void CVideoSettings::setVideoSettings()
changeNotify(LOCALE_VIDEOMENU_SDOSD, NULL); changeNotify(LOCALE_VIDEOMENU_SDOSD, NULL);
#endif #endif
#ifdef ENABLE_PIP #ifdef ENABLE_PIP
if (pipDecoder != NULL) if (pipVideoDecoder[0] != NULL)
pipDecoder->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); 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 #endif
} }
@@ -690,8 +690,8 @@ bool CVideoSettings::changeNotify(const neutrino_locale_t OptionName, void * /*
g_Zapit->setMode43(g_settings.video_43mode); g_Zapit->setMode43(g_settings.video_43mode);
videoDecoder->setAspectRatio(g_settings.video_Format, -1); videoDecoder->setAspectRatio(g_settings.video_Format, -1);
#ifdef ENABLE_PIP #ifdef ENABLE_PIP
if (pipDecoder != NULL) if (pipVideoDecoder[0] != NULL)
pipDecoder->setAspectRatio(g_settings.video_Format, g_settings.video_43mode); pipVideoDecoder[0]->setAspectRatio(g_settings.video_Format, g_settings.video_43mode);
#endif #endif
} }
else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_VIDEOMODE)) else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_VIDEOMODE))
@@ -759,8 +759,8 @@ void CVideoSettings::next43Mode(void)
g_settings.video_43mode = videomenu_43mode_options[curmode].key; g_settings.video_43mode = videomenu_43mode_options[curmode].key;
g_Zapit->setMode43(g_settings.video_43mode); g_Zapit->setMode43(g_settings.video_43mode);
#ifdef ENABLE_PIP #ifdef ENABLE_PIP
if (pipDecoder != NULL) if (pipVideoDecoder[0] != NULL)
pipDecoder->setAspectRatio(-1, g_settings.video_43mode); pipVideoDecoder[0]->setAspectRatio(-1, g_settings.video_43mode);
#endif #endif
ShowHint(LOCALE_VIDEOMENU_43MODE, g_Locale->getText(text), 450, 2); ShowHint(LOCALE_VIDEOMENU_43MODE, g_Locale->getText(text), 450, 2);
} }
@@ -787,8 +787,8 @@ void CVideoSettings::SwitchFormat()
videoDecoder->setAspectRatio(g_settings.video_Format, -1); videoDecoder->setAspectRatio(g_settings.video_Format, -1);
#ifdef ENABLE_PIP #ifdef ENABLE_PIP
if (pipDecoder != NULL) if (pipVideoDecoder[0] != NULL)
pipDecoder->setAspectRatio(g_settings.video_Format, -1); pipVideoDecoder[0]->setAspectRatio(g_settings.video_Format, -1);
#endif #endif
ShowHint(LOCALE_VIDEOMENU_VIDEOFORMAT, g_Locale->getText(text), 450, 2); ShowHint(LOCALE_VIDEOMENU_VIDEOFORMAT, g_Locale->getText(text), 450, 2);
} }

View File

@@ -197,15 +197,15 @@ void * nhttpd_main_thread(void *data);
//#define DISABLE_SECTIONSD //#define DISABLE_SECTIONSD
extern cVideo * videoDecoder; extern cVideo *videoDecoder;
#ifdef ENABLE_PIP #ifdef ENABLE_PIP
extern cVideo *pipDecoder; extern cVideo *pipVideoDecoder[3];
extern cDemux *pipDemux; extern cDemux *pipVideoDemux[3];
#endif #endif
extern cDemux *videoDemux; extern cDemux *videoDemux;
extern cAudio * audioDecoder; extern cAudio *audioDecoder;
cPowerManager *powerManager; cPowerManager *powerManager;
cCpuFreqManager * cpuFreq; cCpuFreqManager *cpuFreq;
void stop_daemons(bool stopall = true, bool for_flash = false); void stop_daemons(bool stopall = true, bool for_flash = false);
void stop_video(void); void stop_video(void);
@@ -5020,7 +5020,7 @@ void CNeutrinoApp::tvMode( bool rezap )
#ifdef ENABLE_PIP #ifdef ENABLE_PIP
if (g_info.hw_caps->can_pip) if (g_info.hw_caps->can_pip)
{ {
pipDecoder->Pig(g_settings.pip_x, g_settings.pip_y, pipVideoDecoder[0]->Pig(g_settings.pip_x, g_settings.pip_y,
g_settings.pip_width, g_settings.pip_height, g_settings.pip_width, g_settings.pip_height,
frameBuffer->getScreenWidth(true), frameBuffer->getScreenHeight(true)); frameBuffer->getScreenWidth(true), frameBuffer->getScreenHeight(true));
} }
@@ -5306,7 +5306,7 @@ void CNeutrinoApp::radioMode( bool rezap)
#ifdef ENABLE_PIP #ifdef ENABLE_PIP
if (g_info.hw_caps->can_pip) if (g_info.hw_caps->can_pip)
{ {
pipDecoder->Pig(g_settings.pip_radio_x, g_settings.pip_radio_y, pipVideoDecoder[0]->Pig(g_settings.pip_radio_x, g_settings.pip_radio_y,
g_settings.pip_radio_width, g_settings.pip_radio_height, g_settings.pip_radio_width, g_settings.pip_radio_height,
frameBuffer->getScreenWidth(true), frameBuffer->getScreenHeight(true)); frameBuffer->getScreenWidth(true), frameBuffer->getScreenHeight(true));
} }
@@ -5376,20 +5376,20 @@ void CNeutrinoApp::StartAVInputPiP() {
if (!g_info.hw_caps->can_pip) if (!g_info.hw_caps->can_pip)
return; return;
if (!pipDemux) { if (!pipVideoDemux[0]) {
pipDemux = new cDemux(1); pipVideoDemux[0] = new cDemux(1);
pipDemux->Open(DMX_VIDEO_CHANNEL); pipVideoDemux[0]->Open(DMX_VIDEO_CHANNEL);
if (!pipDecoder) { if (!pipVideoDecoder[0]) {
pipDecoder = new cVideo(0, NULL, NULL, 1); pipVideoDecoder[0] = new cVideo(0, NULL, NULL, 1);
} }
} }
pipDemux->SetSource(1, 2); pipVideoDemux[0]->SetSource(1, 2);
pipDecoder->SetStreamType((VIDEO_FORMAT) 1); pipVideoDecoder[0]->SetStreamType((VIDEO_FORMAT) 1);
pipDemux->Start(); pipVideoDemux[0]->Start();
pipDecoder->Start(0, 0, 0); pipVideoDecoder[0]->Start(0, 0, 0);
pipDecoder->open_AVInput_Device(); pipVideoDecoder[0]->open_AVInput_Device();
pipDecoder->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); 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);
pipDecoder->ShowPig(1); pipVideoDecoder[0]->ShowPig(1);
avinput_pip = true; avinput_pip = true;
} }
@@ -5397,10 +5397,10 @@ void CNeutrinoApp::StopAVInputPiP() {
if (!g_info.hw_caps->can_pip) if (!g_info.hw_caps->can_pip)
return; return;
pipDecoder->ShowPig(0); pipVideoDecoder[0]->ShowPig(0);
pipDemux->Stop(); pipVideoDemux[0]->Stop();
pipDecoder->Stop(); pipVideoDecoder[0]->Stop();
pipDecoder->close_AVInput_Device(); pipVideoDecoder[0]->close_AVInput_Device();
avinput_pip = false; avinput_pip = false;
} }
#endif #endif

View File

@@ -96,8 +96,8 @@ extern cDemux *audioDemux;
extern cDemux *videoDemux; extern cDemux *videoDemux;
#ifdef ENABLE_PIP #ifdef ENABLE_PIP
extern cVideo *pipDecoder; extern cVideo *pipVideoDecoder[3];
cDemux *pipDemux = NULL; extern cDemux *pipVideoDemux[3];
#endif #endif
cDemux *pcrDemux = NULL; cDemux *pcrDemux = NULL;
@@ -692,11 +692,11 @@ bool CZapit::StopPip()
if (pip_channel_id) { if (pip_channel_id) {
INFO("[pip] stop %llx", pip_channel_id); INFO("[pip] stop %llx", pip_channel_id);
#if !HAVE_CST_HARDWARE #if !HAVE_CST_HARDWARE
pipDecoder->ShowPig(0); pipVideoDecoder[0]->ShowPig(0);
#endif #endif
CCamManager::getInstance()->Stop(pip_channel_id, CCamManager::PIP); CCamManager::getInstance()->Stop(pip_channel_id, CCamManager::PIP);
pipDemux->Stop(); pipVideoDemux[0]->Stop();
pipDecoder->Stop(); pipVideoDecoder[0]->Stop();
pip_fe = NULL; pip_fe = NULL;
pip_channel_id = 0; pip_channel_id = 0;
return true; return true;
@@ -749,15 +749,15 @@ bool CZapit::StartPip(const t_channel_id channel_id)
INFO("[pip] vpid %X apid %X pcr %X", newchannel->getVideoPid(), newchannel->getAudioPid(), newchannel->getPcrPid()); INFO("[pip] vpid %X apid %X pcr %X", newchannel->getVideoPid(), newchannel->getAudioPid(), newchannel->getPcrPid());
/* FIXME until proper demux management */ /* FIXME until proper demux management */
int dnum = newchannel->getPipDemux(); int dnum = newchannel->getPipDemux();
if (pipDemux && (pipDemux->getUnit() != dnum)) { if (pipVideoDemux[0] && (pipVideoDemux[0]->getUnit() != dnum)) {
pipDecoder->SetDemux(NULL); pipVideoDecoder[0]->SetDemux(NULL);
delete pipDemux; delete pipVideoDemux[0];
pipDemux = NULL; pipVideoDemux[0] = NULL;
} }
if (!pipDemux) { if (!pipVideoDemux[0]) {
pipDemux = new cDemux(dnum); pipVideoDemux[0] = new cDemux(dnum);
pipDemux->Open(DMX_PIP_CHANNEL); pipVideoDemux[0]->Open(DMX_PIP_CHANNEL);
pipDecoder->SetDemux(pipDemux); pipVideoDecoder[0]->SetDemux(pipVideoDemux[0]);
} }
if (CFEManager::getInstance()->getFrontendCount() > 1) if (CFEManager::getInstance()->getFrontendCount() > 1)
cDemux::SetSource(dnum, pip_fe->getNumber()); cDemux::SetSource(dnum, pip_fe->getNumber());
@@ -772,32 +772,32 @@ bool CZapit::StartPip(const t_channel_id channel_id)
#endif #endif
INFO("[pip] vpid %X apid %X pcr %X", newchannel->getVideoPid(), newchannel->getAudioPid(), newchannel->getPcrPid()); INFO("[pip] vpid %X apid %X pcr %X", newchannel->getVideoPid(), newchannel->getAudioPid(), newchannel->getPcrPid());
if (!pipDemux) { if (!pipVideoDemux[0]) {
pipDemux = new cDemux(dnum); pipVideoDemux[0] = new cDemux(dnum);
pipDemux->Open(DMX_VIDEO_CHANNEL); pipVideoDemux[0]->Open(DMX_VIDEO_CHANNEL);
if (!pipDecoder) { if (!pipVideoDecoder[0]) {
pipDecoder = new cVideo(0, NULL, NULL, 1); pipVideoDecoder[0] = new cVideo(0, NULL, NULL, 1);
} }
} }
pipDemux->SetSource(dnum, pip_fe->getNumber()); pipVideoDemux[0]->SetSource(dnum, pip_fe->getNumber());
newchannel->setPipDemux(dnum); newchannel->setPipDemux(dnum);
newchannel->setRecordDemux(pip_fe->getNumber()); newchannel->setRecordDemux(pip_fe->getNumber());
#endif #endif
pipDecoder->SetStreamType((VIDEO_FORMAT)newchannel->type); pipVideoDecoder[0]->SetStreamType((VIDEO_FORMAT)newchannel->type);
pipDemux->pesFilter(newchannel->getVideoPid()); pipVideoDemux[0]->pesFilter(newchannel->getVideoPid());
#if HAVE_CST_HARDWARE #if HAVE_CST_HARDWARE
pipDecoder->Start(0, newchannel->getPcrPid(), newchannel->getVideoPid()); pipVideoDecoder[0]->Start(0, newchannel->getPcrPid(), newchannel->getVideoPid());
pipDemux->Start(); pipVideoDemux[0]->Start();
pip_channel_id = channel_id; pip_channel_id = channel_id;
#else #else
pipDemux->Start(); pipVideoDemux[0]->Start();
pipDecoder->Start(0, newchannel->getPcrPid(), newchannel->getVideoPid()); pipVideoDecoder[0]->Start(0, newchannel->getPcrPid(), newchannel->getVideoPid());
pip_channel_id = newchannel->getChannelID(); pip_channel_id = newchannel->getChannelID();
pipDecoder->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); 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);
pipDecoder->ShowPig(1); pipVideoDecoder[0]->ShowPig(1);
#endif #endif
CCamManager::getInstance()->Start(newchannel->getChannelID(), CCamManager::PIP); CCamManager::getInstance()->Start(newchannel->getChannelID(), CCamManager::PIP);
@@ -2601,10 +2601,10 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg)
#ifdef ENABLE_PIP #ifdef ENABLE_PIP
if (g_info.hw_caps->can_pip) if (g_info.hw_caps->can_pip)
{ {
pipDemux = new cDemux(dnum); pipVideoDemux[0] = new cDemux(dnum);
pipDemux->Open(DMX_PIP_CHANNEL); pipVideoDemux[0]->Open(DMX_PIP_CHANNEL);
pipDecoder = cVideo::GetDecoder(1); pipVideoDecoder[0] = cVideo::GetDecoder(1);
pipDecoder->SetDemux(pipDemux); pipVideoDecoder[0]->SetDemux(pipVideoDemux[0]);
} }
#endif #endif
#else #else
@@ -2623,12 +2623,12 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg)
if (g_info.hw_caps->can_pip) if (g_info.hw_caps->can_pip)
{ {
#if HAVE_CST_HARDWARE #if HAVE_CST_HARDWARE
pipDemux = new cDemux(dnum); pipVideoDemux[0] = new cDemux(dnum);
pipDemux->Open(DMX_PIP_CHANNEL); pipVideoDemux[0]->Open(DMX_PIP_CHANNEL);
pipDecoder = new cVideo(video_mode, pipDemux->getChannel(), pipDemux->getBuffer(), 1); pipVideoDecoder[0] = new cVideo(video_mode, pipVideoDemux[0]->getChannel(), pipVideoDemux[0]->getBuffer(), 1);
#else #else
pipDecoder = new cVideo(0, NULL, NULL, 1); pipVideoDecoder[0] = new cVideo(0, NULL, NULL, 1);
pipDecoder->ShowPig(0); pipVideoDecoder[0]->ShowPig(0);
#endif #endif
} }
#endif #endif
@@ -2846,10 +2846,10 @@ void CZapit::run()
delete audioDemux; delete audioDemux;
#ifdef ENABLE_PIP #ifdef ENABLE_PIP
StopPip(); StopPip();
if (pipDecoder) if (pipVideoDecoder[0])
delete pipDecoder; pipVideoDecoder[0] = NULL;
if (pipDemux) if (pipVideoDemux[0])
delete pipDemux; pipVideoDemux[0] = NULL;
#endif #endif
INFO("demuxes/decoders deleted"); INFO("demuxes/decoders deleted");