Skip to content

Commit

Permalink
e4hdultra: fix pip (first start)
Browse files Browse the repository at this point in the history
  • Loading branch information
BPanther committed Oct 8, 2023
1 parent 1b6c52f commit 00c7310
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/neutrino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2729,6 +2729,15 @@ TIMER_STOP("################################## after all #######################
xmltv_xml_readepg();
xmltv_xml_auto_readepg();

#if ENABLE_PIP && BOXMODEL_E4HDULTRA
if (g_info.hw_caps->can_pip)
{
CZapit::getInstance()->OpenPip(0);
usleep(100);
CZapit::getInstance()->StopPip(0);
}
#endif

RealRun();
ExitRun(CNeutrinoApp::EXIT_REBOOT);

Expand Down
1 change: 1 addition & 0 deletions src/zapit/include/zapit/zapit.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ class CZapit : public OpenThreads::Thread
int SetVolumePercent(int percent);
void SetVolumePercent(int default_ac3, int default_pcm);
#ifdef ENABLE_PIP
bool OpenPip(int pip = 0);
bool StartPip(const t_channel_id channel_id, int pip = 0);
bool StopPip(int pip = 0);
#endif
Expand Down
14 changes: 14 additions & 0 deletions src/zapit/src/zapit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,20 @@ bool CZapit::ZapIt(const t_channel_id channel_id, bool forupdate, bool startplay
}

#ifdef ENABLE_PIP
bool CZapit::OpenPip(int pip)
{
if (!g_info.hw_caps->can_pip)
return false;

pipVideoDecoder[pip] = new cVideo(0, NULL, NULL, pip+1);
pipVideoDecoder[pip]->ShowPig(0);
pipVideoDemux[pip] = new cDemux(pip+1);
pipVideoDemux[pip]->Open(DMX_VIDEO_CHANNEL);
pipAudioDecoder[pip] = new cAudio(0, NULL, NULL, pip+1);
pipAudioDemux[pip] = new cDemux(pip+1);
pipAudioDemux[pip]->Open(DMX_AUDIO_CHANNEL);
}

bool CZapit::StopPip(int pip)
{
if (!g_info.hw_caps->can_pip)
Expand Down

0 comments on commit 00c7310

Please sign in to comment.