summaryrefslogtreecommitdiff
path: root/sdt.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-10-31 12:53:00 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2004-10-31 12:53:00 +0100
commitfd9c2d298c0a8fb8e005b46a728841759b126430 (patch)
tree8fa5d8fad840999bcff071825419f5ba83fa56fb /sdt.c
parent5e731865a6e85e234b6a8daed9c671acaa21e6c1 (diff)
downloadvdr-fd9c2d298c0a8fb8e005b46a728841759b126430.tar.gz
vdr-fd9c2d298c0a8fb8e005b46a728841759b126430.tar.bz2
Now handling the channel name, short name and provider separately
Diffstat (limited to 'sdt.c')
-rw-r--r--sdt.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/sdt.c b/sdt.c
index 92d5a740..8bb70092 100644
--- a/sdt.c
+++ b/sdt.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: sdt.c 1.12 2004/10/16 10:02:23 kls Exp $
+ * $Id: sdt.c 1.13 2004/10/31 12:10:20 kls Exp $
*/
#include "sdt.h"
@@ -58,28 +58,16 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
{
char NameBuf[1024];
char ShortNameBuf[1024];
+ char ProviderNameBuf[1024];
sd->serviceName.getText(NameBuf, ShortNameBuf, sizeof(NameBuf), sizeof(ShortNameBuf));
char *pn = compactspace(NameBuf);
char *ps = compactspace(ShortNameBuf);
- if (*NameBuf && *ShortNameBuf && strcmp(NameBuf, ShortNameBuf) != 0) {
- ps = ShortNameBuf + strlen(ShortNameBuf);
- *ps++ = ',';
- strcpy(ps, NameBuf);
- pn = ShortNameBuf;
- }
- if (*pn) {
- char ProviderNameBuf[1024];
- sd->providerName.getText(ProviderNameBuf, sizeof(ProviderNameBuf));
- if (*ProviderNameBuf) {
- char *p = pn + strlen(pn);
- *p++ = ';';
- strcpy(p, ProviderNameBuf);
- }
- }
+ sd->providerName.getText(ProviderNameBuf, sizeof(ProviderNameBuf));
+ char *pp = compactspace(ProviderNameBuf);
if (channel) {
channel->SetId(sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId());
if (Setup.UpdateChannels >= 1)
- channel->SetName(pn);
+ channel->SetName(pn, ps, pp);
// Using SiSdtService.getFreeCaMode() is no good, because some
// tv stations set this flag even for non-encrypted channels :-(
// The special value 0xFFFF was supposed to mean "unknown encryption"
@@ -87,7 +75,7 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
// channel->SetCa(SiSdtService.getFreeCaMode() ? 0xFFFF : 0);
}
else if (*pn && Setup.UpdateChannels >= 3) {
- channel = Channels.NewChannel(Channel(), pn, sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId());
+ channel = Channels.NewChannel(Channel(), pn, ps, pp, sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId());
patFilter->Trigger();
}
}
@@ -112,7 +100,7 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
for (SI::Loop::Iterator it; nrd->serviceLoop.getNext(Service, it); ) {
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());
+ link = Channels.NewChannel(Channel(), "NVOD", "", "", Service.getOriginalNetworkId(), Service.getTransportStream(), Service.getServiceId());
patFilter->Trigger();
}
if (link) {