fix for --enable-pip

Origin commit data
------------------
Commit: cb806cb745
Author: BPanther <bpanther_ts@hotmail.com>
Date: 2023-10-04 (Wed, 04 Oct 2023)
This commit is contained in:
BPanther
2024-01-02 00:43:08 +01:00
committed by Thilo Graf
parent 01962c0262
commit eb58604269
6 changed files with 25 additions and 6 deletions

View File

@@ -2044,9 +2044,9 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
else if (rec_mode & CRecordManager::RECMODE_TSHIFT)
record_icon = NEUTRINO_ICON_MARKER_TIMESHIFT;
#if ENABLE_PIP
//set pip icon
const char *pip_icon = NULL;
#if ENABLE_PIP
if ((*chanlist)[curr]->getChannelID() == CZapit::getInstance()->GetPipChannelID())
pip_icon = NEUTRINO_ICON_MARKER_PIP;
#endif
@@ -2124,6 +2124,7 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
}
}
#if ENABLE_PIP
if (pip_icon)
{
frameBuffer->getIconSize(pip_icon, &icon_w, &icon_h);
@@ -2133,6 +2134,7 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
icon_x_right -= icon_w + OFFSET_INNER_MID;
}
}
#endif
if (record_icon)
{

View File

@@ -67,8 +67,10 @@ CScreenSaver::CScreenSaver()
// status_icons = CInfoIcons::getInstance()->getStatus();
clr.i_color = COL_DARK_GRAY;
#ifdef ENABLE_PIP
for (unsigned int i = 0; i < 3; i++)
pip_channel_id[i] = 0;
#endif
idletime = time(NULL);
force_refresh = false;
thr_exit = false;

View File

@@ -149,7 +149,9 @@ class CZapit : public OpenThreads::Thread
CZapitChannel * current_channel;
t_channel_id live_channel_id;
#ifdef ENABLE_PIP
t_channel_id pip_channel_id[3];
#endif
t_channel_id lock_channel_id;
t_channel_id last_channel_id;
/* scan params */
@@ -157,7 +159,9 @@ class CZapit : public OpenThreads::Thread
fast_scan_type_t scant;
CFrontend * live_fe;
#ifdef ENABLE_PIP
CFrontend * pip_fe[3];
#endif
audio_map_t audio_map;
volume_map_t vol_map;
@@ -269,13 +273,17 @@ class CZapit : public OpenThreads::Thread
CZapitChannel * GetCurrentChannel() { return current_channel; };
t_channel_id GetCurrentChannelID() { return live_channel_id; };
#ifdef ENABLE_PIP
t_channel_id GetPipChannelID(int pip = 0) { return pip_channel_id[pip]; };
#endif
t_channel_id GetLastTVChannel() { return lastChannelTV; }
t_channel_id GetLastRADIOChannel() { return lastChannelRadio; }
void SetCurrentChannelID(const t_channel_id channel_id) { live_channel_id = channel_id; };
void SetLiveFrontend(CFrontend * fe) { if(fe) live_fe = fe; }
CFrontend * GetLiveFrontend() { return live_fe; };
#ifdef ENABLE_PIP
CFrontend * GetPipFrontend(int pip = 0) { return pip_fe[pip]; };
#endif
int GetPidVolume(t_channel_id channel_id, int pid, bool ac3 = false);
void SetPidVolume(t_channel_id channel_id, int pid, int percent);

View File

@@ -435,7 +435,7 @@ void CFEManager::linkFrontends(bool init)
fe->Close();
}
}
for(unsigned i = 0; i < MAX_DMX_UNITS; i++) {
for (unsigned i = 0; i < MAX_DMX_UNITS; i++) {
if (demuxes[i] == 0) {
unused_demux = i;
INFO("pip demux: %d", unused_demux);
@@ -693,9 +693,11 @@ CFrontend * CFEManager::allocateFE(CZapitChannel * channel, bool forrecord)
int dnum = getDemux(channel->getTransponderId(), frontend->getNumber());
INFO("record dyn demux: %d", dnum);
channel->setRecordDemux(dnum);
#ifdef ENABLE_PIP
INFO("pip dyn demux: %d", dnum);
channel->setPipDemux(dnum);
INFO("pip stream demux: %d", dnum);
#endif
INFO("stream dyn demux: %d", dnum);
channel->setStreamDemux(dnum);
if (forrecord && !dnum) {
frontend = NULL;
@@ -704,7 +706,9 @@ CFrontend * CFEManager::allocateFE(CZapitChannel * channel, bool forrecord)
}
#else
channel->setRecordDemux(frontend->fenumber+1);
#ifdef ENABLE_PIP
channel->setPipDemux(frontend->fenumber+1);
#endif
channel->setStreamDemux(frontend->fenumber+1);
#if HAVE_CST_HARDWARE
/* I don't know if this check is necessary on cs, but it hurts on other hardware */

View File

@@ -142,11 +142,14 @@ CZapit::CZapit()
currentMode = 0;
current_volume = 100;
volume_percent = 0;
for (unsigned int i = 0; i < 3; i++)
pip_channel_id[i] = 0;
lock_channel_id = 0;
#if ENABLE_PIP
for (unsigned int i = 0; i < 3; i++)
{
pip_channel_id[i] = 0;
pip_fe[i] = NULL;
}
#endif
#if ENABLE_AIT
ait = new CAit();
#endif