mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 02:11:04 +02:00
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:
@@ -2049,32 +2049,6 @@ bool CZapit::StartPlayBack(CZapitChannel *thisChannel)
|
|||||||
videoDecoder->SetStreamType((VIDEO_FORMAT)thisChannel->type);
|
videoDecoder->SetStreamType((VIDEO_FORMAT)thisChannel->type);
|
||||||
// videoDecoder->SetSync(VIDEO_PLAY_MOTION);
|
// 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) {
|
if (have_pcr) {
|
||||||
pcrDemux->pesFilter(thisChannel->getPcrPid());
|
pcrDemux->pesFilter(thisChannel->getPcrPid());
|
||||||
}
|
}
|
||||||
@@ -2105,14 +2079,19 @@ bool CZapit::StartPlayBack(CZapitChannel *thisChannel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* start video */
|
/* 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) {
|
if (have_video) {
|
||||||
videoDecoder->Start(0, thisChannel->getPcrPid(), thisChannel->getVideoPid());
|
videoDecoder->Start(0, thisChannel->getPcrPid(), thisChannel->getVideoPid());
|
||||||
videoDemux->Start();
|
videoDemux->Start();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#ifdef USE_VBI
|
#ifdef USE_VBI
|
||||||
if(have_teletext)
|
if(have_teletext)
|
||||||
videoDecoder->StartVBI(thisChannel->getTeletextPid());
|
videoDecoder->StartVBI(thisChannel->getTeletextPid());
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
playing = true;
|
playing = true;
|
||||||
|
|
||||||
@@ -2134,17 +2113,22 @@ bool CZapit::StopPlayBack(bool send_pmt)
|
|||||||
|
|
||||||
#if HAVE_AZBOX_HARDWARE
|
#if HAVE_AZBOX_HARDWARE
|
||||||
pcrDemux->Stop();
|
pcrDemux->Stop();
|
||||||
|
|
||||||
|
if (current_channel && current_channel->getVideoPid()) {
|
||||||
|
videoDemux->Stop();
|
||||||
|
videoDecoder->Stop(standby ? false : true);
|
||||||
|
}
|
||||||
audioDemux->Stop();
|
audioDemux->Stop();
|
||||||
videoDemux->Stop();
|
audioDecoder->Stop();
|
||||||
#else
|
#else
|
||||||
videoDemux->Stop();
|
videoDemux->Stop();
|
||||||
audioDemux->Stop();
|
audioDemux->Stop();
|
||||||
pcrDemux->Stop();
|
pcrDemux->Stop();
|
||||||
#endif
|
|
||||||
audioDecoder->Stop();
|
audioDecoder->Stop();
|
||||||
|
|
||||||
/* hack. if standby, dont blank video -> for paused timeshift */
|
/* hack. if standby, dont blank video -> for paused timeshift */
|
||||||
videoDecoder->Stop(standby ? false : true);
|
videoDecoder->Stop(standby ? false : true);
|
||||||
|
#endif
|
||||||
#ifdef USE_VBI
|
#ifdef USE_VBI
|
||||||
videoDecoder->StopVBI();
|
videoDecoder->StopVBI();
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user