mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-03 19:01:25 +02:00
zapit/src/zapit.cpp: use channel pip demux for PiP
This commit is contained in:
@@ -567,7 +567,7 @@ bool CZapit::StopPip()
|
|||||||
{
|
{
|
||||||
if (pip_channel_id) {
|
if (pip_channel_id) {
|
||||||
INFO("[pip] stop %llx", pip_channel_id);
|
INFO("[pip] stop %llx", pip_channel_id);
|
||||||
CCamManager::getInstance()->Stop(pip_channel_id, CCamManager::RECORD);
|
CCamManager::getInstance()->Stop(pip_channel_id, CCamManager::PIP);
|
||||||
pipDemux->Stop();
|
pipDemux->Stop();
|
||||||
pipDecoder->Stop();
|
pipDecoder->Stop();
|
||||||
pip_fe = NULL;
|
pip_fe = NULL;
|
||||||
@@ -606,10 +606,12 @@ bool CZapit::StartPip(const t_channel_id channel_id)
|
|||||||
pip_fe = frontend;
|
pip_fe = frontend;
|
||||||
|
|
||||||
INFO("[pip] vpid %X apid %X pcr %X", newchannel->getVideoPid(), newchannel->getAudioPid(), newchannel->getPcrPid());
|
INFO("[pip] vpid %X apid %X pcr %X", newchannel->getVideoPid(), newchannel->getAudioPid(), newchannel->getPcrPid());
|
||||||
if (pipDemux && (pipDemux->getUnit() != newchannel->getRecordDemux())) {
|
/* FIXME until proper demux management */
|
||||||
|
int dnum = newchannel->getPipDemux();
|
||||||
|
if (pipDemux && (pipDemux->getUnit() != dnum)) {
|
||||||
pipDecoder->SetDemux(NULL);
|
pipDecoder->SetDemux(NULL);
|
||||||
delete pipDemux;
|
delete pipDemux;
|
||||||
pipDemux = new cDemux(newchannel->getRecordDemux());
|
pipDemux = new cDemux(dnum);
|
||||||
pipDemux->Open(DMX_PIP_CHANNEL);
|
pipDemux->Open(DMX_PIP_CHANNEL);
|
||||||
pipDecoder->SetDemux(pipDemux);
|
pipDecoder->SetDemux(pipDemux);
|
||||||
}
|
}
|
||||||
@@ -626,7 +628,7 @@ bool CZapit::StartPip(const t_channel_id channel_id)
|
|||||||
|
|
||||||
//pipDecoder->setBlank(false);
|
//pipDecoder->setBlank(false);
|
||||||
|
|
||||||
CCamManager::getInstance()->Start(newchannel->getChannelID(), CCamManager::RECORD);
|
CCamManager::getInstance()->Start(newchannel->getChannelID(), CCamManager::PIP);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -2142,6 +2144,12 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg)
|
|||||||
audioDemux = new cDemux();
|
audioDemux = new cDemux();
|
||||||
audioDemux->Open(DMX_AUDIO_CHANNEL);
|
audioDemux->Open(DMX_AUDIO_CHANNEL);
|
||||||
|
|
||||||
|
#ifdef ENABLE_PIP
|
||||||
|
/* FIXME until proper demux management */
|
||||||
|
int dnum = 1;
|
||||||
|
if (CFEManager::getInstance()->getFrontendCount() < MAX_DMX_UNITS)
|
||||||
|
dnum = PIP_DEMUX;
|
||||||
|
#endif
|
||||||
#ifdef BOXMODEL_APOLLO
|
#ifdef BOXMODEL_APOLLO
|
||||||
videoDecoder = cVideo::GetDecoder(0);
|
videoDecoder = cVideo::GetDecoder(0);
|
||||||
audioDecoder = cAudio::GetDecoder(0);
|
audioDecoder = cAudio::GetDecoder(0);
|
||||||
@@ -2154,7 +2162,7 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg)
|
|||||||
audioDecoder->SetVideo(videoDecoder);
|
audioDecoder->SetVideo(videoDecoder);
|
||||||
|
|
||||||
#ifdef ENABLE_PIP
|
#ifdef ENABLE_PIP
|
||||||
pipDemux = new cDemux();
|
pipDemux = new cDemux(dnum);
|
||||||
pipDemux->Open(DMX_PIP_CHANNEL);
|
pipDemux->Open(DMX_PIP_CHANNEL);
|
||||||
pipDecoder = cVideo::GetDecoder(1);
|
pipDecoder = cVideo::GetDecoder(1);
|
||||||
pipDecoder->SetDemux(pipDemux);
|
pipDecoder->SetDemux(pipDemux);
|
||||||
@@ -2166,7 +2174,7 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg)
|
|||||||
audioDecoder = new cAudio(audioDemux->getBuffer(), videoDecoder->GetTVEnc(), NULL /*videoDecoder->GetTVEncSD()*/);
|
audioDecoder = new cAudio(audioDemux->getBuffer(), videoDecoder->GetTVEnc(), NULL /*videoDecoder->GetTVEncSD()*/);
|
||||||
|
|
||||||
#ifdef ENABLE_PIP
|
#ifdef ENABLE_PIP
|
||||||
pipDemux = new cDemux();
|
pipDemux = new cDemux(dnum);
|
||||||
pipDemux->Open(DMX_PIP_CHANNEL);
|
pipDemux->Open(DMX_PIP_CHANNEL);
|
||||||
pipDecoder = new cVideo(video_mode, pipDemux->getChannel(), pipDemux->getBuffer(), 1);
|
pipDecoder = new cVideo(video_mode, pipDemux->getChannel(), pipDemux->getBuffer(), 1);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user