mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 15:02:50 +02:00
e4hdultra: fix pip (first start)
Origin commit data
------------------
Branch: ni/coolstream
Commit: 934f41a58b
Author: BPanther <bpanther_ts@hotmail.com>
Date: 2024-01-02 (Tue, 02 Jan 2024)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -292,7 +292,7 @@ class CZapit : public OpenThreads::Thread
|
|||||||
int SetVolumePercent(int percent);
|
int SetVolumePercent(int percent);
|
||||||
void SetVolumePercent(int default_ac3, int default_pcm);
|
void SetVolumePercent(int default_ac3, int default_pcm);
|
||||||
#ifdef ENABLE_PIP
|
#ifdef ENABLE_PIP
|
||||||
bool OpenPip(int pip = 0);
|
bool OpenPip(int pip = 0, int dnum = -1);
|
||||||
bool StartPip(const t_channel_id channel_id, int pip = 0);
|
bool StartPip(const t_channel_id channel_id, int pip = 0);
|
||||||
bool StopPip(int pip = 0);
|
bool StopPip(int pip = 0);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -691,18 +691,34 @@ bool CZapit::ZapIt(const t_channel_id channel_id, bool forupdate, bool startplay
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLE_PIP
|
#if ENABLE_PIP
|
||||||
bool CZapit::OpenPip(int pip)
|
bool CZapit::OpenPip(int pip, int dnum)
|
||||||
{
|
{
|
||||||
if (!g_info.hw_caps->can_pip)
|
if (!g_info.hw_caps->can_pip)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
pipVideoDecoder[pip] = new cVideo(0, NULL, NULL, pip+1);
|
if (dnum == -1)
|
||||||
pipVideoDecoder[pip]->ShowPig(0);
|
dnum = pip + 1;
|
||||||
pipVideoDemux[pip] = new cDemux(pip+1);
|
|
||||||
pipVideoDemux[pip]->Open(DMX_VIDEO_CHANNEL);
|
if (!pipVideoDecoder[pip])
|
||||||
pipAudioDecoder[pip] = new cAudio(0, NULL, NULL, pip+1);
|
{
|
||||||
pipAudioDemux[pip] = new cDemux(pip+1);
|
pipVideoDecoder[pip] = new cVideo(0, NULL, NULL, dnum);
|
||||||
pipAudioDemux[pip]->Open(DMX_AUDIO_CHANNEL);
|
pipVideoDecoder[pip]->ShowPig(0);
|
||||||
|
}
|
||||||
|
if (!pipVideoDemux[pip])
|
||||||
|
{
|
||||||
|
pipVideoDemux[pip] = new cDemux(dnum);
|
||||||
|
pipVideoDemux[pip]->Open(DMX_VIDEO_CHANNEL);
|
||||||
|
}
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CZapit::StopPip(int pip)
|
bool CZapit::StopPip(int pip)
|
||||||
@@ -759,7 +775,6 @@ bool CZapit::StopPip(int pip)
|
|||||||
delete pipAudioDecoder[pip];
|
delete pipAudioDecoder[pip];
|
||||||
pipAudioDecoder[pip] = NULL;
|
pipAudioDecoder[pip] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -773,14 +788,6 @@ bool CZapit::StartPip(const t_channel_id channel_id, int pip)
|
|||||||
StopPip(0);
|
StopPip(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
CZapitChannel* newchannel;
|
CZapitChannel* newchannel;
|
||||||
bool transponder_change;
|
bool transponder_change;
|
||||||
/* do lock if live is running, or in record mode -
|
/* do lock if live is running, or in record mode -
|
||||||
@@ -805,7 +812,9 @@ bool CZapit::StartPip(const t_channel_id channel_id, int pip)
|
|||||||
ERROR("Cannot get frontend\n");
|
ERROR("Cannot get frontend\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
StopPip(pip);
|
StopPip(pip);
|
||||||
|
|
||||||
if (!need_lock && !SAME_TRANSPONDER(newchannel->getChannelID(), live_channel_id))
|
if (!need_lock && !SAME_TRANSPONDER(newchannel->getChannelID(), live_channel_id))
|
||||||
live_channel_id = newchannel->getChannelID();
|
live_channel_id = newchannel->getChannelID();
|
||||||
|
|
||||||
@@ -851,13 +860,7 @@ bool CZapit::StartPip(const t_channel_id channel_id, int pip)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
INFO("[pip %d] vpid %X apid %X pcr %X", pip, newchannel->getVideoPid(), newchannel->getAudioPid(), newchannel->getPcrPid());
|
INFO("[pip %d] vpid %X apid %X pcr %X", pip, newchannel->getVideoPid(), newchannel->getAudioPid(), newchannel->getPcrPid());
|
||||||
if (!pipVideoDemux[pip]) {
|
OpenPip(pip, dnum);
|
||||||
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());
|
pipVideoDemux[pip]->SetSource(dnum, pip_fe[pip]->getNumber());
|
||||||
newchannel->setPipDemux(dnum);
|
newchannel->setPipDemux(dnum);
|
||||||
@@ -869,18 +872,9 @@ bool CZapit::StartPip(const t_channel_id channel_id, int pip)
|
|||||||
pipVideoDecoder[pip]->Start(0, newchannel->getPcrPid(), newchannel->getVideoPid());
|
pipVideoDecoder[pip]->Start(0, newchannel->getPcrPid(), newchannel->getVideoPid());
|
||||||
pip_channel_id[pip] = newchannel->getChannelID();
|
pip_channel_id[pip] = newchannel->getChannelID();
|
||||||
|
|
||||||
pipVideoDecoder[pip]->Pig(CNeutrinoApp::getInstance()->pip_recalc_pos_x(g_settings.pip_x),CNeutrinoApp::getInstance()->pip_recalc_pos_y(g_settings.pip_y),g_settings.pip_width,g_settings.pip_height,g_settings.screen_width,g_settings.screen_height);
|
pipVideoDecoder[pip]->Pig(CNeutrinoApp::getInstance()->pip_recalc_pos_x(g_settings.pip_x), CNeutrinoApp::getInstance()->pip_recalc_pos_y(g_settings.pip_y), g_settings.pip_width, g_settings.pip_height, g_settings.screen_width, g_settings.screen_height);
|
||||||
|
|
||||||
pipVideoDecoder[pip]->ShowPig(1);
|
pipVideoDecoder[pip]->ShowPig(1);
|
||||||
|
|
||||||
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())
|
if (newchannel->getAudioChannel())
|
||||||
pipAudioDecoder[pip]->SetStreamType(newchannel->getAudioChannel()->audioChannelType);
|
pipAudioDecoder[pip]->SetStreamType(newchannel->getAudioChannel()->audioChannelType);
|
||||||
pipAudioDemux[pip]->pesFilter(newchannel->getAudioPid());
|
pipAudioDemux[pip]->pesFilter(newchannel->getAudioPid());
|
||||||
|
Reference in New Issue
Block a user