diff options
author | Frank Schmirler <schmirl@puter.linogate.de> | 2010-12-02 08:53:01 +0100 |
---|---|---|
committer | Frank Schmirler <schmirl@puter.linogate.de> | 2010-12-02 08:53:01 +0100 |
commit | 5e30711bfdb28085234a5ef6da4f4e44305ac3e4 (patch) | |
tree | d15809d23eeeed7fda55d9450b1af7c99d6eb5d6 /patches | |
download | vdr-plugin-streamdev-5e30711bfdb28085234a5ef6da4f4e44305ac3e4.tar.gz vdr-plugin-streamdev-5e30711bfdb28085234a5ef6da4f4e44305ac3e4.tar.bz2 |
Snapshot 2007-03-20
Diffstat (limited to 'patches')
-rw-r--r-- | patches/respect_ca.diff | 43 | ||||
-rw-r--r-- | patches/thread.c.diff | 29 | ||||
-rw-r--r-- | patches/vdr-1.3.11-localchannelprovide.diff | 61 | ||||
-rw-r--r-- | patches/vdr-1.3.24.LocalChannelProvide.diff | 93 | ||||
-rw-r--r-- | patches/vdr-1.3.6-incompletesections.diff | 22 | ||||
-rw-r--r-- | patches/vdr-1.4.3-recursion.diff | 85 | ||||
-rw-r--r-- | patches/vdr-1.4.3-recursion_bigpatch.diff | 88 | ||||
-rw-r--r-- | patches/vdr-1.4.x-localchannelprovide.diff | 102 | ||||
-rw-r--r-- | patches/vdr-pluginactivity.diff | 113 |
9 files changed, 636 insertions, 0 deletions
diff --git a/patches/respect_ca.diff b/patches/respect_ca.diff new file mode 100644 index 0000000..8240b19 --- /dev/null +++ b/patches/respect_ca.diff @@ -0,0 +1,43 @@ +# The cannels.conf ca field can be used to bind a channel to a specific +# device. The streamdev-client does not consider this information, so +# there's no way to keep VDR from using streamdev for a specific +# channel. Apply this patch if you need this feature. +# +# This fix should probably become part of streamdev. However as it +# changes the behaviour of streamdev, I decided to keep it as a separate +# patch until there is something like a new official streamdev release. +# +--- client/device.h.bak 2006-11-09 12:25:21.000000000 +0100 ++++ client/device.h 2006-11-09 12:26:57.000000000 +0100 +@@ -50,6 +50,7 @@ + cStreamdevDevice(void); + virtual ~cStreamdevDevice(); + ++ virtual int ProvidesCa(const cChannel *Channel) const; + virtual bool ProvidesSource(int Source) const; + virtual bool ProvidesTransponder(const cChannel *Channel) const; + virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, +--- client/device.c.bak 2006-11-09 12:23:24.000000000 +0100 ++++ client/device.c 2006-11-09 12:35:48.000000000 +0100 +@@ -57,6 +57,12 @@ + #endif + } + ++int cStreamdevDevice::ProvidesCa(const cChannel *Channel) const ++{ ++ // Encrypted is acceptable for now. Will ask the server later. ++ return Channel->Ca() <= CA_DVB_MAX ? cDevice::ProvidesCa(Channel) : 1; ++} ++ + bool cStreamdevDevice::ProvidesSource(int Source) const { + Dprintf("ProvidesSource, Source=%d\n", Source); + return false; +@@ -78,7 +84,7 @@ + if (ClientSocket.DataSocket(siLive) != NULL + && TRANSPONDER(Channel, m_Channel)) + res = true; +- else { ++ else if (ProvidesCa(Channel)) { + res = prio && ClientSocket.ProvidesChannel(Channel, Priority); + ndr = true; + } 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.24.LocalChannelProvide.diff b/patches/vdr-1.3.24.LocalChannelProvide.diff new file mode 100644 index 0000000..830960a --- /dev/null +++ b/patches/vdr-1.3.24.LocalChannelProvide.diff @@ -0,0 +1,93 @@ +diff -Nu vdr-1.3.24/config.c vdr-1.3.24.LocalChannelProvide/config.c +--- vdr-1.3.24/config.c 2005-02-20 13:52:59.000000000 +0100 ++++ vdr-1.3.24.LocalChannelProvide/config.c 2005-05-12 19:23:58.000000000 +0200 +@@ -301,6 +301,7 @@ + CurrentChannel = -1; + CurrentVolume = MAXVOLUME; + CurrentDolby = 0; ++ LocalChannelProvide = 1; + } + + cSetup& cSetup::operator= (const cSetup &s) +@@ -458,6 +459,7 @@ + else if (!strcasecmp(Name, "CurrentChannel")) CurrentChannel = atoi(Value); + else if (!strcasecmp(Name, "CurrentVolume")) CurrentVolume = atoi(Value); + else if (!strcasecmp(Name, "CurrentDolby")) CurrentDolby = atoi(Value); ++ else if (!strcasecmp(Name, "LocalChannelProvide")) LocalChannelProvide = atoi(Value); + else + return false; + return true; +@@ -522,6 +524,7 @@ + Store("CurrentChannel", CurrentChannel); + Store("CurrentVolume", CurrentVolume); + Store("CurrentDolby", CurrentDolby); ++ Store("LocalChannelProvide",LocalChannelProvide); + + Sort(); + +diff -Nu vdr-1.3.24/config.h vdr-1.3.24.LocalChannelProvide/config.h +--- vdr-1.3.24/config.h 2005-05-05 13:04:18.000000000 +0200 ++++ vdr-1.3.24.LocalChannelProvide/config.h 2005-05-12 19:24:31.000000000 +0200 +@@ -255,6 +255,7 @@ + int CurrentChannel; + int CurrentVolume; + int CurrentDolby; ++ int LocalChannelProvide; + int __EndData__; + cSetup(void); + cSetup& operator= (const cSetup &s); +diff -Nu vdr-1.3.24/dvbdevice.c vdr-1.3.24.LocalChannelProvide/dvbdevice.c +--- vdr-1.3.24/dvbdevice.c 2005-03-20 11:10:38.000000000 +0100 ++++ vdr-1.3.24.LocalChannelProvide/dvbdevice.c 2005-05-12 19:19:29.000000000 +0200 +@@ -746,6 +746,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 -Nu vdr-1.3.24/i18n.c vdr-1.3.24.LocalChannelProvide/i18n.c +--- vdr-1.3.24/i18n.c 2005-05-05 15:12:54.000000000 +0200 ++++ vdr-1.3.24.LocalChannelProvide/i18n.c 2005-05-12 19:30:50.000000000 +0200 +@@ -5325,6 +5325,27 @@ + "ST:TNG konsool", + "ST:TNG konsol", + }, ++ { "Channels available locally", ++ "Kanäle lokal beziehen", ++ "",// TODO ++ "", ++ "", ++ "",// TODO ++ "",// TODO ++ "",// TODO ++ "", ++ "",// TODO ++ "",// TODO ++ "",// TODO ++ "", ++ "", ++ "",// TODO ++ "",// TODO ++ "", ++ "", ++ "", ++ "", ++ }, + { NULL } + }; + +diff -Nu vdr-1.3.24/menu.c vdr-1.3.24.LocalChannelProvide/menu.c +--- vdr-1.3.24/menu.c 2005-03-20 16:14:51.000000000 +0100 ++++ vdr-1.3.24.LocalChannelProvide/menu.c 2005-05-12 19:26:57.000000000 +0200 +@@ -1968,7 +1968,7 @@ + Add(new cMenuEditIntItem( tr("Setup.DVB$Audio languages"), &numAudioLanguages, 0, I18nNumLanguages)); + for (int i = 0; i < numAudioLanguages; i++) + Add(new cMenuEditStraItem(tr("Setup.DVB$Audio language"), &data.AudioLanguages[i], I18nNumLanguages, I18nLanguages())); +- ++ Add(new cMenuEditBoolItem(tr("Channels available locally"), &data.LocalChannelProvide)); + SetCurrent(Get(current)); + Display(); + } 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-1.4.3-recursion.diff b/patches/vdr-1.4.3-recursion.diff new file mode 100644 index 0000000..7a06c92 --- /dev/null +++ b/patches/vdr-1.4.3-recursion.diff @@ -0,0 +1,85 @@ +# If you have two or more VDRs and you like them to mutually share +# there DVB cards you might need to apply this patch first. +# +# IMPORTANT: As this patch does not only modify streamdev-server but +# also an exported method of VDR, you will need to +# +# !!!!! RECOMPILE VDR AND ALL PLUGINS !!!!! +# +# Why do I need the patch? +# -------------------------- +# Before switching channels VDR will consider all of its devices to +# find the one with the least impact. This includes the device provided +# by the streamdev-client plugin. Streamdev-client will forward the +# request to its server which in turn checks all of its devices. Now if +# the server is running streamdev-client, too, the request will again +# be forwarded to its server and finally you will endup in a loop. +# +# What does the patch do? +# ----------------------- +# The patch adds the additional parameter "bool DVBCardsOnly" to VDR's +# device selection method cDevice::GetDevice(...). The parameter +# defaults to false which gives you the standard behaviour of GetDevice. +# When set to true, GetDevice will use only those devices with a card +# index < MAXDVBDEVICES, so only real DVB cards will be considered. +# Other devices like streamdev-client or DVB cards provided by plugin +# (Hauppauge PVR) won't be used. +# +# Author: Frank Schmirler (http://vdr.schmirler.de) +# +--- device.h.orig 2006-11-15 12:01:34.000000000 +0100 ++++ device.h 2006-11-15 12:02:15.000000000 +0100 +@@ -128,7 +128,7 @@ + ///< Gets the device with the given Index. + ///< \param Index must be in the range 0..numDevices-1. + ///< \return A pointer to the device, or NULL if the Index was invalid. +- static cDevice *GetDevice(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL); ++ static cDevice *GetDevice(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL, bool DVBCardsOnly = false); + ///< Returns a device that is able to receive the given Channel at the + ///< given Priority, with the least impact on active recordings and + ///< live viewing. +--- device.c.orig 2006-11-15 12:01:30.000000000 +0100 ++++ device.c 2006-11-22 12:28:05.000000000 +0100 +@@ -8,6 +8,7 @@ + */ + + #include "device.h" ++#include "dvbdevice.h" + #include <errno.h> + #include <sys/ioctl.h> + #include <sys/mman.h> +@@ -278,11 +279,13 @@ + return (0 <= Index && Index < numDevices) ? device[Index] : NULL; + } + +-cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers) ++cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers, bool DVBCardsOnly) + { + cDevice *d = NULL; + uint Impact = 0xFFFFFFFF; // we're looking for a device with the least impact + for (int i = 0; i < numDevices; i++) { ++ if (DVBCardsOnly && device[i]->CardIndex() >= MAXDVBDEVICES) ++ continue; + bool ndr; + if (device[i]->ProvidesChannel(Channel, Priority, &ndr)) { // this device is basicly able to do the job + // Put together an integer number that reflects the "impact" using +--- PLUGINS/src/streamdev/server/connection.c.orig 2006-11-15 12:10:11.000000000 +0100 ++++ PLUGINS/src/streamdev/server/connection.c 2006-11-15 12:10:59.000000000 +0100 +@@ -132,7 +132,7 @@ + Dprintf(" * GetDevice(const cChannel*, int)\n"); + Dprintf(" * -------------------------------\n"); + +- device = cDevice::GetDevice(Channel, Priority); ++ device = cDevice::GetDevice(Channel, Priority, NULL, true); + + Dprintf(" * Found following device: %p (%d)\n", device, + device ? device->CardIndex() + 1 : 0); +@@ -150,7 +150,7 @@ + const cChannel *current = Channels.GetByNumber(cDevice::CurrentChannel()); + isyslog("streamdev-server: Detaching current receiver"); + Detach(); +- device = cDevice::GetDevice(Channel, Priority); ++ device = cDevice::GetDevice(Channel, Priority, NULL, true); + Attach(); + Dprintf(" * Found following device: %p (%d)\n", device, + device ? device->CardIndex() + 1 : 0); diff --git a/patches/vdr-1.4.3-recursion_bigpatch.diff b/patches/vdr-1.4.3-recursion_bigpatch.diff new file mode 100644 index 0000000..5bb7854 --- /dev/null +++ b/patches/vdr-1.4.3-recursion_bigpatch.diff @@ -0,0 +1,88 @@ +# If you have two or more VDRs and you like them to mutually share +# there DVB cards you might need to apply this patch first. +# +# This is a modified version of the patch for VDRs with BIGPATCH. +# Thanks to p_body@vdrportal. +# +# IMPORTANT: As this patch does not only modify streamdev-server but +# also an exported method of VDR, you will need to +# +# !!!!! RECOMPILE VDR AND ALL PLUGINS !!!!! +# +# Why do I need the patch? +# -------------------------- +# Before switching channels VDR will consider all of its devices to +# find the one with the least impact. This includes the device provided +# by the streamdev-client plugin. Streamdev-client will forward the +# request to its server which in turn checks all of its devices. Now if +# the server is running streamdev-client, too, the request will again +# be forwarded to its server and finally you will endup in a loop. +# +# What does the patch do? +# ----------------------- +# The patch adds the additional parameter "bool DVBCardsOnly" to VDR's +# device selection method cDevice::GetDevice(...). The parameter +# defaults to false which gives you the standard behaviour of GetDevice. +# When set to true, GetDevice will use only those devices with a card +# index < MAXDVBDEVICES, so only real DVB cards will be considered. +# Other devices like streamdev-client or DVB cards provided by plugin +# (Hauppauge PVR) won't be used. +# +# Author: Frank Schmirler (http://vdr.schmirler.de) +# +--- device.h.orig 2006-11-15 12:01:34.000000000 +0100 ++++ device.h 2006-11-15 12:02:15.000000000 +0100 +@@ -128,7 +128,7 @@ + ///< Gets the device with the given Index. + ///< \param Index must be in the range 0..numDevices-1. + ///< \return A pointer to the device, or NULL if the Index was invalid. +- static cDevice *GetDevice(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL, bool LiveView = false); ++ static cDevice *GetDevice(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL, bool LiveView = false, bool DVBCardsOnly = false); + ///< Returns a device that is able to receive the given Channel at the + ///< given Priority, with the least impact on active recordings and + ///< live viewing. +--- device.c.orig 2006-11-15 12:01:30.000000000 +0100 ++++ device.c 2006-11-22 12:28:05.000000000 +0100 +@@ -8,6 +8,7 @@ + */ + + #include "device.h" ++#include "dvbdevice.h" + #include <errno.h> + #include <sys/ioctl.h> + #include <sys/mman.h> +@@ -278,11 +279,13 @@ + return (0 <= Index && Index < numDevices) ? device[Index] : NULL; + } + +-cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers, bool LiveView) ++cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers, bool LiveView, bool DVBCardsOnly) + { + cDevice *d = NULL; + uint Impact = 0xFFFFFFFF; // we're looking for a device with the least impact + for (int i = 0; i < numDevices; i++) { ++ if (DVBCardsOnly && device[i]->CardIndex() >= MAXDVBDEVICES) ++ continue; + bool ndr; + if (device[i]->ProvidesChannel(Channel, Priority, &ndr)) { // this device is basicly able to do the job + // Put together an integer number that reflects the "impact" using +--- PLUGINS/src/streamdev/server/connection.c.orig 2006-11-15 12:10:11.000000000 +0100 ++++ PLUGINS/src/streamdev/server/connection.c 2006-11-15 12:10:59.000000000 +0100 +@@ -132,7 +132,7 @@ + Dprintf(" * GetDevice(const cChannel*, int)\n"); + Dprintf(" * -------------------------------\n"); + +- device = cDevice::GetDevice(Channel, Priority); ++ device = cDevice::GetDevice(Channel, Priority, NULL, NULL, true); + + Dprintf(" * Found following device: %p (%d)\n", device, + device ? device->CardIndex() + 1 : 0); +@@ -150,7 +150,7 @@ + const cChannel *current = Channels.GetByNumber(cDevice::CurrentChannel()); + isyslog("streamdev-server: Detaching current receiver"); + Detach(); +- device = cDevice::GetDevice(Channel, Priority); ++ device = cDevice::GetDevice(Channel, Priority, NULL, NULL, true); + Attach(); + Dprintf(" * Found following device: %p (%d)\n", device, + device ? device->CardIndex() + 1 : 0); diff --git a/patches/vdr-1.4.x-localchannelprovide.diff b/patches/vdr-1.4.x-localchannelprovide.diff new file mode 100644 index 0000000..857c1a2 --- /dev/null +++ b/patches/vdr-1.4.x-localchannelprovide.diff @@ -0,0 +1,102 @@ +# Apply this patch to VDR if you want to use a fullfeatured DVB card +# as pure output device. Infact the patch will keep VDR from using the +# tuner of any local DVB card (also budget cards). It will not affect +# other input devices like e.g. streamdev-client or DVB cards provided +# by plugins (e.g. Hauppauge PVR). +# +# By default the patch is DISABLED. There will be a new OSD menu entry +# in Setup->DVB which allows you to enable or disable the patch at any +# time. +diff -ru vdr-1.4.3.orig/config.c vdr-1.4.3/config.c +--- vdr-1.4.3.orig/config.c 2006-07-22 13:57:51.000000000 +0200 ++++ vdr-1.4.3/config.c 2006-11-16 08:16:37.000000000 +0100 +@@ -273,6 +273,7 @@ + CurrentChannel = -1; + CurrentVolume = MAXVOLUME; + CurrentDolby = 0; ++ LocalChannelProvide = 1; + InitialChannel = 0; + InitialVolume = -1; + } +@@ -434,6 +435,7 @@ + else if (!strcasecmp(Name, "CurrentChannel")) CurrentChannel = atoi(Value); + else if (!strcasecmp(Name, "CurrentVolume")) CurrentVolume = atoi(Value); + else if (!strcasecmp(Name, "CurrentDolby")) CurrentDolby = atoi(Value); ++ else if (!strcasecmp(Name, "LocalChannelProvide")) LocalChannelProvide = atoi(Value); + else if (!strcasecmp(Name, "InitialChannel")) InitialChannel = atoi(Value); + else if (!strcasecmp(Name, "InitialVolume")) InitialVolume = atoi(Value); + else +@@ -502,6 +504,7 @@ + Store("CurrentChannel", CurrentChannel); + Store("CurrentVolume", CurrentVolume); + Store("CurrentDolby", CurrentDolby); ++ Store("LocalChannelProvide",LocalChannelProvide); + Store("InitialChannel", InitialChannel); + Store("InitialVolume", InitialVolume); + +diff -ru vdr-1.4.3.orig/config.h vdr-1.4.3/config.h +--- vdr-1.4.3.orig/config.h 2006-09-23 15:56:08.000000000 +0200 ++++ vdr-1.4.3/config.h 2006-11-16 08:16:57.000000000 +0100 +@@ -250,6 +250,7 @@ + int CurrentChannel; + int CurrentVolume; + int CurrentDolby; ++ int LocalChannelProvide; + int InitialChannel; + int InitialVolume; + int __EndData__; +diff -ru vdr-1.4.3.orig/dvbdevice.c vdr-1.4.3/dvbdevice.c +--- vdr-1.4.3.orig/dvbdevice.c 2006-08-14 11:38:32.000000000 +0200 ++++ vdr-1.4.3/dvbdevice.c 2006-11-16 08:17:58.000000000 +0100 +@@ -766,6 +766,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 -ru vdr-1.4.3.orig/i18n.c vdr-1.4.3/i18n.c +--- vdr-1.4.3.orig/i18n.c 2006-09-16 11:08:30.000000000 +0200 ++++ vdr-1.4.3/i18n.c 2006-11-16 08:36:53.000000000 +0100 +@@ -3546,6 +3546,28 @@ + "Foretrukket sprog", + "Preferovaný jazyk", + }, ++ { "Setup.DVB$Use DVB receivers", ++ "DVB Empfangsteile benutzen", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ }, + { "Setup.DVB$Primary DVB interface", + "Primäres DVB-Interface", + "Primarna naprava", +diff -ru vdr-1.4.3.orig/menu.c vdr-1.4.3/menu.c +--- vdr-1.4.3.orig/menu.c 2006-07-23 11:23:11.000000000 +0200 ++++ vdr-1.4.3/menu.c 2006-11-16 08:37:27.000000000 +0100 +@@ -2354,6 +2354,7 @@ + + Clear(); + ++ Add(new cMenuEditBoolItem(tr("Setup.DVB$Use DVB receivers"), &data.LocalChannelProvide)); + 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")); + if (data.VideoFormat == 0) 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: |