mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed triggering the PAT filter
This commit is contained in:
parent
6c5a448dec
commit
8c7d387e86
1
HISTORY
1
HISTORY
@ -9733,3 +9733,4 @@ Video Disk Recorder Revision History
|
|||||||
compared case insensitive.
|
compared case insensitive.
|
||||||
- Improved responsiveness in cSectionHandler::Action() (thanks to Helmut Binder).
|
- Improved responsiveness in cSectionHandler::Action() (thanks to Helmut Binder).
|
||||||
- Fixed deleting the edited recording in case of an error (reported by Christoph Haubrich).
|
- Fixed deleting the edited recording in case of an error (reported by Christoph Haubrich).
|
||||||
|
- Fixed triggering the PAT filter.
|
||||||
|
13
pat.c
13
pat.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: pat.c 5.3 2021/06/11 09:38:38 kls Exp $
|
* $Id: pat.c 5.4 2021/06/21 20:13:55 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pat.h"
|
#include "pat.h"
|
||||||
@ -401,15 +401,8 @@ void cPatFilter::Trigger(int)
|
|||||||
{
|
{
|
||||||
cMutexLock MutexLock(&mutex);
|
cMutexLock MutexLock(&mutex);
|
||||||
DBGLOG("PAT filter trigger");
|
DBGLOG("PAT filter trigger");
|
||||||
if (activePmt != pmtPidList.First()) {
|
patVersion = -1;
|
||||||
if (activePmt && activePmt->Count() == 0)
|
sectionSyncer.Reset();
|
||||||
activePmt->SetState(-1);
|
|
||||||
activePmt = pmtPidList.First();
|
|
||||||
if (activePmt && activePmt->Count() == 0) {
|
|
||||||
activePmt->SetState(1);
|
|
||||||
timer.Set(PMT_SCAN_TIMEOUT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cPatFilter::Request(int Sid)
|
void cPatFilter::Request(int Sid)
|
||||||
|
4
pat.h
4
pat.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: pat.h 5.2 2021/06/11 09:38:38 kls Exp $
|
* $Id: pat.h 5.3 2021/06/21 20:13:55 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __PAT_H
|
#ifndef __PAT_H
|
||||||
@ -41,7 +41,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
cPatFilter(void);
|
cPatFilter(void);
|
||||||
virtual void SetStatus(bool On);
|
virtual void SetStatus(bool On);
|
||||||
void Trigger(int); // triggers reading the PMT PIDs that are currently not requested (dummy parameter for backwards compatibility, value is ignored)
|
void Trigger(int = 0); // triggers reading the PMT PIDs that are currently not requested (dummy parameter for backwards compatibility, value is ignored)
|
||||||
void Request(int Sid); // requests permanent reading of the PMT PID for this SID
|
void Request(int Sid); // requests permanent reading of the PMT PID for this SID
|
||||||
void Release(int Sid); // releases permanent reading of the PMT PID for this SID
|
void Release(int Sid); // releases permanent reading of the PMT PID for this SID
|
||||||
};
|
};
|
||||||
|
9
sdt.c
9
sdt.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: sdt.c 5.1 2021/03/16 15:10:54 kls Exp $
|
* $Id: sdt.c 5.2 2021/06/21 20:13:55 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sdt.h"
|
#include "sdt.h"
|
||||||
@ -90,6 +90,7 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|||||||
return;
|
return;
|
||||||
dbgsdt("SDT: %2d %2d %2d %s %d\n", sdt.getVersionNumber(), sdt.getSectionNumber(), sdt.getLastSectionNumber(), *cSource::ToString(source), Transponder());
|
dbgsdt("SDT: %2d %2d %2d %s %d\n", sdt.getVersionNumber(), sdt.getSectionNumber(), sdt.getLastSectionNumber(), *cSource::ToString(source), Transponder());
|
||||||
bool ChannelsModified = false;
|
bool ChannelsModified = false;
|
||||||
|
bool TriggerPat = false;
|
||||||
SI::SDT::Service SiSdtService;
|
SI::SDT::Service SiSdtService;
|
||||||
for (SI::Loop::Iterator it; sdt.serviceLoop.getNext(SiSdtService, it); ) {
|
for (SI::Loop::Iterator it; sdt.serviceLoop.getNext(SiSdtService, it); ) {
|
||||||
cChannel *Channel = Channels->GetByChannelID(tChannelID(source, sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId()));
|
cChannel *Channel = Channels->GetByChannelID(tChannelID(source, sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId()));
|
||||||
@ -152,7 +153,7 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|||||||
Channel = Channels->NewChannel(this->Channel(), pn, ps, pp, sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId());
|
Channel = Channels->NewChannel(this->Channel(), pn, ps, pp, sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId());
|
||||||
Channel->SetSource(source); // in case this comes from a satellite with a slightly different position
|
Channel->SetSource(source); // in case this comes from a satellite with a slightly different position
|
||||||
ChannelsModified = true;
|
ChannelsModified = true;
|
||||||
patFilter->Trigger(SiSdtService.getServiceId());
|
TriggerPat = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default: ;
|
default: ;
|
||||||
@ -178,8 +179,8 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|||||||
cChannel *link = Channels->GetByChannelID(tChannelID(source, Service.getOriginalNetworkId(), Service.getTransportStream(), Service.getServiceId()));
|
cChannel *link = Channels->GetByChannelID(tChannelID(source, Service.getOriginalNetworkId(), Service.getTransportStream(), Service.getServiceId()));
|
||||||
if (!link && Setup.UpdateChannels >= 4) {
|
if (!link && Setup.UpdateChannels >= 4) {
|
||||||
link = Channels->NewChannel(this->Channel(), "NVOD", "", "", Service.getOriginalNetworkId(), Service.getTransportStream(), Service.getServiceId());
|
link = Channels->NewChannel(this->Channel(), "NVOD", "", "", Service.getOriginalNetworkId(), Service.getTransportStream(), Service.getServiceId());
|
||||||
patFilter->Trigger(Service.getServiceId());
|
|
||||||
ChannelsModified = true;
|
ChannelsModified = true;
|
||||||
|
TriggerPat = true;
|
||||||
}
|
}
|
||||||
if (link) {
|
if (link) {
|
||||||
if (!LinkChannels)
|
if (!LinkChannels)
|
||||||
@ -201,6 +202,8 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|||||||
delete LinkChannels;
|
delete LinkChannels;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (TriggerPat)
|
||||||
|
patFilter->Trigger();
|
||||||
if (sectionSyncer.Processed(sdt.getSectionNumber(), sdt.getLastSectionNumber())) {
|
if (sectionSyncer.Processed(sdt.getSectionNumber(), sdt.getLastSectionNumber())) {
|
||||||
if (Setup.UpdateChannels == 1 || Setup.UpdateChannels >= 3) {
|
if (Setup.UpdateChannels == 1 || Setup.UpdateChannels >= 3) {
|
||||||
ChannelsModified |= Channels->MarkObsoleteChannels(source, sdt.getOriginalNetworkId(), sdt.getTransportStreamId());
|
ChannelsModified |= Channels->MarkObsoleteChannels(source, sdt.getOriginalNetworkId(), sdt.getTransportStreamId());
|
||||||
|
Loading…
Reference in New Issue
Block a user