From a43455f660040140fcfd9401ceb81f1e13f8bd7d Mon Sep 17 00:00:00 2001 From: schmirl Date: Tue, 8 Jun 2010 05:56:14 +0000 Subject: [PATCH] dropped "Synchronize EPG" feature Modified Files: Tag: v0_4 HISTORY README i18n.c streamdev-client.c streamdev-client.h client/device.c client/setup.c client/setup.h client/socket.c client/socket.h --- HISTORY | 2 ++ README | 9 --------- client/device.c | 5 +---- client/setup.c | 6 +----- client/setup.h | 3 +-- client/socket.c | 48 +--------------------------------------------- client/socket.h | 3 +-- i18n.c | 27 +------------------------- streamdev-client.c | 7 +------ streamdev-client.h | 3 +-- 10 files changed, 10 insertions(+), 103 deletions(-) diff --git a/HISTORY b/HISTORY index 7cfd08c..ed21dbe 100644 --- a/HISTORY +++ b/HISTORY @@ -1,6 +1,8 @@ VDR Plugin 'streamdev' Revision History --------------------------------------- +- dropped "Synchronize EPG" feature. Please use epgsync-plugin instead + (available from http://vdr.schmirler.de) - fixed a memory leak in cStreamdevPatFilter::GetPid (thanks to lhanisch) - length -1 is the correct value for streams in M3U playlists - added DELT FORCE option to delete running timers (thanks to Alwin Esch) diff --git a/README b/README index f76b9ff..e64d8d1 100644 --- a/README +++ b/README @@ -335,15 +335,6 @@ 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 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 -interval of ten seconds between each EPG synchronization. With "Filter -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 diff --git a/client/device.c b/client/device.c index 7426d4b..581176f 100644 --- a/client/device.c +++ b/client/device.c @@ -1,5 +1,5 @@ /* - * $Id: device.c,v 1.18.2.2 2009/01/29 07:49:05 schmirl Exp $ + * $Id: device.c,v 1.18.2.3 2010/06/08 05:56:15 schmirl Exp $ */ #include "client/device.h" @@ -33,9 +33,6 @@ cStreamdevDevice::cStreamdevDevice(void) { m_Device = this; m_Pids = 0; m_DvrClosed = true; - - if (StreamdevClientSetup.SyncEPG) - ClientSocket.SynchronizeEPG(); } cStreamdevDevice::~cStreamdevDevice() { diff --git a/client/setup.c b/client/setup.c index 2d1a3f3..42b4d1a 100644 --- a/client/setup.c +++ b/client/setup.c @@ -1,5 +1,5 @@ /* - * $Id: setup.c,v 1.5.2.3 2009/09/18 10:41:11 schmirl Exp $ + * $Id: setup.c,v 1.5.2.4 2010/06/08 05:56:15 schmirl Exp $ */ #include @@ -14,7 +14,6 @@ cStreamdevClientSetup::cStreamdevClientSetup(void) { StartClient = false; RemotePort = 2004; StreamFilters = false; - SyncEPG = false; HideMenuEntry = false; MinPriority = -1; MaxPriority = MAXPRIORITY; @@ -31,7 +30,6 @@ bool cStreamdevClientSetup::SetupParse(const char *Name, const char *Value) { } else if (strcmp(Name, "RemotePort") == 0) RemotePort = atoi(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) MinPriority = atoi(Value); else if (strcmp(Name, "MaxPriority") == 0) MaxPriority = atoi(Value); @@ -47,7 +45,6 @@ cStreamdevClientMenuSetupPage::cStreamdevClientMenuSetupPage(void) { Add(new cMenuEditIpItem (tr("Remote IP"), m_NewSetup.RemoteIp)); Add(new cMenuEditIntItem (tr("Remote Port"), &m_NewSetup.RemotePort, 0, 65535)); Add(new cMenuEditBoolItem(tr("Filter Streaming"), &m_NewSetup.StreamFilters)); - Add(new cMenuEditBoolItem(tr("Synchronize EPG"), &m_NewSetup.SyncEPG)); Add(new cMenuEditIntItem (tr("Minimum Priority"), &m_NewSetup.MinPriority, -1, MAXPRIORITY)); Add(new cMenuEditIntItem (tr("Maximum Priority"), &m_NewSetup.MaxPriority, -1, MAXPRIORITY)); SetCurrent(Get(0)); @@ -69,7 +66,6 @@ void cStreamdevClientMenuSetupPage::Store(void) { SetupStore("RemoteIp", m_NewSetup.RemoteIp); SetupStore("RemotePort", m_NewSetup.RemotePort); 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); diff --git a/client/setup.h b/client/setup.h index 23b7432..a9ca9e4 100644 --- a/client/setup.h +++ b/client/setup.h @@ -1,5 +1,5 @@ /* - * $Id: setup.h,v 1.4.2.2 2009/09/18 10:41:11 schmirl Exp $ + * $Id: setup.h,v 1.4.2.3 2010/06/08 05:56:15 schmirl Exp $ */ #ifndef VDR_STREAMDEV_SETUPCLIENT_H @@ -16,7 +16,6 @@ struct cStreamdevClientSetup { char RemoteIp[20]; int RemotePort; int StreamFilters; - int SyncEPG; int HideMenuEntry; int MinPriority; int MaxPriority; diff --git a/client/socket.c b/client/socket.c index 569fd43..e766f7c 100644 --- a/client/socket.c +++ b/client/socket.c @@ -1,5 +1,5 @@ /* - * $Id: socket.c,v 1.11 2008/04/07 14:40:40 schmirl Exp $ + * $Id: socket.c,v 1.11.2.1 2010/06/08 05:56:15 schmirl Exp $ */ #include @@ -301,52 +301,6 @@ bool cClientSocket::CloseDvr(void) { return true; } -bool cClientSocket::SynchronizeEPG(void) { - std::string buffer; - bool result; - FILE *epgfd; - - if (!CheckConnection()) return false; - - isyslog("Streamdev: Synchronizing EPG from server\n"); - - CMD_LOCK; - - if (!Command("LSTE")) - return false; - - if ((epgfd = tmpfile()) == NULL) { - esyslog("ERROR: Streamdev: Error while processing EPG data: %s", - strerror(errno)); - return false; - } - - while ((result = Expect(215, &buffer))) { - if (buffer[3] == ' ') break; - fputs(buffer.c_str() + 4, epgfd); - fputc('\n', epgfd); - } - - if (!result) { - if (errno == 0) - esyslog("ERROR: Streamdev: Couldn't fetch EPG data from %s:%d", - RemoteIp().c_str(), RemotePort()); - fclose(epgfd); - return false; - } - - rewind(epgfd); - if (cSchedules::Read(epgfd)) - cSchedules::Cleanup(true); - else { - esyslog("ERROR: Streamdev: Parsing EPG data failed"); - fclose(epgfd); - return false; - } - fclose(epgfd); - return true; -} - bool cClientSocket::Quit(void) { bool res; diff --git a/client/socket.h b/client/socket.h index a0400e6..3b86304 100644 --- a/client/socket.h +++ b/client/socket.h @@ -1,5 +1,5 @@ /* - * $Id: socket.h,v 1.6 2008/04/07 14:40:40 schmirl Exp $ + * $Id: socket.h,v 1.6.2.1 2010/06/08 05:56:15 schmirl Exp $ */ #ifndef VDR_STREAMDEV_CLIENT_CONNECTION_H @@ -48,7 +48,6 @@ public: bool SetPid(int Pid, bool On); bool SetFilter(ushort Pid, uchar Tid, uchar Mask, bool On); bool CloseDvr(void); - bool SynchronizeEPG(void); bool SuspendServer(void); bool Quit(void); diff --git a/i18n.c b/i18n.c index 284ddc4..14860d6 100644 --- a/i18n.c +++ b/i18n.c @@ -1,5 +1,5 @@ /* - * $Id: i18n.c,v 1.8.2.7 2009/07/07 10:50:13 schmirl Exp $ + * $Id: i18n.c,v 1.8.2.8 2010/06/08 05:56:14 schmirl Exp $ */ #include "i18n.h" @@ -355,31 +355,6 @@ const tI18nPhrase Phrases[] = { "", // Czech #if VDRVERSNUM >= 10502 "", // Türkçe -#endif - }, - { "Synchronize EPG", // English - "EPG synchronisieren", // Deutsch - "", // Slovenski - "Sincronizza EPG", // Italiano - "", // Nederlands - "", // Português - "Synchroniser l'EPG", // Français - "", // Norsk - "Päivitä ohjelmaopas", // suomi - "", // Polski - "", // Español - "", // Ellinika - "", // Svenska - "", // Romaneste - "", // Magyar - "", // Catala - "ÁØÝåàÞÝØ×ÐæØï EPG", // Russian - "", // Hrvatski - "", // Eesti - "", // Dansk - "", // Czech -#if VDRVERSNUM >= 10502 - "", // Türkçe #endif }, { "Minimum Priority", // English diff --git a/streamdev-client.c b/streamdev-client.c index 340ff52..87afdf3 100644 --- a/streamdev-client.c +++ b/streamdev-client.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: streamdev-client.c,v 1.5 2008/04/07 14:50:32 schmirl Exp $ + * $Id: streamdev-client.c,v 1.5.2.1 2010/06/08 05:56:14 schmirl Exp $ */ #include "streamdev-client.h" @@ -36,11 +36,6 @@ bool cPluginStreamdevClient::Start(void) { return true; } -void cPluginStreamdevClient::Housekeeping(void) { - if (StreamdevClientSetup.StartClient && StreamdevClientSetup.SyncEPG) - ClientSocket.SynchronizeEPG(); -} - const char *cPluginStreamdevClient::MainMenuEntry(void) { return StreamdevClientSetup.StartClient && !StreamdevClientSetup.HideMenuEntry ? tr("Suspend Server") : NULL; } diff --git a/streamdev-client.h b/streamdev-client.h index ecf4579..a95dbbf 100644 --- a/streamdev-client.h +++ b/streamdev-client.h @@ -1,5 +1,5 @@ /* - * $Id: streamdev-client.h,v 1.1 2004/12/30 22:43:59 lordjaxom Exp $ + * $Id: streamdev-client.h,v 1.1.1.1.2.1 2010/06/08 05:56:14 schmirl Exp $ */ #ifndef VDR_STREAMDEVCLIENT_H @@ -19,7 +19,6 @@ public: virtual const char *Version(void) { return VERSION; } virtual const char *Description(void); virtual bool Start(void); - virtual void Housekeeping(void); virtual const char *MainMenuEntry(void); virtual cOsdObject *MainMenuAction(void); virtual cMenuSetupPage *SetupMenu(void);