mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 13:37:03 +02:00
218 lines
9.8 KiB
Diff
218 lines
9.8 KiB
Diff
|
diff -Nru vdr-1.5.9-vanilla/channels.c vdr-1.5.9-iptv/channels.c
|
||
|
--- vdr-1.5.9-vanilla/channels.c 2007-08-26 18:45:20.000000000 +0300
|
||
|
+++ vdr-1.5.9-iptv/channels.c 2007-09-11 20:22:48.000000000 +0300
|
||
|
@@ -166,6 +166,7 @@
|
||
|
shortName = strdup("");
|
||
|
provider = strdup("");
|
||
|
portalName = strdup("");
|
||
|
+ param = strdup("");
|
||
|
memset(&__BeginData__, 0, (char *)&__EndData__ - (char *)&__BeginData__);
|
||
|
inversion = INVERSION_AUTO;
|
||
|
bandwidth = BANDWIDTH_AUTO;
|
||
|
@@ -187,6 +188,7 @@
|
||
|
shortName = NULL;
|
||
|
provider = NULL;
|
||
|
portalName = NULL;
|
||
|
+ param = NULL;
|
||
|
schedule = NULL;
|
||
|
linkChannels = NULL;
|
||
|
refChannel = NULL;
|
||
|
@@ -215,6 +217,7 @@
|
||
|
free(shortName);
|
||
|
free(provider);
|
||
|
free(portalName);
|
||
|
+ free(param);
|
||
|
}
|
||
|
|
||
|
cChannel& cChannel::operator= (const cChannel &Channel)
|
||
|
@@ -223,6 +226,7 @@
|
||
|
shortName = strcpyrealloc(shortName, Channel.shortName);
|
||
|
provider = strcpyrealloc(provider, Channel.provider);
|
||
|
portalName = strcpyrealloc(portalName, Channel.portalName);
|
||
|
+ param = strcpyrealloc(param, Channel.param);
|
||
|
memcpy(&__BeginData__, &Channel.__BeginData__, (char *)&Channel.__EndData__ - (char *)&Channel.__BeginData__);
|
||
|
return *this;
|
||
|
}
|
||
|
@@ -582,15 +586,16 @@
|
||
|
char buffer[64];
|
||
|
char *q = buffer;
|
||
|
*q = 0;
|
||
|
- ST(" S ") q += sprintf(q, "%c", polarization);
|
||
|
- ST("CST") q += PrintParameter(q, 'I', MapToUser(inversion, InversionValues));
|
||
|
- ST("CST") q += PrintParameter(q, 'C', MapToUser(coderateH, CoderateValues));
|
||
|
- ST(" T") q += PrintParameter(q, 'D', MapToUser(coderateL, CoderateValues));
|
||
|
- ST("C T") q += PrintParameter(q, 'M', MapToUser(modulation, ModulationValues));
|
||
|
- ST(" T") q += PrintParameter(q, 'B', MapToUser(bandwidth, BandwidthValues));
|
||
|
- ST(" T") q += PrintParameter(q, 'T', MapToUser(transmission, TransmissionValues));
|
||
|
- ST(" T") q += PrintParameter(q, 'G', MapToUser(guard, GuardValues));
|
||
|
- ST(" T") q += PrintParameter(q, 'Y', MapToUser(hierarchy, HierarchyValues));
|
||
|
+ ST(" S ") q += sprintf(q, "%c", polarization);
|
||
|
+ ST(" CST") q += PrintParameter(q, 'I', MapToUser(inversion, InversionValues));
|
||
|
+ ST(" CST") q += PrintParameter(q, 'C', MapToUser(coderateH, CoderateValues));
|
||
|
+ ST(" T") q += PrintParameter(q, 'D', MapToUser(coderateL, CoderateValues));
|
||
|
+ ST(" C T") q += PrintParameter(q, 'M', MapToUser(modulation, ModulationValues));
|
||
|
+ ST(" T") q += PrintParameter(q, 'B', MapToUser(bandwidth, BandwidthValues));
|
||
|
+ ST(" T") q += PrintParameter(q, 'T', MapToUser(transmission, TransmissionValues));
|
||
|
+ ST(" T") q += PrintParameter(q, 'G', MapToUser(guard, GuardValues));
|
||
|
+ ST(" T") q += PrintParameter(q, 'Y', MapToUser(hierarchy, HierarchyValues));
|
||
|
+ ST("P ") q += sprintf(q, "%s", param);
|
||
|
return buffer;
|
||
|
}
|
||
|
|
||
|
@@ -612,7 +617,7 @@
|
||
|
|
||
|
bool cChannel::StringToParameters(const char *s)
|
||
|
{
|
||
|
- while (s && *s) {
|
||
|
+ while (s && *s && IsPlug()) {
|
||
|
switch (toupper(*s)) {
|
||
|
case 'B': s = ParseParameter(s, bandwidth, BandwidthValues); break;
|
||
|
case 'C': s = ParseParameter(s, coderateH, CoderateValues); break;
|
||
|
@@ -813,6 +818,7 @@
|
||
|
shortName = strcpyrealloc(shortName, p);
|
||
|
}
|
||
|
name = strcpyrealloc(name, namebuf);
|
||
|
+ param = strcpyrealloc(param, parambuf);
|
||
|
|
||
|
free(parambuf);
|
||
|
free(sourcebuf);
|
||
|
diff -Nru vdr-1.5.9-vanilla/channels.h vdr-1.5.9-iptv/channels.h
|
||
|
--- vdr-1.5.9-vanilla/channels.h 2007-08-26 18:45:20.000000000 +0300
|
||
|
+++ vdr-1.5.9-iptv/channels.h 2007-09-11 20:22:48.000000000 +0300
|
||
|
@@ -114,6 +114,7 @@
|
||
|
char *shortName;
|
||
|
char *provider;
|
||
|
char *portalName;
|
||
|
+ char *param;
|
||
|
int __BeginData__;
|
||
|
int frequency; // MHz
|
||
|
int source;
|
||
|
@@ -165,6 +166,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
|
||
|
+ const char *Param(void) const { return param; }
|
||
|
int Source(void) const { return source; }
|
||
|
int Srate(void) const { return srate; }
|
||
|
int Vpid(void) const { return vpid; }
|
||
|
@@ -199,6 +201,7 @@
|
||
|
int Hierarchy(void) const { return hierarchy; }
|
||
|
const cLinkChannels* LinkChannels(void) const { return linkChannels; }
|
||
|
const cChannel *RefChannel(void) const { return refChannel; }
|
||
|
+ bool IsPlug(void) const { return cSource::IsPlug(source); }
|
||
|
bool IsCable(void) const { return cSource::IsCable(source); }
|
||
|
bool IsSat(void) const { return cSource::IsSat(source); }
|
||
|
bool IsTerr(void) const { return cSource::IsTerr(source); }
|
||
|
diff -Nru vdr-1.5.9-vanilla/menu.c vdr-1.5.9-iptv/menu.c
|
||
|
--- vdr-1.5.9-vanilla/menu.c 2007-08-26 18:45:20.000000000 +0300
|
||
|
+++ vdr-1.5.9-iptv/menu.c 2007-09-11 20:23:26.000000000 +0300
|
||
|
@@ -219,6 +219,7 @@
|
||
|
cChannel *channel;
|
||
|
cChannel data;
|
||
|
char name[256];
|
||
|
+ char param[256];
|
||
|
void Setup(void);
|
||
|
public:
|
||
|
cMenuEditChannel(cChannel *Channel, bool New = false);
|
||
|
@@ -251,6 +252,7 @@
|
||
|
|
||
|
// Parameters for all types of sources:
|
||
|
strn0cpy(name, data.name, sizeof(name));
|
||
|
+ strn0cpy(param, data.param, sizeof(param));
|
||
|
Add(new cMenuEditStrItem( tr("Name"), name, sizeof(name), tr(FileNameChars)));
|
||
|
Add(new cMenuEditSrcItem( tr("Source"), &data.source));
|
||
|
Add(new cMenuEditIntItem( tr("Frequency"), &data.frequency));
|
||
|
@@ -269,16 +271,17 @@
|
||
|
Add(new cMenuEditIntItem( tr("Rid"), &data.rid, 0));
|
||
|
XXX*/
|
||
|
// Parameters for specific types of sources:
|
||
|
- ST(" S ") Add(new cMenuEditChrItem( tr("Polarization"), &data.polarization, "hvlr"));
|
||
|
- ST("CS ") Add(new cMenuEditIntItem( tr("Srate"), &data.srate));
|
||
|
- ST("CST") Add(new cMenuEditMapItem( tr("Inversion"), &data.inversion, InversionValues, tr("off")));
|
||
|
- ST("CST") Add(new cMenuEditMapItem( tr("CoderateH"), &data.coderateH, CoderateValues, tr("none")));
|
||
|
- ST(" T") Add(new cMenuEditMapItem( tr("CoderateL"), &data.coderateL, CoderateValues, tr("none")));
|
||
|
- ST("C T") Add(new cMenuEditMapItem( tr("Modulation"), &data.modulation, ModulationValues, "QPSK"));
|
||
|
- ST(" T") Add(new cMenuEditMapItem( tr("Bandwidth"), &data.bandwidth, BandwidthValues));
|
||
|
- ST(" T") Add(new cMenuEditMapItem( tr("Transmission"), &data.transmission, TransmissionValues));
|
||
|
- ST(" T") Add(new cMenuEditMapItem( tr("Guard"), &data.guard, GuardValues));
|
||
|
- ST(" T") Add(new cMenuEditMapItem( tr("Hierarchy"), &data.hierarchy, HierarchyValues, tr("none")));
|
||
|
+ ST(" S ") Add(new cMenuEditChrItem( tr("Polarization"), &data.polarization, "hvlr"));
|
||
|
+ ST(" CS ") Add(new cMenuEditIntItem( tr("Srate"), &data.srate));
|
||
|
+ ST(" CST") Add(new cMenuEditMapItem( tr("Inversion"), &data.inversion, InversionValues, tr("off")));
|
||
|
+ ST(" CST") Add(new cMenuEditMapItem( tr("CoderateH"), &data.coderateH, CoderateValues, tr("none")));
|
||
|
+ ST(" T") Add(new cMenuEditMapItem( tr("CoderateL"), &data.coderateL, CoderateValues, tr("none")));
|
||
|
+ ST(" C T") Add(new cMenuEditMapItem( tr("Modulation"), &data.modulation, ModulationValues, "QPSK"));
|
||
|
+ ST(" T") Add(new cMenuEditMapItem( tr("Bandwidth"), &data.bandwidth, BandwidthValues));
|
||
|
+ ST(" T") Add(new cMenuEditMapItem( tr("Transmission"), &data.transmission, TransmissionValues));
|
||
|
+ ST(" T") Add(new cMenuEditMapItem( tr("Guard"), &data.guard, GuardValues));
|
||
|
+ ST(" T") Add(new cMenuEditMapItem( tr("Hierarchy"), &data.hierarchy, HierarchyValues, tr("none")));
|
||
|
+ ST("P ") Add(new cMenuEditStrItem( tr("Parameters"), param, sizeof(param), tr(FileNameChars)));
|
||
|
|
||
|
SetCurrent(Get(current));
|
||
|
Display();
|
||
|
diff -Nru vdr-1.5.9-vanilla/po/fi_FI.po vdr-1.5.9-iptv/po/fi_FI.po
|
||
|
--- vdr-1.5.9-vanilla/po/fi_FI.po 2007-08-26 18:45:20.000000000 +0300
|
||
|
+++ vdr-1.5.9-iptv/po/fi_FI.po 2007-09-11 20:24:22.000000000 +0300
|
||
|
@@ -1271,3 +1271,7 @@
|
||
|
#, c-format
|
||
|
msgid "VDR will shut down in %s minutes"
|
||
|
msgstr "VDR sammuu %s minuutin kuluttua"
|
||
|
+
|
||
|
+#: menu.c:284
|
||
|
+msgid "Parameters"
|
||
|
+msgstr "Parametrit"
|
||
|
diff -Nru vdr-1.5.9-vanilla/sources.c vdr-1.5.9-iptv/sources.c
|
||
|
--- vdr-1.5.9-vanilla/sources.c 2007-08-26 18:45:20.000000000 +0300
|
||
|
+++ vdr-1.5.9-iptv/sources.c 2007-09-11 20:22:48.000000000 +0300
|
||
|
@@ -37,6 +37,7 @@
|
||
|
char buffer[16];
|
||
|
char *q = buffer;
|
||
|
switch (Code & st_Mask) {
|
||
|
+ case stPlug: *q++ = 'P'; break;
|
||
|
case stCable: *q++ = 'C'; break;
|
||
|
case stSat: *q++ = 'S';
|
||
|
{
|
||
|
@@ -56,6 +57,7 @@
|
||
|
{
|
||
|
int type = stNone;
|
||
|
switch (toupper(*s)) {
|
||
|
+ case 'P': type = stPlug; break;
|
||
|
case 'C': type = stCable; break;
|
||
|
case 'S': type = stSat; break;
|
||
|
case 'T': type = stTerr; break;
|
||
|
diff -Nru vdr-1.5.9-vanilla/sources.conf vdr-1.5.9-iptv/sources.conf
|
||
|
--- vdr-1.5.9-vanilla/sources.conf 2007-08-26 18:45:20.000000000 +0300
|
||
|
+++ vdr-1.5.9-iptv/sources.conf 2007-09-11 20:22:48.000000000 +0300
|
||
|
@@ -188,3 +188,7 @@
|
||
|
# Terrestrial
|
||
|
|
||
|
T Terrestrial
|
||
|
+
|
||
|
+# Plugin
|
||
|
+
|
||
|
+P Plugin
|
||
|
diff -Nru vdr-1.5.9-vanilla/sources.h vdr-1.5.9-iptv/sources.h
|
||
|
--- vdr-1.5.9-vanilla/sources.h 2007-08-26 18:45:20.000000000 +0300
|
||
|
+++ vdr-1.5.9-iptv/sources.h 2007-09-11 20:22:48.000000000 +0300
|
||
|
@@ -16,10 +16,11 @@
|
||
|
public:
|
||
|
enum eSourceType {
|
||
|
stNone = 0x0000,
|
||
|
+ stPlug = 0x2000,
|
||
|
stCable = 0x4000,
|
||
|
stSat = 0x8000,
|
||
|
stTerr = 0xC000,
|
||
|
- st_Mask = 0xC000,
|
||
|
+ st_Mask = 0xE000,
|
||
|
st_Neg = 0x0800,
|
||
|
st_Pos = 0x07FF,
|
||
|
};
|
||
|
@@ -35,6 +36,7 @@
|
||
|
static cString ToString(int Code);
|
||
|
static int FromString(const char *s);
|
||
|
static int FromData(eSourceType SourceType, int Position = 0, bool East = false);
|
||
|
+ static bool IsPlug(int Code) { return (Code & st_Mask) == stPlug; }
|
||
|
static bool IsCable(int Code) { return (Code & st_Mask) == stCable; }
|
||
|
static bool IsSat(int Code) { return (Code & st_Mask) == stSat; }
|
||
|
static bool IsTerr(int Code) { return (Code & st_Mask) == stTerr; }
|