diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-07-18 11:02:50 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-07-18 11:02:50 +0200 |
commit | bf9e7df743ca99edd590671810cd3cd0171bf158 (patch) | |
tree | ec7a90eddf12e21e12f17a9e06a388602a7ccfb3 /sdt.c | |
parent | 39ad1fe179b66bedb7662ad0443633b0a085316a (diff) | |
download | vdr-bf9e7df743ca99edd590671810cd3cd0171bf158.tar.gz vdr-bf9e7df743ca99edd590671810cd3cd0171bf158.tar.bz2 |
Experimental support for NVOD channels
Diffstat (limited to 'sdt.c')
-rw-r--r-- | sdt.c | 24 |
1 files changed, 20 insertions, 4 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: sdt.c 1.9 2004/06/06 14:25:22 kls Exp $ + * $Id: sdt.c 1.10 2004/07/18 10:58:01 kls Exp $ */ #include "sdt.h" @@ -46,6 +46,7 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length if (!channel) channel = Channels.GetByChannelID(tChannelID(Source(), 0, Transponder(), SiSdtService.getServiceId())); + cLinkChannels *LinkChannels = NULL; SI::Descriptor *d; for (SI::Loop::Iterator it2; (d = SiSdtService.serviceDescriptors.getNext(it2)); ) { switch (d->getDescriptorTag()) { @@ -54,8 +55,8 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length switch (sd->getServiceType()) { case 0x01: // digital television service case 0x02: // digital radio sound service - //XXX TODO case 0x04: // NVOD reference service - //XXX TODO case 0x05: // NVOD time-shifted service + case 0x04: // NVOD reference service + case 0x05: // NVOD time-shifted service { char NameBuf[1024]; char ShortNameBuf[1024]; @@ -102,7 +103,16 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length SI::NVODReferenceDescriptor *nrd = (SI::NVODReferenceDescriptor *)d; for (SI::Loop::Iterator it; nrd->serviceLoop.hasNext(it); ) { SI::NVODReferenceDescriptor::Service Service = nrd->serviceLoop.getNext(it); - //printf(" %04X-%04X-%04X\n", Service.getOriginalNetworkId(), Service.getTransportStream(), Service.getServiceId());//XXX TODO + cChannel *link = Channels.GetByChannelID(tChannelID(Source(), Service.getOriginalNetworkId(), Service.getTransportStream(), Service.getServiceId())); + if (!link && Setup.UpdateChannels >= 3) { + link = Channels.NewChannel(Channel(), "NVOD", Service.getOriginalNetworkId(), Service.getTransportStream(), Service.getServiceId()); + patFilter->Trigger(); + } + if (link) { + if (!LinkChannels) + LinkChannels = new cLinkChannels; + LinkChannels->Add(new cLinkChannel(link)); + } } } break; @@ -110,6 +120,12 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length } delete d; } + if (LinkChannels) { + if (channel) + channel->SetLinkChannels(LinkChannels); + else + delete LinkChannels; + } } Channels.Unlock(); } |