diff --git a/HISTORY b/HISTORY index c4559f6..ab0bdd0 100644 --- a/HISTORY +++ b/HISTORY @@ -1,6 +1,8 @@ eDR Plugin 'streamdev' Revision History --------------------------------------- +- added Min/MaxPriority parameters. Can be used to keep client VDR from + using streamdev e.g. when recording - added Network Media Tank browser support to HTML pages (thanks to Jori Hamalainen) - minor fixes of PAT repacker diff --git a/README b/README index 02d26c4..e7f1846 100644 --- a/README +++ b/README @@ -275,7 +275,7 @@ 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. Link channels and even a client-side EPG scan have been reported to work. -The last parameter, "Synchronize EPG", will have the client synchronize it's +The next parameter, "Synchronize EPG", will have the client synchronize it's program table with the server every now and then, but not regularly. This happens when starting the client, and everytime VDR does its housekeeping tasks. The only thing that's guaranteed is, that there will be a minimum @@ -284,6 +284,16 @@ Streaming" this option has been obsoleted. If you still need to synchronize EPG as additional information is available from the server, you should use the epgsync-plugin instead (http://vdr.schmirler.de). +Finally with the maximum and minimum priority, you can keep VDR from considering +streamdev in certain cases. If for instance you have a streamdev client with its +own DVB card, VDR would normally use streamdev for recording. If this is not +what you want, you could set the maximum priority to 0. As recordings usually +have a much higher priority (default 50), streamdev is now no longer used for +recordings. The two parameters define the inclusive range of priorities for +which streamdev will accept to tune. Setting the minimum priority to a higher +value than the maximum, you will get two ranges: "up to maximum" and "minimum +and above". + 4. Other useful Plugins: ------------------------ diff --git a/client/device.c b/client/device.c index 28cb7dc..7426d4b 100644 --- a/client/device.c +++ b/client/device.c @@ -1,5 +1,5 @@ /* - * $Id: device.c,v 1.18.2.1 2008/04/07 15:07:39 schmirl Exp $ + * $Id: device.c,v 1.18.2.2 2009/01/29 07:49:05 schmirl Exp $ */ #include "client/device.h" @@ -91,6 +91,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 5c04c61..553a11f 100644 --- a/client/setup.c +++ b/client/setup.c @@ -1,5 +1,5 @@ /* - * $Id: setup.c,v 1.5 2008/04/07 14:50:32 schmirl Exp $ + * $Id: setup.c,v 1.5.2.1 2009/01/29 07:49:05 schmirl Exp $ */ #include @@ -16,6 +16,8 @@ cStreamdevClientSetup::cStreamdevClientSetup(void) { StreamFilters = false; SyncEPG = false; HideMenuEntry = false; + MinPriority = -1; + MaxPriority = MAXPRIORITY; strcpy(RemoteIp, ""); } @@ -31,6 +33,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; } @@ -44,6 +48,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)); } @@ -65,6 +71,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..070c732 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.4.2.1 2009/01/29 07:49:05 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; diff --git a/i18n.c b/i18n.c index babd26f..4b372c3 100644 --- a/i18n.c +++ b/i18n.c @@ -1,5 +1,5 @@ /* - * $Id: i18n.c,v 1.8.2.3 2008/06/26 14:17:10 schmirl Exp $ + * $Id: i18n.c,v 1.8.2.4 2009/01/29 07:49:04 schmirl Exp $ */ #include "i18n.h" @@ -380,6 +380,56 @@ const tI18nPhrase Phrases[] = { "", // Czech #if VDRVERSNUM >= 10502 "", // Türkçe +#endif + }, + { "Minimum Priority", // English + "Minimale Priorität", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "", // suomi + "", // Polski + "", // Español + "", // Ellinika + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Catala + "", // Russian + "", // Hrvatski + "", // Eesti + "", // Dansk + "", // Czech +#if VDRVERSNUM >= 10502 + "", // Türkçe +#endif + }, + { "Maximum Priority", // English + "Maximale Priorität", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "", // suomi + "", // Polski + "", // Español + "", // Ellinika + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Catala + "", // Russian + "", // Hrvatski + "", // Eesti + "", // Dansk + "", // Czech +#if VDRVERSNUM >= 10502 + "", // Türkçe #endif }, { "Suspend Live TV", // English