zapit: fix A/V start/stop for new azbox drivers

Origin commit data
------------------
Commit: 1db98b11cd
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-09-01 (Sun, 01 Sep 2013)
This commit is contained in:
Stefan Seyfried
2013-09-01 17:30:53 +02:00
parent fb1746543b
commit 566dbf6513

View File

@@ -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