diff options
author | schmirl <schmirl> | 2009-01-29 07:48:58 +0000 |
---|---|---|
committer | schmirl <schmirl> | 2009-01-29 07:48:58 +0000 |
commit | 0e0b4b587d90efa7bbe8a37c707dda4c3e94aceb (patch) | |
tree | beba72db47e9d740d6bcb61d9b7662f754a4530a /client | |
parent | 9af6ceb00705470484c4b23cf71f9bb11d2af271 (diff) | |
download | vdr-plugin-streamdev-0e0b4b587d90efa7bbe8a37c707dda4c3e94aceb.tar.gz vdr-plugin-streamdev-0e0b4b587d90efa7bbe8a37c707dda4c3e94aceb.tar.bz2 |
Added min/max priority (#508)
Modified Files:
HISTORY README client/device.c client/setup.c client/setup.h
po/de_DE.po po/fi_FI.po po/fr_FR.po po/it_IT.po po/ru_RU.po
Diffstat (limited to 'client')
-rw-r--r-- | client/device.c | 15 | ||||
-rw-r--r-- | client/setup.c | 10 | ||||
-rw-r--r-- | client/setup.h | 4 |
3 files changed, 26 insertions, 3 deletions
diff --git a/client/device.c b/client/device.c index 4a2ccd1..9b0dfb5 100644 --- a/client/device.c +++ b/client/device.c @@ -1,5 +1,5 @@ /* - * $Id: device.c,v 1.21 2009/01/14 07:35:51 schmirl Exp $ + * $Id: device.c,v 1.22 2009/01/29 07:48:58 schmirl Exp $ */ #include "client/device.h" @@ -85,6 +85,19 @@ bool cStreamdevDevice::ProvidesChannel(const cChannel *Channel, int Priority, Dprintf("ProvidesChannel, Channel=%s, Prio=%d\n", Channel->Name(), Priority); + if (StreamdevClientSetup.MinPriority <= StreamdevClientSetup.MaxPriority) + { + if (Priority < StreamdevClientSetup.MinPriority || + Priority > StreamdevClientSetup.MaxPriority) + return false; + } + else + { + if (Priority < StreamdevClientSetup.MinPriority && + Priority > StreamdevClientSetup.MaxPriority) + return false; + } + if (ClientSocket.DataSocket(siLive) != NULL && TRANSPONDER(Channel, m_Channel)) res = true; diff --git a/client/setup.c b/client/setup.c index 6336154..46ad7af 100644 --- a/client/setup.c +++ b/client/setup.c @@ -1,5 +1,5 @@ /* - * $Id: setup.c,v 1.6 2008/04/08 14:18:16 schmirl Exp $ + * $Id: setup.c,v 1.7 2009/01/29 07:48:59 schmirl Exp $ */ #include <vdr/menuitems.h> @@ -15,6 +15,8 @@ cStreamdevClientSetup::cStreamdevClientSetup(void) { StreamFilters = false; SyncEPG = false; HideMenuEntry = false; + MinPriority = -1; + MaxPriority = MAXPRIORITY; strcpy(RemoteIp, ""); } @@ -30,6 +32,8 @@ bool cStreamdevClientSetup::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "StreamFilters") == 0) StreamFilters = atoi(Value); else if (strcmp(Name, "SyncEPG") == 0) SyncEPG = atoi(Value); else if (strcmp(Name, "HideMenuEntry") == 0) HideMenuEntry = atoi(Value); + else if (strcmp(Name, "MinPriority") == 0) HideMenuEntry = atoi(Value); + else if (strcmp(Name, "MaxPriority") == 0) HideMenuEntry = atoi(Value); else return false; return true; } @@ -43,6 +47,8 @@ cStreamdevClientMenuSetupPage::cStreamdevClientMenuSetupPage(void) { AddShortEdit(tr("Remote Port"), m_NewSetup.RemotePort); AddBoolEdit (tr("Filter Streaming"), m_NewSetup.StreamFilters); AddBoolEdit (tr("Synchronize EPG"), m_NewSetup.SyncEPG); + AddRangeEdit (tr("Minimum Priority"), m_NewSetup.MinPriority, -1, MAXPRIORITY); + AddRangeEdit (tr("Maximum Priority"), m_NewSetup.MaxPriority, -1, MAXPRIORITY); SetCurrent(Get(0)); } @@ -64,6 +70,8 @@ void cStreamdevClientMenuSetupPage::Store(void) { SetupStore("StreamFilters", m_NewSetup.StreamFilters); SetupStore("SyncEPG", m_NewSetup.SyncEPG); SetupStore("HideMenuEntry", m_NewSetup.HideMenuEntry); + SetupStore("MinPriority", m_NewSetup.MinPriority); + SetupStore("MaxPriority", m_NewSetup.MaxPriority); StreamdevClientSetup = m_NewSetup; diff --git a/client/setup.h b/client/setup.h index e220c22..9f4d11b 100644 --- a/client/setup.h +++ b/client/setup.h @@ -1,5 +1,5 @@ /* - * $Id: setup.h,v 1.4 2008/04/07 14:50:32 schmirl Exp $ + * $Id: setup.h,v 1.5 2009/01/29 07:48:59 schmirl Exp $ */ #ifndef VDR_STREAMDEV_SETUPCLIENT_H @@ -18,6 +18,8 @@ struct cStreamdevClientSetup { int StreamFilters; int SyncEPG; int HideMenuEntry; + int MinPriority; + int MaxPriority; }; extern cStreamdevClientSetup StreamdevClientSetup; |