mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 10:51:05 +02:00
zapit.cpp: fix pip for CST
Origin commit data
------------------
Commit: dc1cdf4650
Author: GetAway <get-away@t-online.de>
Date: 2021-10-18 (Mon, 18 Oct 2021)
This commit is contained in:
@@ -98,9 +98,11 @@ extern cDemux *videoDemux;
|
|||||||
#if ENABLE_PIP
|
#if ENABLE_PIP
|
||||||
extern cVideo *pipVideoDecoder[3];
|
extern cVideo *pipVideoDecoder[3];
|
||||||
extern cDemux *pipVideoDemux[3];
|
extern cDemux *pipVideoDemux[3];
|
||||||
|
#if !HAVE_CST_HARDWARE
|
||||||
extern cAudio * pipAudioDecoder[3];
|
extern cAudio * pipAudioDecoder[3];
|
||||||
extern cDemux * pipAudioDemux[3];
|
extern cDemux * pipAudioDemux[3];
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
cDemux *pcrDemux = NULL;
|
cDemux *pcrDemux = NULL;
|
||||||
|
|
||||||
@@ -692,7 +694,6 @@ bool CZapit::StopPip(int pip)
|
|||||||
CNeutrinoApp::getInstance()->StopAVInputPiP();
|
CNeutrinoApp::getInstance()->StopAVInputPiP();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (pip_channel_id[pip]) {
|
if (pip_channel_id[pip]) {
|
||||||
INFO("[pip %d] stop %llx", pip, pip_channel_id[pip]);
|
INFO("[pip %d] stop %llx", pip, pip_channel_id[pip]);
|
||||||
#if !HAVE_CST_HARDWARE
|
#if !HAVE_CST_HARDWARE
|
||||||
@@ -701,8 +702,10 @@ bool CZapit::StopPip(int pip)
|
|||||||
CCamManager::getInstance()->Stop(pip_channel_id[pip], CCamManager::PIP);
|
CCamManager::getInstance()->Stop(pip_channel_id[pip], CCamManager::PIP);
|
||||||
pipVideoDemux[pip]->Stop();
|
pipVideoDemux[pip]->Stop();
|
||||||
pipVideoDecoder[pip]->Stop();
|
pipVideoDecoder[pip]->Stop();
|
||||||
|
#if !HAVE_CST_HARDWARE
|
||||||
pipAudioDemux[pip]->Stop();
|
pipAudioDemux[pip]->Stop();
|
||||||
pipAudioDecoder[pip]->Stop();
|
pipAudioDecoder[pip]->Stop();
|
||||||
|
#endif
|
||||||
pip_fe[pip] = NULL;
|
pip_fe[pip] = NULL;
|
||||||
pip_channel_id[pip] = 0;
|
pip_channel_id[pip] = 0;
|
||||||
return true;
|
return true;
|
||||||
@@ -2608,6 +2611,9 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg)
|
|||||||
audioDemux = new cDemux();
|
audioDemux = new cDemux();
|
||||||
audioDemux->Open(DMX_AUDIO_CHANNEL);
|
audioDemux->Open(DMX_AUDIO_CHANNEL);
|
||||||
|
|
||||||
|
#if defined ENABLE_PIP && defined HAVE_CST_HARDWARE
|
||||||
|
int dnum = 1; // FIXME?
|
||||||
|
#endif
|
||||||
#ifdef BOXMODEL_CST_HD2
|
#ifdef BOXMODEL_CST_HD2
|
||||||
videoDecoder = cVideo::GetDecoder(0);
|
videoDecoder = cVideo::GetDecoder(0);
|
||||||
audioDecoder = cAudio::GetDecoder(0);
|
audioDecoder = cAudio::GetDecoder(0);
|
||||||
@@ -2622,9 +2628,6 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg)
|
|||||||
audioDecoder->SetVideo(videoDecoder);
|
audioDecoder->SetVideo(videoDecoder);
|
||||||
|
|
||||||
#if ENABLE_PIP
|
#if ENABLE_PIP
|
||||||
#if HAVE_CST_HARDWARE
|
|
||||||
int dnum = 1; // FIXME?
|
|
||||||
#endif
|
|
||||||
if (g_info.hw_caps->can_pip)
|
if (g_info.hw_caps->can_pip)
|
||||||
{
|
{
|
||||||
pipVideoDemux[0] = new cDemux(dnum);
|
pipVideoDemux[0] = new cDemux(dnum);
|
||||||
@@ -2648,6 +2651,8 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg)
|
|||||||
if (g_info.hw_caps->can_pip)
|
if (g_info.hw_caps->can_pip)
|
||||||
{
|
{
|
||||||
#if HAVE_CST_HARDWARE
|
#if HAVE_CST_HARDWARE
|
||||||
|
pipVideoDemux[0] = new cDemux(dnum);
|
||||||
|
pipVideoDemux[0]->Open(DMX_PIP_CHANNEL);
|
||||||
pipVideoDecoder[0] = new cVideo(video_mode, pipVideoDemux[0]->getChannel(), pipVideoDemux[0]->getBuffer(), 1);
|
pipVideoDecoder[0] = new cVideo(video_mode, pipVideoDemux[0]->getChannel(), pipVideoDemux[0]->getBuffer(), 1);
|
||||||
#else
|
#else
|
||||||
for (unsigned i=0; i < (unsigned int) g_info.hw_caps->pip_devs; i++)
|
for (unsigned i=0; i < (unsigned int) g_info.hw_caps->pip_devs; i++)
|
||||||
@@ -2879,10 +2884,12 @@ void CZapit::run()
|
|||||||
pipVideoDecoder[i] = NULL;
|
pipVideoDecoder[i] = NULL;
|
||||||
if (pipVideoDemux[i])
|
if (pipVideoDemux[i])
|
||||||
pipVideoDemux[i] = NULL;
|
pipVideoDemux[i] = NULL;
|
||||||
|
#if !HAVE_CST_HARDWARE
|
||||||
if (pipAudioDecoder[i])
|
if (pipAudioDecoder[i])
|
||||||
pipAudioDecoder[i] = NULL;
|
pipAudioDecoder[i] = NULL;
|
||||||
if (pipAudioDemux[i])
|
if (pipAudioDemux[i])
|
||||||
pipAudioDemux[i] = NULL;
|
pipAudioDemux[i] = NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user