From 302fa2e67276bd0674e81e2a9a01b9e91dd45d8c Mon Sep 17 00:00:00 2001 From: lordjaxom Date: Thu, 30 Dec 2004 22:43:55 +0000 Subject: Initial revision --- patches/thread.c.diff | 29 +++++++ patches/vdr-1.3.11-localchannelprovide.diff | 61 +++++++++++++++ patches/vdr-1.3.6-incompletesections.diff | 22 ++++++ patches/vdr-pluginactivity.diff | 113 ++++++++++++++++++++++++++++ 4 files changed, 225 insertions(+) create mode 100644 patches/thread.c.diff create mode 100644 patches/vdr-1.3.11-localchannelprovide.diff create mode 100644 patches/vdr-1.3.6-incompletesections.diff create mode 100644 patches/vdr-pluginactivity.diff (limited to 'patches') diff --git a/patches/thread.c.diff b/patches/thread.c.diff new file mode 100644 index 0000000..a03ffac --- /dev/null +++ b/patches/thread.c.diff @@ -0,0 +1,29 @@ +--- vdr-vanilla/thread.c 2003-10-10 18:19:15.000000000 +0200 ++++ vdr-vanilla-thread/thread.c 2003-10-10 18:43:36.000000000 +0200 +@@ -158,12 +158,21 @@ + + bool cThread::Active(void) + { +- if (threadPid) { +- if (kill(threadPid, SIGIO) < 0) { // couldn't find another way of checking whether the thread is still running - any ideas? +- if (errno == ESRCH) +- threadPid = 0; +- else ++ if (thread) { ++ /* ++ * Single UNIX Spec v2 says: ++ * ++ * The pthread_kill() function is used to request ++ * that a signal be delivered to the specified thread. ++ * ++ * As in kill(), if sig is zero, error checking is ++ * performed but no signal is actually sent. ++ */ ++ int err; ++ if ((err = pthread_kill(thread, 0)) != 0) { ++ if (err != ESRCH) + LOG_ERROR; ++ thread = 0; + } + else + return true; diff --git a/patches/vdr-1.3.11-localchannelprovide.diff b/patches/vdr-1.3.11-localchannelprovide.diff new file mode 100644 index 0000000..448d7fc --- /dev/null +++ b/patches/vdr-1.3.11-localchannelprovide.diff @@ -0,0 +1,61 @@ +diff -u vdr-1.3.11/config.c vdr-1.3.11.LocalChannelProvide/config.c +--- vdr-1.3.11/config.c 2004-05-16 14:43:55.000000000 +0200 ++++ vdr-1.3.11.LocalChannelProvide/config.c 2004-08-29 17:55:59.000000000 +0200 +@@ -297,6 +297,7 @@ + ResumeID = 0; + CurrentChannel = -1; + CurrentVolume = MAXVOLUME; ++ LocalChannelProvide = 1; + } + + cSetup& cSetup::operator= (const cSetup &s) +@@ -450,6 +451,7 @@ + else if (!strcasecmp(Name, "ResumeID")) ResumeID = atoi(Value); + else if (!strcasecmp(Name, "CurrentChannel")) CurrentChannel = atoi(Value); + else if (!strcasecmp(Name, "CurrentVolume")) CurrentVolume = atoi(Value); ++ else if (!strcasecmp(Name, "LocalChannelProvide")) LocalChannelProvide = atoi(Value); + else + return false; + return true; +@@ -510,6 +512,7 @@ + Store("ResumeID", ResumeID); + Store("CurrentChannel", CurrentChannel); + Store("CurrentVolume", CurrentVolume); ++ Store("LocalChannelProvide",LocalChannelProvide); + + Sort(); + +diff -u vdr-1.3.11/config.h vdr-1.3.11.LocalChannelProvide/config.h +--- vdr-1.3.11/config.h 2004-06-10 15:18:50.000000000 +0200 ++++ vdr-1.3.11.LocalChannelProvide/config.h 2004-08-29 17:47:32.000000000 +0200 +@@ -251,6 +251,7 @@ + int ResumeID; + int CurrentChannel; + int CurrentVolume; ++ int LocalChannelProvide; + int __EndData__; + cSetup(void); + cSetup& operator= (const cSetup &s); +diff -u vdr-1.3.11/dvbdevice.c vdr-1.3.11.LocalChannelProvide/dvbdevice.c +--- vdr-1.3.11/dvbdevice.c 2004-06-19 11:33:42.000000000 +0200 ++++ vdr-1.3.11.LocalChannelProvide/dvbdevice.c 2004-08-29 18:00:37.000000000 +0200 +@@ -674,6 +674,8 @@ + + bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers) const + { ++ if (Setup.LocalChannelProvide != 1) ++ return false; + bool result = false; + bool hasPriority = Priority < 0 || Priority > this->Priority(); + bool needsDetachReceivers = false; +diff -u vdr-1.3.11/menu.c vdr-1.3.11.LocalChannelProvide/menu.c +--- vdr-1.3.11/menu.c 2004-06-13 22:26:51.000000000 +0200 ++++ vdr-1.3.11.LocalChannelProvide/menu.c 2004-08-29 17:52:31.000000000 +0200 +@@ -1878,6 +1878,7 @@ + Add(new cMenuEditIntItem( tr("Setup.DVB$Primary DVB interface"), &data.PrimaryDVB, 1, cDevice::NumDevices())); + Add(new cMenuEditBoolItem(tr("Setup.DVB$Video format"), &data.VideoFormat, "4:3", "16:9")); + Add(new cMenuEditStraItem(tr("Setup.DVB$Update channels"), &data.UpdateChannels, 5, updateChannelsTexts)); ++ Add(new cMenuEditBoolItem(tr("Channels available locally"), &data.LocalChannelProvide)); + } + + eOSState cMenuSetupDVB::ProcessKey(eKeys Key) diff --git a/patches/vdr-1.3.6-incompletesections.diff b/patches/vdr-1.3.6-incompletesections.diff new file mode 100644 index 0000000..a58a121 --- /dev/null +++ b/patches/vdr-1.3.6-incompletesections.diff @@ -0,0 +1,22 @@ +--- vdr-1.3.6/sections.c 2004-02-07 17:51:57.000000000 +0200 ++++ sections.c 2004-03-21 18:34:47.000000000 +0200 +@@ -185,11 +185,17 @@ + if (fh) { + // Read section data: + unsigned char buf[4096]; // max. allowed size for any EIT section +- int r = safe_read(fh->handle, buf, sizeof(buf)); ++ struct stat statbuf; ++ int st = fstat(fh->handle, &statbuf); ++ int ispipe = (st == 0 && !S_ISCHR(statbuf.st_mode)); ++ /*printf("ispipe %d\n", ispipe);*/ ++ int r = safe_read(fh->handle, buf, ispipe ? 3 : sizeof(buf)); + if (!DeviceHasLock) + continue; // we do the read anyway, to flush any data that might have come from a different transponder +- if (r > 3) { // minimum number of bytes necessary to get section length ++ if (r >= 3) { // minimum number of bytes necessary to get section length + int len = (((buf[1] & 0x0F) << 8) | (buf[2] & 0xFF)) + 3; ++ if (ispipe) ++ r += safe_read(fh->handle, buf+3, len-3); + if (len == r) { + // Distribute data to all attached filters: + int pid = fh->filterData.pid; diff --git a/patches/vdr-pluginactivity.diff b/patches/vdr-pluginactivity.diff new file mode 100644 index 0000000..0b173ae --- /dev/null +++ b/patches/vdr-pluginactivity.diff @@ -0,0 +1,113 @@ +diff -Nru -x PLUGINS vdr-1.3.12-orig/i18n.c vdr-1.3.12/i18n.c +--- vdr-1.3.12-orig/i18n.c 2004-05-28 15:19:29.000000000 +0200 ++++ vdr-1.3.12/i18n.c 2004-08-17 16:01:07.000000000 +0200 +@@ -1033,8 +1033,8 @@ + "´ÕÙáâÒØâÕÛìÝÞ ßÕàÕ×ÐßãáâØâì?", + "Zaista ponovo pokrenuti?", + }, +- { "Recording - restart anyway?", +- "Aufnahme läuft - trotzdem neu starten?", ++ { "Busy - restart anyway?", ++ "Beschäftigt - trotzdem neu starten?", + "Snemanje - zares ponoven zagon?", + "In registrazione - restart comunque?", + "Opname loopt - toch opnieuw starten?", +@@ -1052,8 +1052,8 @@ + "¸Ôñâ ×ÐßØáì - ÔÕÙáâÒØâÕÛìÝÞ ßÕàÕ×ÐßãáâØâì?", + "Snimanje traje - svejedno restart sistema?", + }, +- { "Recording - shut down anyway?", +- "Aufnahme läuft - trotzdem ausschalten?", ++ { "Busy - shut down anyway?", ++ "Beschäftigt - trotzdem ausschalten?", + "Snemanje - zares izklopi?", + "In registrazione - spengo comunque?", + "Opname loopt - toch uitschakelen?", +diff -Nru -x PLUGINS vdr-1.3.12-orig/menu.c vdr-1.3.12/menu.c +--- vdr-1.3.12-orig/menu.c 2004-06-13 22:26:51.000000000 +0200 ++++ vdr-1.3.12/menu.c 2004-08-17 16:00:07.000000000 +0200 +@@ -2201,7 +2201,7 @@ + + eOSState cMenuSetup::Restart(void) + { +- if (Interface->Confirm(cRecordControls::Active() ? tr("Recording - restart anyway?") : tr("Really restart?"))) { ++ if (Interface->Confirm((cRecordControls::Active() || cPluginManager::Active()) ? tr("Busy - restart anyway?") : tr("Really restart?"))) { + cThread::EmergencyExit(true); + return osEnd; + } +diff -Nru -x PLUGINS vdr-1.3.12-orig/plugin.c vdr-1.3.12/plugin.c +--- vdr-1.3.12-orig/plugin.c 2004-05-22 13:25:22.000000000 +0200 ++++ vdr-1.3.12/plugin.c 2004-08-17 15:57:52.000000000 +0200 +@@ -64,6 +64,11 @@ + { + } + ++bool cPlugin::Active(void) ++{ ++ return false; ++} ++ + const char *cPlugin::MainMenuEntry(void) + { + return NULL; +@@ -369,6 +374,18 @@ + return NULL; + } + ++bool cPluginManager::Active(void) ++{ ++ if (pluginManager) { ++ for (cDll *dll = pluginManager->dlls.First(); dll; dll = pluginManager->dlls.Next(dll)) { ++ cPlugin *p = dll->Plugin(); ++ if (p && p->Active()) ++ return true; ++ } ++ } ++ return false; ++} ++ + void cPluginManager::Shutdown(bool Log) + { + cDll *dll; +diff -Nru -x PLUGINS vdr-1.3.12-orig/plugin.h vdr-1.3.12/plugin.h +--- vdr-1.3.12-orig/plugin.h 2004-04-30 15:46:21.000000000 +0200 ++++ vdr-1.3.12/plugin.h 2004-08-17 15:56:51.000000000 +0200 +@@ -36,6 +36,7 @@ + virtual bool Initialize(void); + virtual bool Start(void); + virtual void Housekeeping(void); ++ virtual bool Active(void); + + virtual const char *MainMenuEntry(void); + virtual cOsdObject *MainMenuAction(void); +@@ -85,6 +86,7 @@ + static bool HasPlugins(void); + static cPlugin *GetPlugin(int Index); + static cPlugin *GetPlugin(const char *Name); ++ static bool Active(void); + void Shutdown(bool Log = false); + }; + +diff -Nru -x PLUGINS vdr-1.3.12-orig/vdr.c vdr-1.3.12/vdr.c +--- vdr-1.3.12-orig/vdr.c 2004-06-13 15:52:09.000000000 +0200 ++++ vdr-1.3.12/vdr.c 2004-08-17 15:59:18.000000000 +0200 +@@ -707,8 +707,8 @@ + Skins.Message(mtError, tr("Can't shutdown - option '-s' not given!")); + break; + } +- if (cRecordControls::Active()) { +- if (Interface->Confirm(tr("Recording - shut down anyway?"))) ++ if (cRecordControls::Active() || cPluginManager::Active()) { ++ if (Interface->Confirm(tr("Busy - shut down anyway?"))) + ForceShutdown = true; + } + LastActivity = 1; // not 0, see below! +@@ -821,7 +821,7 @@ + Skins.Message(mtInfo, tr("Editing process finished")); + } + } +- if (!Interact && ((!cRecordControls::Active() && !cCutter::Active() && (!Interface->HasSVDRPConnection() || UserShutdown)) || ForceShutdown)) { ++ if (!Interact && ((!cRecordControls::Active() && !cCutter::Active() && !cPluginManager::Active() && (!Interface->HasSVDRPConnection() || UserShutdown)) || ForceShutdown)) { + time_t Now = time(NULL); + if (Now - LastActivity > ACTIVITYTIMEOUT) { + // Shutdown: -- cgit v1.2.3