Skip to content

Commit

Permalink
fix pip init (thx vanhofen)
Browse files Browse the repository at this point in the history
  • Loading branch information
BPanther committed Jan 28, 2024
1 parent 387b654 commit 62fe516
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions src/neutrino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2733,7 +2733,8 @@ TIMER_STOP("################################## after all #######################
if (g_info.hw_caps->can_pip)
{
CZapit::getInstance()->OpenPip(0);
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));
if (pipVideoDecoder[0])
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));
usleep(100);
CZapit::getInstance()->StopPip(0);
}
Expand Down Expand Up @@ -4738,20 +4739,25 @@ void CNeutrinoApp::StartAVInputPiP() {
if (!g_info.hw_caps->can_pip)
return;

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

if (!pipVideoDecoder[0])
pipVideoDecoder[0] = new cVideo(0, NULL, NULL, 1);

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

Expand Down

0 comments on commit 62fe516

Please sign in to comment.