mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-11 23:50:58 +02:00
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:
@@ -20,7 +20,7 @@
|
||||
|
||||
#ifdef ENABLE_PIP
|
||||
|
||||
extern cVideo *pipDecoder;
|
||||
extern cVideo *pipVideoDecoder[3];
|
||||
|
||||
CPipSetup::CPipSetup()
|
||||
{
|
||||
@@ -69,8 +69,8 @@ void CPipSetup::move(int x, int y, bool abs)
|
||||
*gy = y_coord;
|
||||
|
||||
printf("CPipSetup::move: x %d y %d\n", x_coord, y_coord);
|
||||
if (pipDecoder != NULL)
|
||||
pipDecoder->Pig(x_coord, y_coord, width, height, maxw, maxh);
|
||||
if (pipVideoDecoder[0] != NULL)
|
||||
pipVideoDecoder[0]->Pig(x_coord, y_coord, width, height, maxw, maxh);
|
||||
}
|
||||
|
||||
// w and h is percent, if not absolute
|
||||
@@ -102,8 +102,8 @@ void CPipSetup::resize(int w, int h, bool abs)
|
||||
*gh = height;
|
||||
|
||||
printf("CPipSetup::resize: w %d h %d \n", width, height);
|
||||
if (pipDecoder != NULL)
|
||||
pipDecoder->Pig(x_coord, y_coord, width, height, maxw, maxh);
|
||||
if (pipVideoDecoder[0] != NULL)
|
||||
pipVideoDecoder[0]->Pig(x_coord, y_coord, width, height, maxw, maxh);
|
||||
}
|
||||
|
||||
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]);
|
||||
#if !HAVE_CST_HARDWARE
|
||||
if (pipDecoder != NULL)
|
||||
pipDecoder->ShowPig(1);
|
||||
if (pipVideoDecoder[0] != NULL)
|
||||
pipVideoDecoder[0]->ShowPig(1);
|
||||
#endif
|
||||
bool loop=true;
|
||||
while (loop) {
|
||||
@@ -174,8 +174,8 @@ void CPipSetup::hide()
|
||||
{
|
||||
frameBuffer->Clear();
|
||||
#if !HAVE_CST_HARDWARE
|
||||
if (pipDecoder != NULL)
|
||||
pipDecoder->ShowPig(0);
|
||||
if (pipVideoDecoder[0] != NULL)
|
||||
pipVideoDecoder[0]->ShowPig(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -204,8 +204,8 @@ void CPipSetup::paint()
|
||||
int x = (frameBuffer->getScreenWidth() - mwidth)/2;
|
||||
int y = (frameBuffer->getScreenHeight() - mheight*4)/2;
|
||||
|
||||
if (pipDecoder != NULL)
|
||||
if (pipDecoder->getBlank())
|
||||
if (pipVideoDecoder[0] != NULL)
|
||||
if (pipVideoDecoder[0]->getBlank())
|
||||
frameBuffer->paintBoxRel(x_coord, y_coord, width, height, COL_MENUCONTENT_PLUS_0);
|
||||
|
||||
frameBuffer->paintBoxRel(x, y, mwidth, mheight*4, COL_MENUCONTENT_PLUS_0);
|
||||
|
@@ -69,7 +69,7 @@
|
||||
|
||||
extern cVideo *videoDecoder;
|
||||
#ifdef ENABLE_PIP
|
||||
extern cVideo *pipDecoder;
|
||||
extern cVideo *pipVideoDecoder[3];
|
||||
#include <gui/pipsetup.h>
|
||||
#endif
|
||||
extern int prev_video_mode;
|
||||
@@ -612,8 +612,8 @@ void CVideoSettings::setVideoSettings()
|
||||
#endif
|
||||
videoDecoder->setAspectRatio(g_settings.video_Format, g_settings.video_43mode);
|
||||
#ifdef ENABLE_PIP
|
||||
if (pipDecoder != NULL)
|
||||
pipDecoder->setAspectRatio(g_settings.video_Format, g_settings.video_43mode);
|
||||
if (pipVideoDecoder[0] != NULL)
|
||||
pipVideoDecoder[0]->setAspectRatio(g_settings.video_Format, g_settings.video_43mode);
|
||||
#endif
|
||||
|
||||
videoDecoder->SetDBDR(g_settings.video_dbdr);
|
||||
@@ -626,8 +626,8 @@ void CVideoSettings::setVideoSettings()
|
||||
changeNotify(LOCALE_VIDEOMENU_SDOSD, NULL);
|
||||
#endif
|
||||
#ifdef ENABLE_PIP
|
||||
if (pipDecoder != 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);
|
||||
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
|
||||
}
|
||||
|
||||
@@ -690,8 +690,8 @@ 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 (pipDecoder != NULL)
|
||||
pipDecoder->setAspectRatio(g_settings.video_Format, g_settings.video_43mode);
|
||||
if (pipVideoDecoder[0] != NULL)
|
||||
pipVideoDecoder[0]->setAspectRatio(g_settings.video_Format, g_settings.video_43mode);
|
||||
#endif
|
||||
}
|
||||
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_Zapit->setMode43(g_settings.video_43mode);
|
||||
#ifdef ENABLE_PIP
|
||||
if (pipDecoder != NULL)
|
||||
pipDecoder->setAspectRatio(-1, g_settings.video_43mode);
|
||||
if (pipVideoDecoder[0] != NULL)
|
||||
pipVideoDecoder[0]->setAspectRatio(-1, g_settings.video_43mode);
|
||||
#endif
|
||||
ShowHint(LOCALE_VIDEOMENU_43MODE, g_Locale->getText(text), 450, 2);
|
||||
}
|
||||
@@ -787,8 +787,8 @@ void CVideoSettings::SwitchFormat()
|
||||
|
||||
videoDecoder->setAspectRatio(g_settings.video_Format, -1);
|
||||
#ifdef ENABLE_PIP
|
||||
if (pipDecoder != NULL)
|
||||
pipDecoder->setAspectRatio(g_settings.video_Format, -1);
|
||||
if (pipVideoDecoder[0] != NULL)
|
||||
pipVideoDecoder[0]->setAspectRatio(g_settings.video_Format, -1);
|
||||
#endif
|
||||
ShowHint(LOCALE_VIDEOMENU_VIDEOFORMAT, g_Locale->getText(text), 450, 2);
|
||||
}
|
||||
|
@@ -197,15 +197,15 @@ void * nhttpd_main_thread(void *data);
|
||||
|
||||
//#define DISABLE_SECTIONSD
|
||||
|
||||
extern cVideo * videoDecoder;
|
||||
extern cVideo *videoDecoder;
|
||||
#ifdef ENABLE_PIP
|
||||
extern cVideo *pipDecoder;
|
||||
extern cDemux *pipDemux;
|
||||
extern cVideo *pipVideoDecoder[3];
|
||||
extern cDemux *pipVideoDemux[3];
|
||||
#endif
|
||||
extern cDemux *videoDemux;
|
||||
extern cAudio * audioDecoder;
|
||||
extern cAudio *audioDecoder;
|
||||
cPowerManager *powerManager;
|
||||
cCpuFreqManager * cpuFreq;
|
||||
cCpuFreqManager *cpuFreq;
|
||||
|
||||
void stop_daemons(bool stopall = true, bool for_flash = false);
|
||||
void stop_video(void);
|
||||
@@ -5020,7 +5020,7 @@ void CNeutrinoApp::tvMode( bool rezap )
|
||||
#ifdef ENABLE_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,
|
||||
frameBuffer->getScreenWidth(true), frameBuffer->getScreenHeight(true));
|
||||
}
|
||||
@@ -5306,7 +5306,7 @@ void CNeutrinoApp::radioMode( bool rezap)
|
||||
#ifdef ENABLE_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,
|
||||
frameBuffer->getScreenWidth(true), frameBuffer->getScreenHeight(true));
|
||||
}
|
||||
@@ -5376,20 +5376,20 @@ void CNeutrinoApp::StartAVInputPiP() {
|
||||
if (!g_info.hw_caps->can_pip)
|
||||
return;
|
||||
|
||||
if (!pipDemux) {
|
||||
pipDemux = new cDemux(1);
|
||||
pipDemux->Open(DMX_VIDEO_CHANNEL);
|
||||
if (!pipDecoder) {
|
||||
pipDecoder = new cVideo(0, NULL, NULL, 1);
|
||||
if (!pipVideoDemux[0]) {
|
||||
pipVideoDemux[0] = new cDemux(1);
|
||||
pipVideoDemux[0]->Open(DMX_VIDEO_CHANNEL);
|
||||
if (!pipVideoDecoder[0]) {
|
||||
pipVideoDecoder[0] = new cVideo(0, NULL, NULL, 1);
|
||||
}
|
||||
}
|
||||
pipDemux->SetSource(1, 2);
|
||||
pipDecoder->SetStreamType((VIDEO_FORMAT) 1);
|
||||
pipDemux->Start();
|
||||
pipDecoder->Start(0, 0, 0);
|
||||
pipDecoder->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);
|
||||
pipDecoder->ShowPig(1);
|
||||
pipVideoDemux[0]->SetSource(1, 2);
|
||||
pipVideoDecoder[0]->SetStreamType((VIDEO_FORMAT) 1);
|
||||
pipVideoDemux[0]->Start();
|
||||
pipVideoDecoder[0]->Start(0, 0, 0);
|
||||
pipVideoDecoder[0]->open_AVInput_Device();
|
||||
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);
|
||||
pipVideoDecoder[0]->ShowPig(1);
|
||||
avinput_pip = true;
|
||||
}
|
||||
|
||||
@@ -5397,10 +5397,10 @@ void CNeutrinoApp::StopAVInputPiP() {
|
||||
if (!g_info.hw_caps->can_pip)
|
||||
return;
|
||||
|
||||
pipDecoder->ShowPig(0);
|
||||
pipDemux->Stop();
|
||||
pipDecoder->Stop();
|
||||
pipDecoder->close_AVInput_Device();
|
||||
pipVideoDecoder[0]->ShowPig(0);
|
||||
pipVideoDemux[0]->Stop();
|
||||
pipVideoDecoder[0]->Stop();
|
||||
pipVideoDecoder[0]->close_AVInput_Device();
|
||||
avinput_pip = false;
|
||||
}
|
||||
#endif
|
||||
|
@@ -96,8 +96,8 @@ extern cDemux *audioDemux;
|
||||
extern cDemux *videoDemux;
|
||||
|
||||
#ifdef ENABLE_PIP
|
||||
extern cVideo *pipDecoder;
|
||||
cDemux *pipDemux = NULL;
|
||||
extern cVideo *pipVideoDecoder[3];
|
||||
extern cDemux *pipVideoDemux[3];
|
||||
#endif
|
||||
|
||||
cDemux *pcrDemux = NULL;
|
||||
@@ -692,11 +692,11 @@ bool CZapit::StopPip()
|
||||
if (pip_channel_id) {
|
||||
INFO("[pip] stop %llx", pip_channel_id);
|
||||
#if !HAVE_CST_HARDWARE
|
||||
pipDecoder->ShowPig(0);
|
||||
pipVideoDecoder[0]->ShowPig(0);
|
||||
#endif
|
||||
CCamManager::getInstance()->Stop(pip_channel_id, CCamManager::PIP);
|
||||
pipDemux->Stop();
|
||||
pipDecoder->Stop();
|
||||
pipVideoDemux[0]->Stop();
|
||||
pipVideoDecoder[0]->Stop();
|
||||
pip_fe = NULL;
|
||||
pip_channel_id = 0;
|
||||
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());
|
||||
/* FIXME until proper demux management */
|
||||
int dnum = newchannel->getPipDemux();
|
||||
if (pipDemux && (pipDemux->getUnit() != dnum)) {
|
||||
pipDecoder->SetDemux(NULL);
|
||||
delete pipDemux;
|
||||
pipDemux = NULL;
|
||||
if (pipVideoDemux[0] && (pipVideoDemux[0]->getUnit() != dnum)) {
|
||||
pipVideoDecoder[0]->SetDemux(NULL);
|
||||
delete pipVideoDemux[0];
|
||||
pipVideoDemux[0] = NULL;
|
||||
}
|
||||
if (!pipDemux) {
|
||||
pipDemux = new cDemux(dnum);
|
||||
pipDemux->Open(DMX_PIP_CHANNEL);
|
||||
pipDecoder->SetDemux(pipDemux);
|
||||
if (!pipVideoDemux[0]) {
|
||||
pipVideoDemux[0] = new cDemux(dnum);
|
||||
pipVideoDemux[0]->Open(DMX_PIP_CHANNEL);
|
||||
pipVideoDecoder[0]->SetDemux(pipVideoDemux[0]);
|
||||
}
|
||||
if (CFEManager::getInstance()->getFrontendCount() > 1)
|
||||
cDemux::SetSource(dnum, pip_fe->getNumber());
|
||||
@@ -772,32 +772,32 @@ bool CZapit::StartPip(const t_channel_id channel_id)
|
||||
#endif
|
||||
|
||||
INFO("[pip] vpid %X apid %X pcr %X", newchannel->getVideoPid(), newchannel->getAudioPid(), newchannel->getPcrPid());
|
||||
if (!pipDemux) {
|
||||
pipDemux = new cDemux(dnum);
|
||||
pipDemux->Open(DMX_VIDEO_CHANNEL);
|
||||
if (!pipDecoder) {
|
||||
pipDecoder = new cVideo(0, NULL, NULL, 1);
|
||||
if (!pipVideoDemux[0]) {
|
||||
pipVideoDemux[0] = new cDemux(dnum);
|
||||
pipVideoDemux[0]->Open(DMX_VIDEO_CHANNEL);
|
||||
if (!pipVideoDecoder[0]) {
|
||||
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->setRecordDemux(pip_fe->getNumber());
|
||||
#endif
|
||||
|
||||
pipDecoder->SetStreamType((VIDEO_FORMAT)newchannel->type);
|
||||
pipDemux->pesFilter(newchannel->getVideoPid());
|
||||
pipVideoDecoder[0]->SetStreamType((VIDEO_FORMAT)newchannel->type);
|
||||
pipVideoDemux[0]->pesFilter(newchannel->getVideoPid());
|
||||
#if HAVE_CST_HARDWARE
|
||||
pipDecoder->Start(0, newchannel->getPcrPid(), newchannel->getVideoPid());
|
||||
pipDemux->Start();
|
||||
pipVideoDecoder[0]->Start(0, newchannel->getPcrPid(), newchannel->getVideoPid());
|
||||
pipVideoDemux[0]->Start();
|
||||
pip_channel_id = channel_id;
|
||||
#else
|
||||
pipDemux->Start();
|
||||
pipDecoder->Start(0, newchannel->getPcrPid(), newchannel->getVideoPid());
|
||||
pipVideoDemux[0]->Start();
|
||||
pipVideoDecoder[0]->Start(0, newchannel->getPcrPid(), newchannel->getVideoPid());
|
||||
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);
|
||||
pipDecoder->ShowPig(1);
|
||||
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);
|
||||
pipVideoDecoder[0]->ShowPig(1);
|
||||
#endif
|
||||
|
||||
CCamManager::getInstance()->Start(newchannel->getChannelID(), CCamManager::PIP);
|
||||
@@ -2601,10 +2601,10 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg)
|
||||
#ifdef ENABLE_PIP
|
||||
if (g_info.hw_caps->can_pip)
|
||||
{
|
||||
pipDemux = new cDemux(dnum);
|
||||
pipDemux->Open(DMX_PIP_CHANNEL);
|
||||
pipDecoder = cVideo::GetDecoder(1);
|
||||
pipDecoder->SetDemux(pipDemux);
|
||||
pipVideoDemux[0] = new cDemux(dnum);
|
||||
pipVideoDemux[0]->Open(DMX_PIP_CHANNEL);
|
||||
pipVideoDecoder[0] = cVideo::GetDecoder(1);
|
||||
pipVideoDecoder[0]->SetDemux(pipVideoDemux[0]);
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
@@ -2623,12 +2623,12 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg)
|
||||
if (g_info.hw_caps->can_pip)
|
||||
{
|
||||
#if HAVE_CST_HARDWARE
|
||||
pipDemux = new cDemux(dnum);
|
||||
pipDemux->Open(DMX_PIP_CHANNEL);
|
||||
pipDecoder = new cVideo(video_mode, pipDemux->getChannel(), pipDemux->getBuffer(), 1);
|
||||
pipVideoDemux[0] = new cDemux(dnum);
|
||||
pipVideoDemux[0]->Open(DMX_PIP_CHANNEL);
|
||||
pipVideoDecoder[0] = new cVideo(video_mode, pipVideoDemux[0]->getChannel(), pipVideoDemux[0]->getBuffer(), 1);
|
||||
#else
|
||||
pipDecoder = new cVideo(0, NULL, NULL, 1);
|
||||
pipDecoder->ShowPig(0);
|
||||
pipVideoDecoder[0] = new cVideo(0, NULL, NULL, 1);
|
||||
pipVideoDecoder[0]->ShowPig(0);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
@@ -2846,10 +2846,10 @@ void CZapit::run()
|
||||
delete audioDemux;
|
||||
#ifdef ENABLE_PIP
|
||||
StopPip();
|
||||
if (pipDecoder)
|
||||
delete pipDecoder;
|
||||
if (pipDemux)
|
||||
delete pipDemux;
|
||||
if (pipVideoDecoder[0])
|
||||
pipVideoDecoder[0] = NULL;
|
||||
if (pipVideoDemux[0])
|
||||
pipVideoDemux[0] = NULL;
|
||||
#endif
|
||||
|
||||
INFO("demuxes/decoders deleted");
|
||||
|
Reference in New Issue
Block a user