return value of streamdev-clients cDevice::NumProvidedSystems() now

configurable in plugin setup (fixes #552)
This commit is contained in:
Frank Schmirler
2011-02-16 08:57:05 +01:00
parent 30930d5c74
commit dc41eecffd
7 changed files with 50 additions and 11 deletions

View File

@@ -56,6 +56,11 @@ cStreamdevDevice::~cStreamdevDevice() {
DELETENULL(m_TSBuffer);
}
#if APIVERSNUM >= 10700
int cStreamdevDevice::NumProvidedSystems(void) const
{ return StreamdevClientSetup.NumProvidedSystems; }
#endif
bool cStreamdevDevice::ProvidesSource(int Source) const {
Dprintf("ProvidesSource, Source=%d\n", Source);
return true;

View File

@@ -56,7 +56,7 @@ public:
virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1,
bool *NeedsDetachReceivers = NULL) const;
#if APIVERSNUM >= 10700
virtual int NumProvidedSystems(void) const { return 1; }
virtual int NumProvidedSystems(void) const;
#endif
virtual bool IsTunedToTransponder(const cChannel *Channel);

View File

@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: streamdev 0.5.0\n"
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\n"
"POT-Creation-Date: 2010-06-14 13:05+0200\n"
"POT-Creation-Date: 2011-02-16 08:49+0100\n"
"PO-Revision-Date: 2008-03-30 02:11+0200\n"
"Last-Translator: Frank Schmirler <vdrdev@schmirler.de>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -48,3 +48,5 @@ msgstr "Minimale Priorit
msgid "Maximum Priority"
msgstr "Maximale Priorit<69>t"
msgid "Broadcast Systems / Cost"
msgstr "Empfangssysteme / Kosten"

View File

@@ -16,6 +16,9 @@ cStreamdevClientSetup::cStreamdevClientSetup(void) {
HideMenuEntry = false;
MinPriority = -1;
MaxPriority = MAXPRIORITY;
#if APIVERSNUM >= 10700
NumProvidedSystems = 1;
#endif
strcpy(RemoteIp, "");
}
@@ -32,6 +35,7 @@ bool cStreamdevClientSetup::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "HideMenuEntry") == 0) HideMenuEntry = atoi(Value);
else if (strcmp(Name, "MinPriority") == 0) MinPriority = atoi(Value);
else if (strcmp(Name, "MaxPriority") == 0) MaxPriority = atoi(Value);
else if (strcmp(Name, "NumProvidedSystems") == 0) NumProvidedSystems = atoi(Value);
else return false;
return true;
}
@@ -46,6 +50,11 @@ cStreamdevClientMenuSetupPage::cStreamdevClientMenuSetupPage(void) {
Add(new cMenuEditBoolItem(tr("Filter Streaming"), &m_NewSetup.StreamFilters));
Add(new cMenuEditIntItem (tr("Minimum Priority"), &m_NewSetup.MinPriority, -1, MAXPRIORITY));
Add(new cMenuEditIntItem (tr("Maximum Priority"), &m_NewSetup.MaxPriority, -1, MAXPRIORITY));
#if APIVERSNUM >= 10715
Add(new cMenuEditIntItem (tr("Broadcast Systems / Cost"), &m_NewSetup.NumProvidedSystems, 1, 15));
#elif APIVERSNUM >= 10700
Add(new cMenuEditIntItem (tr("Broadcast Systems / Cost"), &m_NewSetup.NumProvidedSystems, 1, 4));
#endif
SetCurrent(Get(0));
}
@@ -68,6 +77,7 @@ void cStreamdevClientMenuSetupPage::Store(void) {
SetupStore("HideMenuEntry", m_NewSetup.HideMenuEntry);
SetupStore("MinPriority", m_NewSetup.MinPriority);
SetupStore("MaxPriority", m_NewSetup.MaxPriority);
SetupStore("NumProvidedSystems", m_NewSetup.NumProvidedSystems);
StreamdevClientSetup = m_NewSetup;

View File

@@ -19,6 +19,9 @@ struct cStreamdevClientSetup {
int HideMenuEntry;
int MinPriority;
int MaxPriority;
#if APIVERSNUM >= 10700
int NumProvidedSystems;
#endif
};
extern cStreamdevClientSetup StreamdevClientSetup;