From 899db538457f37269c197c093f3121ae808b90d5 Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Sun, 6 Jun 2010 20:36:58 +0300 Subject: [PATCH] Updated for vdr-1.7.15. --- HISTORY | 4 ++-- iptv.c | 4 ++-- pidscanner.c | 13 ++++++++++--- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/HISTORY b/HISTORY index 142e3ad..40ae535 100644 --- a/HISTORY +++ b/HISTORY @@ -138,6 +138,6 @@ VDR Plugin 'iptv' Revision History - Fixed channel parameter corruption. - Added Dutch translation (Thanks to Carel). -2010-xx-xx: Version 0.4.2 +2010-06-06: Version 0.4.2 -- Updated for vdr-1.7.14. +- Updated for vdr-1.7.15. diff --git a/iptv.c b/iptv.c index 9067e7b..428d75f 100644 --- a/iptv.c +++ b/iptv.c @@ -12,8 +12,8 @@ #include "setup.h" #include "device.h" -#if defined(APIVERSNUM) && APIVERSNUM < 10714 -#error "VDR-1.7.14 API version or greater is required!" +#if defined(APIVERSNUM) && APIVERSNUM < 10715 +#error "VDR-1.7.15 API version or greater is required!" #endif static const char VERSION[] = "0.4.2"; diff --git a/pidscanner.c b/pidscanner.c index bf39a77..9993fc2 100644 --- a/pidscanner.c +++ b/pidscanner.c @@ -122,7 +122,9 @@ void cPidScanner::Process(const uint8_t* buf) cChannel *IptvChannel = Channels.GetByChannelID(channel.GetChannelID()); if (IptvChannel) { int Apids[MAXAPIDS + 1] = { 0 }; // these lists are zero-terminated + int Atypes[MAXAPIDS + 1] = { 0 }; int Dpids[MAXDPIDS + 1] = { 0 }; + int Dtypes[MAXDPIDS + 1] = { 0 }; int Spids[MAXSPIDS + 1] = { 0 }; char ALangs[MAXAPIDS][MAXLANGCODE2] = { "" }; char DLangs[MAXDPIDS][MAXLANGCODE2] = { "" }; @@ -136,18 +138,23 @@ void cPidScanner::Process(const uint8_t* buf) Apid = 0; // No detected audio pid for (unsigned int i = 1; i < MAXAPIDS; ++i) { Apids[i] = IptvChannel->Apid(i); + Atypes[i] = IptvChannel->Atype(i); if (Apids[i] && (Apids[i] == Apid)) foundApid = true; } - if (!foundApid) + if (!foundApid) { Apids[0] = Apid; - for (unsigned int i = 0; i < MAXDPIDS; ++i) + Atypes[0] = 4; + } + for (unsigned int i = 0; i < MAXDPIDS; ++i) { Dpids[i] = IptvChannel->Dpid(i); + Dtypes[i] = IptvChannel->Dtype(i); + } for (unsigned int i = 0; i < MAXSPIDS; ++i) Spids[i] = IptvChannel->Spid(i); debug("cPidScanner::Process(): Vpid=0x%04X, Apid=0x%04X\n", Vpid, Apid); int Vtype = IptvChannel->Vtype(); - IptvChannel->SetPids(Vpid, Ppid, Vtype, Apids, ALangs, Dpids, DLangs, Spids, SLangs, Tpid); + IptvChannel->SetPids(Vpid, Ppid, Vtype, Apids, Atypes, ALangs, Dpids, Dtypes, DLangs, Spids, SLangs, Tpid); } Channels.Unlock(); process = false;