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 fcbd0fe283
commit a4fb6e8317
7 changed files with 50 additions and 11 deletions

View File

@ -1,6 +1,9 @@
VDR Plugin 'streamdev' Revision History VDR Plugin 'streamdev' Revision History
--------------------------------------- ---------------------------------------
- return value of streamdev-clients cDevice::NumProvidedSystems() now
configurable in plugin setup
2011-02-11: Version 0.5.1 2011-02-11: Version 0.5.1
- updated copy of GetClippedNumProvidedSystems to the version used since - updated copy of GetClippedNumProvidedSystems to the version used since

34
README
View File

@ -371,15 +371,31 @@ With "Filter Streaming" enabled, the client will receive meta information like
EPG data and service information, just as if the client had its own DVB card. EPG data and service information, just as if the client had its own DVB card.
Link channels and even a client-side EPG scan have been reported to work. Link channels and even a client-side EPG scan have been reported to work.
Finally with the maximum and minimum priority, you can keep VDR from considering With maximum and minimum priority you can keep VDR from considering streamdev
streamdev in certain cases. If for instance you have a streamdev client with its in certain cases. If for instance you have a streamdev client with its own DVB
own DVB card, VDR would normally use streamdev for recording. If this is not card, VDR might use streamdev for recording. If this is not what you want, you
what you want, you could set the maximum priority to 0. As recordings usually could set the maximum priority to 0. As recordings usually have a much higher
have a much higher priority (default 50), streamdev is now no longer used for priority (default 50), streamdev is now no longer used for recordings. The two
recordings. The two parameters define the inclusive range of priorities for parameters define the inclusive range of priorities for which streamdev will
which streamdev will accept to tune. Setting the minimum priority to a higher accept to tune. Setting the minimum priority to a higher value than the maximum,
value than the maximum, you will get two ranges: "up to maximum" and "minimum you will get two ranges: "up to maximum" and "minimum and above".
and above".
If you are running at least VDR 1.7.0, you can also configure the "Broadcast
Systems / Cost" of the streamdev-client device. On a pure streamdev-client only
system it doesn't matter what you configure here. But if your client is equipped
with a DVB card, you should read on. VDR always prefers the cheapest device
in terms of supported broadcast systems and modulations. A DVB-S2 card supports
two broadcast systems (DVB-S and DVB-S2). From VDR 1.7.15 on, the supported
modulations are counted as well (QPSK, QAM32/64/128/256, VSB8/16, TURBO_FEC).
So for a DVB-S2 card which does QPSK you'll get a total cost of three. A DVB-C
card (one broadcast system) which can do QAM32,QAM64,QAM128,QAM256 would give
you a total of five. Check your log for "frontend ... provides ... with ..."
messages to find out the cost of your DVB cards. Then pick a suitable value for
streamdev-client. With equal costs, VDR will usually prefer the DVB card and
take streamdev for recordings. If streamdev's costs are higher, live TV will
use your DVB card until a recordings kicks in. Then the recording will take the
DVB card and live TV will be shifted to streamdev (you'll notice a short
interruption of live TV).
Note that streamdev-client acts similar to a DVB card. It is possible to receive Note that streamdev-client acts similar to a DVB card. It is possible to receive
multiple channels simultaneously, but only from the same transponder. Just add multiple channels simultaneously, but only from the same transponder. Just add

View File

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

View File

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

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: streamdev 0.5.0\n" "Project-Id-Version: streamdev 0.5.0\n"
"Report-Msgid-Bugs-To: <http://www.vdr-developer.org/mantisbt/>\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" "PO-Revision-Date: 2008-03-30 02:11+0200\n"
"Last-Translator: Frank Schmirler <vdrdev@schmirler.de>\n" "Last-Translator: Frank Schmirler <vdrdev@schmirler.de>\n"
"Language-Team: <vdr@linuxtv.org>\n" "Language-Team: <vdr@linuxtv.org>\n"
@ -48,3 +48,5 @@ msgstr "Minimale Priorit
msgid "Maximum Priority" msgid "Maximum Priority"
msgstr "Maximale Priorität" msgstr "Maximale Priorität"
msgid "Broadcast Systems / Cost"
msgstr "Empfangssysteme / Kosten"

View File

@ -16,6 +16,9 @@ cStreamdevClientSetup::cStreamdevClientSetup(void) {
HideMenuEntry = false; HideMenuEntry = false;
MinPriority = -1; MinPriority = -1;
MaxPriority = MAXPRIORITY; MaxPriority = MAXPRIORITY;
#if APIVERSNUM >= 10700
NumProvidedSystems = 1;
#endif
strcpy(RemoteIp, ""); 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, "HideMenuEntry") == 0) HideMenuEntry = atoi(Value);
else if (strcmp(Name, "MinPriority") == 0) MinPriority = atoi(Value); else if (strcmp(Name, "MinPriority") == 0) MinPriority = atoi(Value);
else if (strcmp(Name, "MaxPriority") == 0) MaxPriority = atoi(Value); else if (strcmp(Name, "MaxPriority") == 0) MaxPriority = atoi(Value);
else if (strcmp(Name, "NumProvidedSystems") == 0) NumProvidedSystems = atoi(Value);
else return false; else return false;
return true; return true;
} }
@ -46,6 +50,11 @@ cStreamdevClientMenuSetupPage::cStreamdevClientMenuSetupPage(void) {
Add(new cMenuEditBoolItem(tr("Filter Streaming"), &m_NewSetup.StreamFilters)); Add(new cMenuEditBoolItem(tr("Filter Streaming"), &m_NewSetup.StreamFilters));
Add(new cMenuEditIntItem (tr("Minimum Priority"), &m_NewSetup.MinPriority, -1, MAXPRIORITY)); Add(new cMenuEditIntItem (tr("Minimum Priority"), &m_NewSetup.MinPriority, -1, MAXPRIORITY));
Add(new cMenuEditIntItem (tr("Maximum Priority"), &m_NewSetup.MaxPriority, -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)); SetCurrent(Get(0));
} }
@ -68,6 +77,7 @@ void cStreamdevClientMenuSetupPage::Store(void) {
SetupStore("HideMenuEntry", m_NewSetup.HideMenuEntry); SetupStore("HideMenuEntry", m_NewSetup.HideMenuEntry);
SetupStore("MinPriority", m_NewSetup.MinPriority); SetupStore("MinPriority", m_NewSetup.MinPriority);
SetupStore("MaxPriority", m_NewSetup.MaxPriority); SetupStore("MaxPriority", m_NewSetup.MaxPriority);
SetupStore("NumProvidedSystems", m_NewSetup.NumProvidedSystems);
StreamdevClientSetup = m_NewSetup; StreamdevClientSetup = m_NewSetup;

View File

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