diff --git a/HISTORY b/HISTORY index 56af4e6..d8ed1ac 100644 --- a/HISTORY +++ b/HISTORY @@ -72,3 +72,7 @@ VDR Plugin 'iptv' Revision History - Fixed opening of fifo tap. - Updated iptvstream.sh script to support optional video resolution settings. - Optimized streamer thread termination. + +200x-xx-xx: Version 0.2.3 + +- Updated for vdr-1.7.2. diff --git a/iptv.c b/iptv.c index f61606b..d65586b 100644 --- a/iptv.c +++ b/iptv.c @@ -20,7 +20,7 @@ #error "VDR-1.6.0 API version or greater is required!" #endif -static const char VERSION[] = "0.2.2"; +static const char VERSION[] = "0.2.3"; static const char DESCRIPTION[] = trNOOP("Experience the IPTV"); class cPluginIptv : public cPlugin { diff --git a/patches/vdr-1.7.0-pluginparam.patch b/patches/vdr-1.7.2-pluginparam.patch similarity index 74% rename from patches/vdr-1.7.0-pluginparam.patch rename to patches/vdr-1.7.2-pluginparam.patch index 066a173..0de878f 100644 --- a/patches/vdr-1.7.0-pluginparam.patch +++ b/patches/vdr-1.7.2-pluginparam.patch @@ -1,15 +1,15 @@ -diff -Nru vdr-1.7.0-vanilla/channels.c vdr-1.7.0-pluginparam/channels.c ---- vdr-1.7.0-vanilla/channels.c 2008-04-12 16:49:12.000000000 +0300 -+++ vdr-1.7.0-pluginparam/channels.c 2008-04-13 18:58:41.000000000 +0300 -@@ -216,6 +216,7 @@ +diff -Nru vdr-1.7.2-vanilla/channels.c vdr-1.7.2-pluginparam/channels.c +--- vdr-1.7.2-vanilla/channels.c 2008-12-14 18:36:17.000000000 +0200 ++++ vdr-1.7.2-pluginparam/channels.c 2008-12-14 19:52:45.000000000 +0200 +@@ -188,6 +188,7 @@ shortName = strdup(""); provider = strdup(""); portalName = strdup(""); + pluginParam = strdup(""); memset(&__BeginData__, 0, (char *)&__EndData__ - (char *)&__BeginData__); - inversion = DVBFE_INVERSION_AUTO; - bandwidth = DVBFE_BANDWIDTH_AUTO; -@@ -241,6 +242,7 @@ + inversion = INVERSION_AUTO; + bandwidth = 8000000; +@@ -211,6 +212,7 @@ shortName = NULL; provider = NULL; portalName = NULL; @@ -17,7 +17,7 @@ diff -Nru vdr-1.7.0-vanilla/channels.c vdr-1.7.0-pluginparam/channels.c schedule = NULL; linkChannels = NULL; refChannel = NULL; -@@ -269,6 +271,7 @@ +@@ -239,6 +241,7 @@ free(shortName); free(provider); free(portalName); @@ -25,7 +25,7 @@ diff -Nru vdr-1.7.0-vanilla/channels.c vdr-1.7.0-pluginparam/channels.c } cChannel& cChannel::operator= (const cChannel &Channel) -@@ -277,6 +280,7 @@ +@@ -247,6 +250,7 @@ shortName = strcpyrealloc(shortName, Channel.shortName); provider = strcpyrealloc(provider, Channel.provider); portalName = strcpyrealloc(portalName, Channel.portalName); @@ -33,9 +33,9 @@ diff -Nru vdr-1.7.0-vanilla/channels.c vdr-1.7.0-pluginparam/channels.c memcpy(&__BeginData__, &Channel.__BeginData__, (char *)&Channel.__EndData__ - (char *)&Channel.__BeginData__); return *this; } -@@ -338,9 +342,26 @@ - alpha = Channel->alpha; - priority = Channel->priority; +@@ -306,9 +310,26 @@ + guard = Channel->guard; + hierarchy = Channel->hierarchy; rollOff = Channel->rollOff; + if (IsPlug()) pluginParam = strcpyrealloc(pluginParam, Channel->pluginParam); } @@ -60,7 +60,7 @@ diff -Nru vdr-1.7.0-vanilla/channels.c vdr-1.7.0-pluginparam/channels.c bool cChannel::SetSatTransponderData(int Source, int Frequency, char Polarization, int Srate, int CoderateH, int Modulation, int System, int RollOff) { // Workarounds for broadcaster stupidity: -@@ -472,6 +493,18 @@ +@@ -438,6 +459,18 @@ } } @@ -79,7 +79,7 @@ diff -Nru vdr-1.7.0-vanilla/channels.c vdr-1.7.0-pluginparam/channels.c #define STRDIFF 0x01 #define VALDIFF 0x02 -@@ -665,7 +698,7 @@ +@@ -632,7 +665,7 @@ if (isdigit(type)) type = 'S'; #define ST(s) if (strchr(s, type)) @@ -88,7 +88,7 @@ diff -Nru vdr-1.7.0-vanilla/channels.c vdr-1.7.0-pluginparam/channels.c char *q = buffer; *q = 0; ST(" S ") q += sprintf(q, "%c", polarization); -@@ -681,6 +714,7 @@ +@@ -646,6 +679,7 @@ ST(" S ") q += PrintParameter(q, 'S', MapToUser(system, SystemValues)); ST(" T") q += PrintParameter(q, 'T', MapToUser(transmission, TransmissionValues)); ST(" T") q += PrintParameter(q, 'Y', MapToUser(hierarchy, HierarchyValues)); @@ -96,25 +96,25 @@ diff -Nru vdr-1.7.0-vanilla/channels.c vdr-1.7.0-pluginparam/channels.c return buffer; } -@@ -702,7 +736,7 @@ +@@ -674,7 +708,7 @@ bool cChannel::StringToParameters(const char *s) { - while (s && *s) { + while (s && *s && !IsPlug()) { switch (toupper(*s)) { - case 'A': s = ParseParameter(s, alpha, AlphaValues); break; + case 'A': s = SkipDigits(s); break; // for compatibility with the "multiproto" approach - may be removed in future versions case 'B': s = ParseParameter(s, bandwidth, BandwidthValues); break; -@@ -817,7 +851,7 @@ +@@ -792,7 +826,7 @@ dpids[0] = 0; ok = false; if (parambuf && sourcebuf && vpidbuf && apidbuf) { - ok = StringToParameters(parambuf) && (source = cSource::FromString(sourcebuf)) >= 0; + ok = ((source = cSource::FromString(sourcebuf)) >= 0) && StringToParameters(parambuf); - char *p = strchr(vpidbuf, '+'); - if (p) -@@ -908,6 +942,7 @@ + char *p; + if ((p = strchr(vpidbuf, '=')) != NULL) { +@@ -887,6 +921,7 @@ shortName = strcpyrealloc(shortName, p); } name = strcpyrealloc(name, namebuf); @@ -122,10 +122,10 @@ diff -Nru vdr-1.7.0-vanilla/channels.c vdr-1.7.0-pluginparam/channels.c free(parambuf); free(sourcebuf); -diff -Nru vdr-1.7.0-vanilla/channels.h vdr-1.7.0-pluginparam/channels.h ---- vdr-1.7.0-vanilla/channels.h 2008-04-12 16:46:50.000000000 +0300 -+++ vdr-1.7.0-pluginparam/channels.h 2008-04-13 18:57:08.000000000 +0300 -@@ -118,6 +118,7 @@ +diff -Nru vdr-1.7.2-vanilla/channels.h vdr-1.7.2-pluginparam/channels.h +--- vdr-1.7.2-vanilla/channels.h 2008-12-14 18:36:17.000000000 +0200 ++++ vdr-1.7.2-pluginparam/channels.h 2008-12-14 19:53:44.000000000 +0200 +@@ -116,6 +116,7 @@ char *shortName; char *provider; char *portalName; @@ -133,7 +133,7 @@ diff -Nru vdr-1.7.0-vanilla/channels.h vdr-1.7.0-pluginparam/channels.h int __BeginData__; int frequency; // MHz int source; -@@ -174,6 +175,7 @@ +@@ -171,6 +172,7 @@ int Frequency(void) const { return frequency; } ///< Returns the actual frequency, as given in 'channels.conf' int Transponder(void) const; ///< Returns the transponder frequency in MHz, plus the polarization in case of sat static int Transponder(int Frequency, char Polarization); ///< builds the transponder from the given Frequency and Polarization @@ -141,7 +141,7 @@ diff -Nru vdr-1.7.0-vanilla/channels.h vdr-1.7.0-pluginparam/channels.h int Source(void) const { return source; } int Srate(void) const { return srate; } int Vpid(void) const { return vpid; } -@@ -212,6 +214,7 @@ +@@ -208,6 +210,7 @@ int RollOff(void) const { return rollOff; } const cLinkChannels* LinkChannels(void) const { return linkChannels; } const cChannel *RefChannel(void) const { return refChannel; } @@ -149,24 +149,24 @@ diff -Nru vdr-1.7.0-vanilla/channels.h vdr-1.7.0-pluginparam/channels.h bool IsCable(void) const { return cSource::IsCable(source); } bool IsSat(void) const { return cSource::IsSat(source); } bool IsTerr(void) const { return cSource::IsTerr(source); } -@@ -219,12 +222,14 @@ +@@ -215,12 +218,14 @@ bool HasTimer(void) const; int Modification(int Mask = CHANNELMOD_ALL); void CopyTransponderData(const cChannel *Channel); + bool SetPlugTransponderData(int Source, int Frequency, const char *PluginParam); bool SetSatTransponderData(int Source, int Frequency, char Polarization, int Srate, int CoderateH, int Modulation, int System, int RollOff); bool SetCableTransponderData(int Source, int Frequency, int Modulation, int Srate, int CoderateH); - bool SetTerrTransponderData(int Source, int Frequency, int Bandwidth, int Modulation, int Hierarchy, int CodeRateH, int CodeRateL, int Guard, int Transmission, int Alpha, int Priority); + bool SetTerrTransponderData(int Source, int Frequency, int Bandwidth, int Modulation, int Hierarchy, int CodeRateH, int CodeRateL, int Guard, int Transmission); void SetId(int Nid, int Tid, int Sid, int Rid = 0); void SetName(const char *Name, const char *ShortName, const char *Provider); void SetPortalName(const char *PortalName); + void SetPluginParam(const char *PluginParam); - void SetPids(int Vpid, int Ppid, int *Apids, char ALangs[][MAXLANGCODE2], int *Dpids, char DLangs[][MAXLANGCODE2], int *Spids, char SLangs[][MAXLANGCODE2], int Tpid); + void SetPids(int Vpid, int Ppid, int Vtype, int *Apids, char ALangs[][MAXLANGCODE2], int *Dpids, char DLangs[][MAXLANGCODE2], int *Spids, char SLangs[][MAXLANGCODE2], int Tpid); void SetCaIds(const int *CaIds); // list must be zero-terminated void SetCaDescriptors(int Level); -diff -Nru vdr-1.7.0-vanilla/config.h vdr-1.7.0-pluginparam/config.h ---- vdr-1.7.0-vanilla/config.h 2008-04-12 16:02:10.000000000 +0300 -+++ vdr-1.7.0-pluginparam/config.h 2008-04-13 18:54:25.000000000 +0300 +diff -Nru vdr-1.7.2-vanilla/config.h vdr-1.7.2-pluginparam/config.h +--- vdr-1.7.2-vanilla/config.h 2008-12-14 18:36:17.000000000 +0200 ++++ vdr-1.7.2-pluginparam/config.h 2008-12-14 19:52:45.000000000 +0200 @@ -30,6 +30,8 @@ #define APIVERSION "1.7.0" #define APIVERSNUM 10700 // Version * 10000 + Major * 100 + Minor @@ -176,9 +176,9 @@ diff -Nru vdr-1.7.0-vanilla/config.h vdr-1.7.0-pluginparam/config.h // When loading plugins, VDR searches them by their APIVERSION, which // may be smaller than VDRVERSION in case there have been no changes to // VDR header files since the last APIVERSION. This allows compiled -diff -Nru vdr-1.7.0-vanilla/menu.c vdr-1.7.0-pluginparam/menu.c ---- vdr-1.7.0-vanilla/menu.c 2008-04-12 14:37:17.000000000 +0300 -+++ vdr-1.7.0-pluginparam/menu.c 2008-04-13 18:56:07.000000000 +0300 +diff -Nru vdr-1.7.2-vanilla/menu.c vdr-1.7.2-pluginparam/menu.c +--- vdr-1.7.2-vanilla/menu.c 2008-12-14 18:36:17.000000000 +0200 ++++ vdr-1.7.2-pluginparam/menu.c 2008-12-14 19:52:45.000000000 +0200 @@ -189,6 +189,7 @@ cChannel *channel; cChannel data; @@ -195,15 +195,15 @@ diff -Nru vdr-1.7.0-vanilla/menu.c vdr-1.7.0-pluginparam/menu.c Add(new cMenuEditStrItem( tr("Name"), name, sizeof(name))); Add(new cMenuEditSrcItem( tr("Source"), &data.source)); Add(new cMenuEditIntItem( tr("Frequency"), &data.frequency)); -@@ -255,6 +257,7 @@ - ST(" T") Add(new cMenuEditMapItem( tr("Alpha"), &data.alpha, AlphaValues)); - ST(" T") Add(new cMenuEditMapItem( tr("Priority"), &data.priority, PriorityValues)); +@@ -253,6 +255,7 @@ + ST(" T") Add(new cMenuEditMapItem( tr("Guard"), &data.guard, GuardValues)); + ST(" T") Add(new cMenuEditMapItem( tr("Hierarchy"), &data.hierarchy, HierarchyValues)); ST(" S ") Add(new cMenuEditMapItem( tr("Rolloff"), &data.rollOff, RollOffValues)); + ST("P ") Add(new cMenuEditStrItem( tr("Parameters"), pluginParam, sizeof(pluginParam), tr(FileNameChars))); SetCurrent(Get(current)); Display(); -@@ -269,6 +272,7 @@ +@@ -267,6 +270,7 @@ if (Key == kOk) { if (Channels.HasUniqueChannelID(&data, channel)) { data.name = strcpyrealloc(data.name, name); @@ -211,29 +211,29 @@ diff -Nru vdr-1.7.0-vanilla/menu.c vdr-1.7.0-pluginparam/menu.c if (channel) { *channel = data; isyslog("edited channel %d %s", channel->Number(), *data.ToText()); -diff -Nru vdr-1.7.0-vanilla/po/fi_FI.po vdr-1.7.0-pluginparam/po/fi_FI.po ---- vdr-1.7.0-vanilla/po/fi_FI.po 2008-04-13 17:16:58.000000000 +0300 -+++ vdr-1.7.0-pluginparam/po/fi_FI.po 2008-04-13 18:54:25.000000000 +0300 -@@ -1019,3 +1019,6 @@ +diff -Nru vdr-1.7.2-vanilla/po/fi_FI.po vdr-1.7.2-pluginparam/po/fi_FI.po +--- vdr-1.7.2-vanilla/po/fi_FI.po 2008-12-14 18:36:17.000000000 +0200 ++++ vdr-1.7.2-pluginparam/po/fi_FI.po 2008-12-14 19:52:45.000000000 +0200 +@@ -1010,3 +1010,6 @@ #, c-format msgid "VDR will shut down in %s minutes" msgstr "VDR sammuu %s minuutin kuluttua" + +msgid "Parameters" +msgstr "Parametrit" -diff -Nru vdr-1.7.0-vanilla/po/fr_FR.po vdr-1.7.0-pluginparam/po/fr_FR.po ---- vdr-1.7.0-vanilla/po/fr_FR.po 2008-04-13 17:16:58.000000000 +0300 -+++ vdr-1.7.0-pluginparam/po/fr_FR.po 2008-04-13 18:54:25.000000000 +0300 -@@ -1022,3 +1022,6 @@ +diff -Nru vdr-1.7.2-vanilla/po/fr_FR.po vdr-1.7.2-pluginparam/po/fr_FR.po +--- vdr-1.7.2-vanilla/po/fr_FR.po 2008-12-14 18:36:17.000000000 +0200 ++++ vdr-1.7.2-pluginparam/po/fr_FR.po 2008-12-14 19:52:45.000000000 +0200 +@@ -1013,3 +1013,6 @@ #, c-format msgid "VDR will shut down in %s minutes" msgstr "VDR s'arrêtera dans %s minutes" + +msgid "Parameters" +msgstr "Paramètres" -diff -Nru vdr-1.7.0-vanilla/sources.c vdr-1.7.0-pluginparam/sources.c ---- vdr-1.7.0-vanilla/sources.c 2008-02-10 16:07:26.000000000 +0200 -+++ vdr-1.7.0-pluginparam/sources.c 2008-04-13 18:54:25.000000000 +0300 +diff -Nru vdr-1.7.2-vanilla/sources.c vdr-1.7.2-pluginparam/sources.c +--- vdr-1.7.2-vanilla/sources.c 2008-12-14 18:36:17.000000000 +0200 ++++ vdr-1.7.2-pluginparam/sources.c 2008-12-14 19:52:45.000000000 +0200 @@ -37,6 +37,7 @@ char buffer[16]; char *q = buffer; @@ -250,10 +250,10 @@ diff -Nru vdr-1.7.0-vanilla/sources.c vdr-1.7.0-pluginparam/sources.c case 'C': type = stCable; break; case 'S': type = stSat; break; case 'T': type = stTerr; break; -diff -Nru vdr-1.7.0-vanilla/sources.conf vdr-1.7.0-pluginparam/sources.conf ---- vdr-1.7.0-vanilla/sources.conf 2007-02-17 18:15:13.000000000 +0200 -+++ vdr-1.7.0-pluginparam/sources.conf 2008-04-13 18:54:25.000000000 +0300 -@@ -188,3 +188,7 @@ +diff -Nru vdr-1.7.2-vanilla/sources.conf vdr-1.7.2-pluginparam/sources.conf +--- vdr-1.7.2-vanilla/sources.conf 2008-12-14 18:36:17.000000000 +0200 ++++ vdr-1.7.2-pluginparam/sources.conf 2008-12-14 19:52:45.000000000 +0200 +@@ -194,3 +194,7 @@ # Terrestrial T Terrestrial @@ -261,9 +261,9 @@ diff -Nru vdr-1.7.0-vanilla/sources.conf vdr-1.7.0-pluginparam/sources.conf +# Plugin + +P Plugin -diff -Nru vdr-1.7.0-vanilla/sources.h vdr-1.7.0-pluginparam/sources.h ---- vdr-1.7.0-vanilla/sources.h 2005-05-14 12:30:41.000000000 +0300 -+++ vdr-1.7.0-pluginparam/sources.h 2008-04-13 18:54:25.000000000 +0300 +diff -Nru vdr-1.7.2-vanilla/sources.h vdr-1.7.2-pluginparam/sources.h +--- vdr-1.7.2-vanilla/sources.h 2008-12-14 18:36:17.000000000 +0200 ++++ vdr-1.7.2-pluginparam/sources.h 2008-12-14 19:52:45.000000000 +0200 @@ -16,10 +16,11 @@ public: enum eSourceType { diff --git a/pidscanner.c b/pidscanner.c index 921add0..be268bb 100644 --- a/pidscanner.c +++ b/pidscanner.c @@ -145,7 +145,11 @@ void cPidScanner::Process(const uint8_t* buf) 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); +#if defined(APIVERSNUM) && APIVERSNUM >= 10700 + IptvChannel->SetPids(Vpid, Ppid, 0, Apids, ALangs, Dpids, DLangs, Spids, SLangs, Tpid); +#else IptvChannel->SetPids(Vpid, Ppid, Apids, ALangs, Dpids, DLangs, Spids, SLangs, Tpid); +#endif Channels.Unlock(); process = false; } diff --git a/setup.c b/setup.c index b9a1765..d643dce 100644 --- a/setup.c +++ b/setup.c @@ -34,7 +34,7 @@ private: eProtocolCount }; struct tIptvChannel { - int frequency, source, protocol, parameter, vpid, ppid, tpid, sid, nid, tid, rid; + int frequency, source, protocol, parameter, vpid, ppid, vtype, tpid, sid, nid, tid, rid; int apid[MAXAPIDS + 1], dpid[MAXDPIDS + 1], spid[MAXSPIDS + 1], caids[MAXCAIDS + 1]; int sidscan, pidscan; char name[256], location[256]; @@ -57,7 +57,7 @@ cIptvMenuEditChannel::cIptvMenuEditChannel(cChannel *Channel, bool New) protocols[eProtocolUDP] = tr("UDP"); protocols[eProtocolHTTP] = tr("HTTP"); protocols[eProtocolFILE] = tr("FILE"); - protocols[eProtocolEXT] = tr("EXT"); + protocols[eProtocolEXT] = tr("EXT"); channel = Channel; GetChannelData(channel); if (New) { @@ -127,6 +127,9 @@ void cIptvMenuEditChannel::GetChannelData(cChannel *Channel) data.source = Channel->Source(); data.vpid = Channel->Vpid(); data.ppid = Channel->Ppid(); +#if defined(APIVERSNUM) && APIVERSNUM >= 10700 + data.vtype = Channel->Vtype(); +#endif data.tpid = Channel->Tpid(); for (unsigned int i = 0; i < ARRAY_SIZE(data.apid); ++i) data.apid[i] = Channel->Apid(i); @@ -152,6 +155,7 @@ void cIptvMenuEditChannel::GetChannelData(cChannel *Channel) data.source = cSource::FromData(cSource::stPlug); data.vpid = 0; data.ppid = 0; + data.vtype = 0; data.tpid = 0; for (unsigned int i = 0; i < ARRAY_SIZE(data.apid); ++i) data.apid[i] = 0; @@ -196,7 +200,11 @@ void cIptvMenuEditChannel::SetChannelData(cChannel *Channel) break; } char slangs[MAXSPIDS][MAXLANGCODE2] = { "" }; +#if defined(APIVERSNUM) && APIVERSNUM >= 10700 + Channel->SetPids(data.vpid, data.ppid, data.vtype, data.apid, alangs, data.dpid, dlangs, data.spid, slangs, data.tpid); +#else Channel->SetPids(data.vpid, data.ppid, data.apid, alangs, data.dpid, dlangs, data.spid, slangs, data.tpid); +#endif Channel->SetCaIds(data.caids); Channel->SetId(data.nid, data.tid, data.sid, data.rid); Channel->SetName(data.name, "", "IPTV");