Skip to content

Commit

Permalink
Revert "small pip changes"
Browse files Browse the repository at this point in the history
This reverts commit 8f1b802.
  • Loading branch information
BPanther committed Oct 4, 2023
1 parent 8f1b802 commit 70b8527
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
13 changes: 3 additions & 10 deletions src/neutrino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4396,9 +4396,6 @@ void CNeutrinoApp::tvMode( bool rezap )
#ifdef ENABLE_PIP
if (g_info.hw_caps->can_pip)
{
if (!pipVideoDecoder[0]) {
pipVideoDecoder[0] = new cVideo(0, NULL, NULL, 1);
}
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));
Expand Down Expand Up @@ -4666,9 +4663,6 @@ void CNeutrinoApp::radioMode( bool rezap)
#ifdef ENABLE_PIP
if (g_info.hw_caps->can_pip)
{
if (!pipVideoDecoder[0]) {
pipVideoDecoder[0] = new cVideo(0, NULL, NULL, 1);
}
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));
Expand Down Expand Up @@ -4738,14 +4732,13 @@ void CNeutrinoApp::StartAVInputPiP() {
if (!g_info.hw_caps->can_pip)
return;

if (!pipVideoDecoder[0]) {
pipVideoDecoder[0] = 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);
}
}

pipVideoDemux[0]->SetSource(1, 2);
pipVideoDecoder[0]->SetStreamType((VIDEO_FORMAT) 1);
pipVideoDemux[0]->Start();
Expand Down
30 changes: 21 additions & 9 deletions src/zapit/src/zapit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -726,12 +726,12 @@ bool CZapit::StartPip(const t_channel_id channel_id, int pip)
#endif

INFO("[pip %d] vpid %X apid %X pcr %X", pip, newchannel->getVideoPid(), newchannel->getAudioPid(), newchannel->getPcrPid());
if (!pipVideoDecoder[pip]) {
pipVideoDecoder[pip] = new cVideo(0, NULL, NULL, dnum);
}
if (!pipVideoDemux[pip]) {
pipVideoDemux[pip] = new cDemux(dnum);
pipVideoDemux[pip]->Open(DMX_VIDEO_CHANNEL);
if (!pipVideoDecoder[pip]) {
pipVideoDecoder[pip] = new cVideo(0, NULL, NULL, dnum);
}
}

pipVideoDemux[pip]->SetSource(dnum, pip_fe[pip]->getNumber());
Expand All @@ -747,12 +747,12 @@ bool CZapit::StartPip(const t_channel_id channel_id, int pip)
pipVideoDecoder[pip]->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[pip]->ShowPig(1);

if (!pipAudioDecoder[pip]) {
pipAudioDecoder[pip] = new cAudio(0, NULL, NULL, dnum);
}
if (!pipAudioDemux[pip]) {
pipAudioDemux[pip] = new cDemux(dnum);
pipAudioDemux[pip]->Open(DMX_AUDIO_CHANNEL);
if (!pipAudioDecoder[pip]) {
pipAudioDecoder[pip] = new cAudio(0, NULL, NULL, dnum);
}
}

if (newchannel->getAudioChannel())
Expand Down Expand Up @@ -2264,9 +2264,21 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg)
audioDemux = new cDemux();
audioDemux->Open(DMX_AUDIO_CHANNEL);

videoDecoder = new cVideo(video_mode, videoDemux->getChannel(), videoDemux->getBuffer());
videoDecoder->Standby(false);
audioDecoder = new cAudio(audioDemux->getBuffer(), videoDecoder->GetTVEnc(), NULL /*videoDecoder->GetTVEncSD()*/);
videoDecoder = new cVideo(video_mode, videoDemux->getChannel(), videoDemux->getBuffer());
videoDecoder->Standby(false);
audioDecoder = new cAudio(audioDemux->getBuffer(), videoDecoder->GetTVEnc(), NULL /*videoDecoder->GetTVEncSD()*/);

#ifdef ENABLE_PIP
if (g_info.hw_caps->can_pip)
{
for (unsigned i=0; i < (unsigned int) g_info.hw_caps->pip_devs; i++)
{
pipVideoDecoder[i] = new cVideo(0, NULL, NULL, i+1);
pipVideoDecoder[i]->ShowPig(0);
pipAudioDecoder[i] = new cAudio(0, NULL, NULL, i+1);
}
}
#endif

videoDecoder->SetAudioHandle(audioDecoder->GetHandle());

Expand Down

0 comments on commit 70b8527

Please sign in to comment.