mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 09:21:18 +02:00
zapit: fix A/V start/stop for new azbox drivers
This commit is contained in:
@@ -2049,32 +2049,6 @@ bool CZapit::StartPlayBack(CZapitChannel *thisChannel)
|
||||
videoDecoder->SetStreamType((VIDEO_FORMAT)thisChannel->type);
|
||||
// videoDecoder->SetSync(VIDEO_PLAY_MOTION);
|
||||
|
||||
#if HAVE_AZBOX_HARDWARE
|
||||
if (have_audio) {
|
||||
audioDemux->pesFilter(thisChannel->getAudioPid());
|
||||
}
|
||||
/* select audio output and start audio */
|
||||
if (have_audio) {
|
||||
SetAudioStreamType(thisChannel->getAudioChannel()->audioChannelType);
|
||||
audioDemux->Start();
|
||||
audioDecoder->Start();
|
||||
}
|
||||
if (have_video) {
|
||||
videoDemux->pesFilter(thisChannel->getVideoPid());
|
||||
}
|
||||
/* start video */
|
||||
if (have_video) {
|
||||
videoDemux->Start();
|
||||
videoDecoder->Start(0, thisChannel->getPcrPid(), thisChannel->getVideoPid());
|
||||
}
|
||||
if (have_pcr) {
|
||||
pcrDemux->pesFilter(thisChannel->getPcrPid());
|
||||
}
|
||||
if (have_pcr) {
|
||||
//printf("[zapit] starting PCR 0x%X\n", thisChannel->getPcrPid());
|
||||
pcrDemux->Start();
|
||||
}
|
||||
#else
|
||||
if (have_pcr) {
|
||||
pcrDemux->pesFilter(thisChannel->getPcrPid());
|
||||
}
|
||||
@@ -2105,14 +2079,19 @@ bool CZapit::StartPlayBack(CZapitChannel *thisChannel)
|
||||
}
|
||||
|
||||
/* start video */
|
||||
#if HAVE_AZBOX_HARDWARE
|
||||
videoDemux->Start();
|
||||
/* no idea why we need to start *video* to get sound for radio... :-) */
|
||||
videoDecoder->Start();
|
||||
#else
|
||||
if (have_video) {
|
||||
videoDecoder->Start(0, thisChannel->getPcrPid(), thisChannel->getVideoPid());
|
||||
videoDemux->Start();
|
||||
}
|
||||
#endif
|
||||
#ifdef USE_VBI
|
||||
if(have_teletext)
|
||||
videoDecoder->StartVBI(thisChannel->getTeletextPid());
|
||||
#endif
|
||||
#endif
|
||||
playing = true;
|
||||
|
||||
@@ -2134,17 +2113,22 @@ bool CZapit::StopPlayBack(bool send_pmt)
|
||||
|
||||
#if HAVE_AZBOX_HARDWARE
|
||||
pcrDemux->Stop();
|
||||
|
||||
if (current_channel && current_channel->getVideoPid()) {
|
||||
videoDemux->Stop();
|
||||
videoDecoder->Stop(standby ? false : true);
|
||||
}
|
||||
audioDemux->Stop();
|
||||
videoDemux->Stop();
|
||||
audioDecoder->Stop();
|
||||
#else
|
||||
videoDemux->Stop();
|
||||
audioDemux->Stop();
|
||||
pcrDemux->Stop();
|
||||
#endif
|
||||
audioDecoder->Stop();
|
||||
|
||||
/* hack. if standby, dont blank video -> for paused timeshift */
|
||||
videoDecoder->Stop(standby ? false : true);
|
||||
#endif
|
||||
#ifdef USE_VBI
|
||||
videoDecoder->StopVBI();
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user