summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS22
-rw-r--r--HISTORY34
-rw-r--r--MANUAL13
-rw-r--r--PLUGINS.html76
-rw-r--r--PLUGINS/src/sky/HISTORY4
-rw-r--r--PLUGINS/src/sky/sky.c10
-rw-r--r--channels.conf.terr17
-rw-r--r--config.c8
-rw-r--r--config.h6
-rw-r--r--device.c10
-rw-r--r--device.h5
-rw-r--r--eit.c5
-rw-r--r--i18n.c34
-rw-r--r--libdtv/liblx/liblx.h53
-rw-r--r--libdtv/liblx/xListFuncs.c53
-rw-r--r--libdtv/liblx/xMemMgt.c53
-rw-r--r--libdtv/libsi/include/libsi.h60
-rw-r--r--libdtv/libsi/include/si_tables.h36
-rw-r--r--libdtv/libsi/si_debug_services.c37
-rw-r--r--libdtv/libsi/si_parser.c66
-rw-r--r--libdtv/libvdr/libvdr.c120
-rw-r--r--menu.c19
-rw-r--r--menu.h6
-rwxr-xr-xnewplugin9
-rw-r--r--plugin.c25
-rw-r--r--plugin.h4
-rw-r--r--recording.c4
-rw-r--r--ringbuffer.c38
-rw-r--r--ringbuffer.h8
-rw-r--r--timers.c8
-rw-r--r--timers.h4
-rw-r--r--transfer.c6
-rw-r--r--transfer.h4
-rw-r--r--vdr.c25
34 files changed, 602 insertions, 280 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index f96e444..42b074d 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -171,6 +171,7 @@ Stefan Huelswitt <huels@iname.com>
don't indicate an actual encrypted channel
for implementing setting the "broken link" flag for GOPs at the beginning of a new
video sequence, which avoids artefacts when cutting
+ for suggesting to add VDRVERSNUM to config.h
Ulrich Röder <roeder@efr-net.de>
for pointing out that there are channels that have a symbol rate higher than
@@ -200,6 +201,9 @@ Andreas Schultz <aschultz@warp10.net>
for suggesting a Make.config file
for making EIT filtering use masks to reduce the number of filters
for suggesting to remove the Mute() call from cDvbDevice::StillPicture()
+ for suggesting to separate the startup of a plugin into an "early" and a "late" phase
+ for changing C++ style comments in libdtv into C style to avoid warnings in gcc 3.x
+ for implementing the TerrestrialDeliverySystemDescriptor in libdtv
Aaron Holtzman
for writing 'ac3dec'
@@ -408,6 +412,7 @@ Gregoire Favre <greg@ulima.unil.ch>
Sven Grothklags <sven@uni-paderborn.de>
for fixing the cutting mechanism to make it re-sync in case a frame is larger
than the buffer
+ for implementing the CableDeliverySystemDescriptor in libdtv
Tomas Prybil <tomas.prybil@copper.se>
for translating OSD texts to the Swedish language
@@ -584,6 +589,8 @@ Sascha Volkenandt <sascha@akv-soft.de>
for helping to fix a faulty behaviour of the "Mute" key in case the channel display
is visible
for making the 'epg.data' file being read after all plugins have been started
+ for reporting a problem with cReceivers that use a ring buffer and didn't immediately
+ return from their Receive() function if the buffer runs full
Malcolm Caldwell <malcolm.caldwell@ntu.edu.au>
for modifying LOF handling to allow for C-band reception
@@ -630,3 +637,18 @@ Kai Moeller <moeller.ki@gmx.de>
Carsten Siebholz <c.siebholz@t-online.de>
for adding cStatus::OsdItem() to provide the entire list of menu items to a plugin
+
+Wolfgang Goeller <wgoeller@heraklit.ch>
+ for reporting a bug in keeping live video active in case the primary device doesn't
+ have an MPEG decoder
+
+Jonan Santiago <jonan-lists-vdr@callisia.com>
+ for fixing handling EPG data where the "extended event descriptor" comes before the
+ "short event" or a "time shifted event"
+
+Juri Haberland <juri@koschikode.com>
+ for his help in keeping 'channels.conf.terr' up to date
+
+Alfred Zastrow <vdr@zastrow4u.de>
+ for suggesting to implement separate PausePriority and PauseLifetime parameters for
+ the recordings created when pausing live video
diff --git a/HISTORY b/HISTORY
index c436fdb..098c10d 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2108,3 +2108,37 @@ Video Disk Recorder Revision History
(thanks to Carsten Siebholz).
- The red ("Record") and yellow ("Pause") button in the "Main" menu are no longer
available when replaying.
+
+2003-05-11: Version 1.1.31
+
+- Introduced the new function cPlugin::Initialize(), in order to be able to separate
+ the startup of a plugin into an "early" (Initialize()) and "late" (Start()) phase
+ (suggested by Andreas Schultz). Plugin authors should please read the section
+ about "Getting started" in PLUGINS.html and adapt their code if applicable.
+- Implemented the CableDeliverySystemDescriptor and TerrestrialDeliverySystemDescriptor
+ in libdtv (thanks to Sven Grothklags and Andreas Schultz)
+- Fixed keeping live video active in case the primary device doesn't have an MPEG
+ decoder (thanks to Wolfgang Goeller for reporting this one).
+- Implemented cDevice::ActualDevice(), which returns the actual receiving device in
+ case of 'Transfer Mode', or the primary device otherwise. This may be useful for
+ plugins that want to attach a cReceiver to the device where the current live video
+ is actually coming from.
+- Added VDRVERSNUM to config.h, which can be used by the preprocessor to check the
+ actual VDR version (suggested by Stefan Huelswitt).
+- Removed the WaitForPut/WaitForGet stuff from cRingBuffer, since it appears to
+ no longer be necessary due to the implementation of cNonBlockingFileReader in
+ dvbplayer.c. Also, the long timeout in WaitForPut caused problems with cReceivers
+ that use a ring buffer and didn't immediately return from their Receive() function
+ if the buffer runs full (thanks to Sascha Volkenandt for reporting this one).
+- Fixed handling EPG data where the "extended event descriptor" comes before the
+ "short event" or a "time shifted event" (thanks to Jonan Santiago).
+- Disabled the "Received stuffing section in EIT" log message.
+- Updated 'channels.conf.terr' for Berlin (thanks to Juri Haberland).
+- Avoiding short display of the "Main" menu when pressing the "Recordings" button
+ or the "Back" button during replay.
+- Further increased the timeout until an index file is considerd no longer to be
+ written.
+- Implemented separate PausePriority and PauseLifetime parameters for the recordings
+ created when pausing live video (suggested by Alfred Zastrow).
+- Changed C++ style comments in libdtv into C style to avoid warnings in gcc 3.x
+ (thanks to Andreas Schultz).
diff --git a/MANUAL b/MANUAL
index be9ac52..a8ebee2 100644
--- a/MANUAL
+++ b/MANUAL
@@ -186,10 +186,11 @@ Video Disk Recorder User's Manual
You can start recording the current channel by pressing the "Red" button
in the "VDR" menu. This will create a timer event named "@channelname" that
- starts at the current time and records for two hours.
+ starts at the current time and by default records for 3 hours.
If you want to modify the recording time you need to edit the timer.
Stop instant recording by pressing the "Menu" button and selecting
- "Stop Recording", or by disabling the timer.
+ "Stop Recording", or by disabling the timer. The default priority, lifetime
+ and recording time can be defined in the "Setup/Recording" menu.
* Pausing live video
@@ -201,8 +202,9 @@ Video Disk Recorder User's Manual
your live viewing session. Once you're back, simply press the "Up" or "Play"
button and you'll be watching the current channel in time shift mode, right
from the point where you left off. The instant recording VDR has started
- will use the same parameters for priority, lifetime and recording duration
- as any other instant recording, so by default it will record 3 hours (which
+ will use the parameters for "Pause priority" and "Pause lifetime" as defined
+ in the "Setup/Recording" menu. Recording time will be the same as for
+ any other instant recording, so by default it will record 3 hours (which
should be enough for any normal broadcast).
* Replaying a Recording
@@ -548,6 +550,9 @@ Video Disk Recorder User's Manual
means that this recording will never be deleted
automatically.
+ Pause priority = 10 The Priority and Lifetime values used when pausing live
+ Pause lifetime = 1 video.
+
Use episode name = yes Repeating timers use the EPG's 'Episode name' information
to create recording file names in a hierarchical structure
(for instance to gather all episodes of a series in a
diff --git a/PLUGINS.html b/PLUGINS.html
index d6c3776..bd1a0d0 100644
--- a/PLUGINS.html
+++ b/PLUGINS.html
@@ -21,18 +21,18 @@ VDR program and present itself to the user.
The <i>internal</i> interface provides the plugin code access to VDR's internal data
structures and allows it to hook itself into specific areas to perform special actions.
<p>
-<!--X1.1.14--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
-Important modifications introduced in version 1.1.14 are marked like this.
-<!--X1.1.14--></td></tr></table>
-<!--X1.1.15--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
+<!--X1.1.15--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.1.15 are marked like this.
<!--X1.1.15--></td></tr></table>
-<!--X1.1.17--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
+<!--X1.1.17--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.1.17 are marked like this.
<!--X1.1.17--></td></tr></table>
-<!--X1.1.27--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+<!--X1.1.27--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.1.27 are marked like this.
<!--X1.1.27--></td></tr></table>
+<!--X1.1.31--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+Important modifications introduced in version 1.1.31 are marked like this.
+<!--X1.1.31--></td></tr></table>
<hr>
<h1>Table Of Contents</h1>
@@ -283,7 +283,12 @@ virtual ~cPlugin();
The <b>constructor</b> shall initialize any member variables the plugin defines, but
<b>must not access any global structures of VDR</b>.
It also must not create any threads or other large data structures. These things
-are done in the <a href="#Getting started"><tt>Start()</tt></a> function later.
+are done in the
+<!--X1.1.31--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+<a href="#Getting started"><tt>Initialize()</tt></a> or
+<a href="#Getting started"><tt>Start()</tt></a>
+<!--X1.1.31--></td></tr></table>
+function later.
Constructing a plugin object shall not have any side effects or produce any output,
since VDR, for instance, has to create the plugin objects in order to get their
command line help - and after that immediately destroys them again.
@@ -452,13 +457,28 @@ be shorter than 80 characters.
If a plugin implements a function that runs in the background (presumably in a
thread of its own), or wants to make use of <a href="#Internationalization">internationalization</a>,
-it needs to implement the function
+it needs to implement one of the functions
<p><table><tr><td bgcolor=#F0F0F0><pre><br>
+<!--X1.1.31--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%><pre>
+virtual bool Initialize(void);
+<!--X1.1.31--></pre></td></tr></table>
virtual bool Start(void);
</pre></td></tr></table><p>
-which is called once for each plugin at program startup.
+which are called once for each plugin at program startup.
+<!--X1.1.31--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+The difference between these two functions is that <tt>Initialize()</tt> is
+called early at program startup, while <tt>Start()</tt> is called after everything
+else has been set up, right before the main program loop is entered. Inside the
+<tt>Start()</tt> function of any plugin it is guaranteed that the <tt>Initialize()</tt>
+functions of all plugins have already been called. For many plugins it probably
+doesn't matter which of these functions they implement, but it may be of importance
+for, e.g., plugins that implement devices. Such plugins should create their cDevice
+derived objects in <tt>Initialize()</tt>, so that other plugins can use them in their
+<tt>Start()</tt> functions.
+<!--X1.1.31--></td></tr></table>
+<p>
Inside this function the plugin must set up everything necessary to perform
its task. This may, for instance, be a thread that collects data from the DVB
stream, which is later presented to the user via a function that is available
@@ -467,10 +487,11 @@ from the main menu.
A return value of <i>false</i> indicates that something has gone wrong and the
plugin will not be able to perform its task. In that case, the plugin should
write a proper error message to the log file. The first plugin that returns
-<i>false</i> from its <tt>Start()</tt> function will cause VDR to exit.
+<i>false</i> from its <tt>Initialize()</tt> or <tt>Start()</tt> function will cause
+VDR to exit.
<p>
If the plugin doesn't implement any background functionality or internationalized
-texts, it doesn't need to implement this function.
+texts, it doesn't need to implement either of these functions.
<a name="Main menu entry"><hr><h2>Main menu entry</h2>
@@ -506,7 +527,7 @@ in the call to VDR.
If the user selects the main menu entry of a plugin, VDR calls the function
-<!--X1.1.17--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
+<!--X1.1.17--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
<p><table><tr><td bgcolor=#F0F0F0><pre><br>
virtual cOsdObject *MainMenuAction(void);
</pre></td></tr></table><p>
@@ -759,7 +780,8 @@ void RegisterI18n(const tI18nPhrase * const Phrases);
to register them with VDR's internationalization mechanism.
<p>
-The call to this function must be done in the <a href="#Getting started"><tt>Start()</tt></a> function of the plugin:
+The call to this function must be done in the <a href="#Getting started"><tt>Initialize()</tt></a>
+or <a href="#Getting started"><tt>Start()</tt></a> function of the plugin:
<p><table><tr><td bgcolor=#F0F0F0><pre><br>
const tI18nPhrase Phrases[] = {
@@ -1022,7 +1044,7 @@ virtual void SetAudioTrack(int Index);
</pre></td></tr></table><p>
<p>
-<!--X1.1.15--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
+<!--X1.1.15--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
If there is an additional audio track that has to be replayed with external hardware,
the player shall call its member function
@@ -1178,9 +1200,16 @@ a <tt>cDevice</tt>:
<p><table><tr><td bgcolor=#F0F0F0><pre><br>
cMyReceiver *Receiver = new cMyReceiver(123);
-cDevice::PrimaryDevice()-&gt;AttachReceiver(Receiver);
+<!--X1.1.31--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+cDevice::ActualDevice()-&gt;AttachReceiver(Receiver);
+<!--X1.1.31--></td></tr></table>
</pre></td></tr></table><p>
+Noteh the use of <tt>cDevice::ActualDevice()</tt> here, which makes sure that
+the receiver is attached to the device that actually receives the current live
+video stream (this may be different from the primary device in case of <i>Transfer
+Mode</i>).
+<p>
If the <tt>cReceiver</tt> isn't needed any more, it may simply be <i>deleted</i>
and will automatically detach itself from the <tt>cDevice</tt>.
@@ -1303,9 +1332,7 @@ The functions to implement replaying capabilites are
<p><table><tr><td bgcolor=#F0F0F0><pre><br>
virtual bool HasDecoder(void) const;
-<!--X1.1.14--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
virtual bool CanReplay(void) const;
-<!--X1.1.14--></td></tr></table>
virtual bool SetPlayMode(ePlayMode PlayMode);
virtual void TrickSpeed(int Speed);
virtual void Clear(void);
@@ -1345,20 +1372,19 @@ needed.
<p>
<b>Initializing new devices</b>
<p>
+<!--X1.1.31--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
A derived cDevice class shall implement a static function
-
-<p><table><tr><td bgcolor=#F0F0F0><pre><br>
-static bool Initialize(void);
-</pre></td></tr></table><p>
-
in which it determines whether the necessary hardware to run this sort of
device is actually present in this machine (or whatever other prerequisites
might be important), and then creates as many device objects as necessary.
See <tt>VDR/dvbdevice.c</tt> for the implementation of the <tt>cDvbDevice</tt>
initialize function.
<p>
-A plugin that adds devices to a VDR instance shall call this initializing
-function from its <a href="#Getting started"><tt>Start()</tt></a> function.
+A plugin that adds devices to a VDR instance shall call this
+function from its <a href="#Getting started"><tt>Initialize()</tt></a> function
+to make sure other plugins that may need to have access to all available devices
+will see them in their <a href="#Getting started"><tt>Start()</tt></a> function.
+<!--X1.1.31--></td></tr></table>
<p>
Nothing needs to be done to shut down the devices. VDR will automatically
shut down (delete) all devices when the program terminates. It is therefore
@@ -1476,7 +1502,7 @@ the incoming data (by calling your <tt>Action()</tt> function).
In case you need to do any other setup steps, like opening a file or initializing
member variables, you should do so before calling <tt>Start()</tt>.
<p>
-<!--X1.1.27--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+<!--X1.1.27--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
If your remote control for some reason can't work (maybe because it was unable to
open some file handle it requires) it can implement the virtual function
diff --git a/PLUGINS/src/sky/HISTORY b/PLUGINS/src/sky/HISTORY
index bdb440b..d41904e 100644
--- a/PLUGINS/src/sky/HISTORY
+++ b/PLUGINS/src/sky/HISTORY
@@ -8,3 +8,7 @@ VDR Plugin 'sky' Revision History
2002-12-13: Version 0.1.0
- Changed setting of CXX and CXXFLAGS variables in Makefile.
+
+2003-05-09: Version 0.1.1
+
+- Changed Start() to Initialize().
diff --git a/PLUGINS/src/sky/sky.c b/PLUGINS/src/sky/sky.c
index d6e10c9..ae59137 100644
--- a/PLUGINS/src/sky/sky.c
+++ b/PLUGINS/src/sky/sky.c
@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
- * $Id: sky.c 1.2 2002/12/13 15:01:57 kls Exp $
+ * $Id: sky.c 1.3 2003/05/09 15:27:16 kls Exp $
*/
#include <sys/socket.h>
@@ -14,7 +14,7 @@
#include <vdr/plugin.h>
#include <vdr/sources.h>
-static const char *VERSION = "0.1.0";
+static const char *VERSION = "0.1.1";
static const char *DESCRIPTION = "Sky Digibox interface";
// --- cDigiboxDevice --------------------------------------------------------
@@ -186,7 +186,7 @@ public:
virtual const char *Description(void) { return DESCRIPTION; }
virtual const char *CommandLineHelp(void);
virtual bool ProcessArgs(int argc, char *argv[]);
- virtual bool Start(void);
+ virtual bool Initialize(void);
virtual void Housekeeping(void);
virtual cMenuSetupPage *SetupMenu(void);
virtual bool SetupParse(const char *Name, const char *Value);
@@ -216,9 +216,9 @@ bool cPluginSky::ProcessArgs(int argc, char *argv[])
return true;
}
-bool cPluginSky::Start(void)
+bool cPluginSky::Initialize(void)
{
- // Start any background activities the plugin shall perform.
+ // Initialize any background activities the plugin shall perform.
new cDigiboxDevice;
return true;
}
diff --git a/channels.conf.terr b/channels.conf.terr
index 548f021..79c59a1 100644
--- a/channels.conf.terr
+++ b/channels.conf.terr
@@ -50,18 +50,17 @@ RTL:506000:I0C23D0M16B8T8G8Y0:T:27500:337:338:343:0:16405:0:0:0
RTL2:506000:I0C23D0M16B8T8G8Y0:T:27500:353:354:359:0:16406:0:0:0
Super RTL:506000:I0C23D0M16B8T8G8Y0:T:27500:433:434:439:0:16411:0:0:0
VOX:506000:I0C23D0M16B8T8G8Y0:T:27500:545:546:551:0:16418:0:0:0
-ORB-Fernsehen:522000:I0C23D0M16B8T8G8Y0:T:27500:1101:1102:1104:0:11:0:0:0
-SFB1:522000:I0C23D0M16B8T8G8Y0:T:27500:1201:1202:1204:0:12:0:0:0
+RBB Brandenburg:522000:I0C23D0M16B8T8G8Y0:T:27500:1101:1102:1104:0:11:0:0:0
+RBB Berlin:522000:I0C23D0M16B8T8G8Y0:T:27500:1201:1202:1204:0:12:0:0:0
Phoenix:522000:I0C23D0M16B8T8G8Y0:T:27500:1301:1302:1304:0:13:0:0:0
Das Erste:522000:I0C23D0M16B8T8G8Y0:T:27500:1401:1402:1404:0:14:0:0:0
ZDF:570000:I0C23D0M16B8T8G8Y0:T:27500:545:546:551:0:514:0:0:0
-ZDFinfokanal:570000:I0C23D0M16B8T8G8Y0:T:27500:561:562:551:0:515:0:0:0
-ZDFdokukanal:570000:I0C23D0M16B8T8G8Y0:T:27500:577:578:551:0:516:0:0:0
-KiKa:570000:I0C23D0M16B8T8G8Y0:T:27500:593:594:599:0:517:0:0:0
-Kabel 1:658000:I0C23D0M16B8T8G8Y0:T:27500:161:162:163:0:16394:0:0:0
-N24:658000:I0C23D0M16B8T8G8Y0:T:27500:225:226:227:0:16398:0:0:0
-ProSieben:658000:I0C23D0M16B8T8G8Y0:T:27500:305:306;307:308:0:16403:0:0:0
-SAT.1:658000:I0C23D0M16B8T8G8Y0:T:27500:385:386:387:0:16408:0:0:0
+Info/3sat:570000:I0C23D0M16B8T8G8Y0:T:27500:561:562:551:0:515:0:0:0
+Doku/KiKa:570000:I0C23D0M16B8T8G8Y0:T:27500:593:594:599:0:517:0:0:0
+Kabel 1:658000:I0C23D0M16B8T8G8Y0:T:27500:161:162:167:0:16394:0:0:0
+N24:658000:I0C23D0M16B8T8G8Y0:T:27500:225:226:231:0:16398:0:0:0
+ProSieben:658000:I0C23D0M16B8T8G8Y0:T:27500:305:306;307:311:0:16403:0:0:0
+SAT.1:658000:I0C23D0M16B8T8G8Y0:T:27500:385:386:391:0:16408:0:0:0
MTV:778000:I0C23D0M16B8T8G8Y0:T:27500:193:194:199:0:16396:0:0:0
n-tv:778000:I0C23D0M16B8T8G8Y0:T:27500:273:274:279:0:16401:0:0:0
Eurosport:778000:I0C23D0M16B8T8G8Y0:T:27500:577:578:583:0:16420:0:0:0
diff --git a/config.c b/config.c
index ff7a4c0..8a30d3c 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c 1.113 2003/04/12 09:37:48 kls Exp $
+ * $Id: config.c 1.114 2003/05/11 13:50:02 kls Exp $
*/
#include "config.h"
@@ -266,6 +266,8 @@ cSetup::cSetup(void)
PrimaryLimit = 0;
DefaultPriority = 50;
DefaultLifetime = 50;
+ PausePriority = 10;
+ PauseLifetime = 1;
UseSubtitle = 1;
RecordingDirs = 1;
VideoFormat = 0;
@@ -415,6 +417,8 @@ bool cSetup::Parse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "PrimaryLimit")) PrimaryLimit = atoi(Value);
else if (!strcasecmp(Name, "DefaultPriority")) DefaultPriority = atoi(Value);
else if (!strcasecmp(Name, "DefaultLifetime")) DefaultLifetime = atoi(Value);
+ else if (!strcasecmp(Name, "PausePriority")) PausePriority = atoi(Value);
+ else if (!strcasecmp(Name, "PauseLifetime")) PauseLifetime = atoi(Value);
else if (!strcasecmp(Name, "UseSubtitle")) UseSubtitle = atoi(Value);
else if (!strcasecmp(Name, "RecordingDirs")) RecordingDirs = atoi(Value);
else if (!strcasecmp(Name, "VideoFormat")) VideoFormat = atoi(Value);
@@ -462,6 +466,8 @@ bool cSetup::Save(void)
Store("PrimaryLimit", PrimaryLimit);
Store("DefaultPriority", DefaultPriority);
Store("DefaultLifetime", DefaultLifetime);
+ Store("PausePriority", PausePriority);
+ Store("PauseLifetime", PauseLifetime);
Store("UseSubtitle", UseSubtitle);
Store("RecordingDirs", RecordingDirs);
Store("VideoFormat", VideoFormat);
diff --git a/config.h b/config.h
index 343ed15..f474ef9 100644
--- a/config.h
+++ b/config.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.h 1.155 2003/04/27 15:56:04 kls Exp $
+ * $Id: config.h 1.158 2003/05/11 13:45:44 kls Exp $
*/
#ifndef __CONFIG_H
@@ -19,7 +19,8 @@
#include "device.h"
#include "tools.h"
-#define VDRVERSION "1.1.30"
+#define VDRVERSION "1.1.31"
+#define VDRVERSNUM 10131 // Version * 10000 + Major * 100 + Minor
#define MAXPRIORITY 99
#define MAXLIFETIME 99
@@ -217,6 +218,7 @@ public:
int SortTimers;
int PrimaryLimit;
int DefaultPriority, DefaultLifetime;
+ int PausePriority, PauseLifetime;
int UseSubtitle;
int RecordingDirs;
int VideoFormat;
diff --git a/device.c b/device.c
index 9346d3b..b248114 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 1.41 2003/05/03 13:40:15 kls Exp $
+ * $Id: device.c 1.42 2003/05/11 08:53:09 kls Exp $
*/
#include "device.h"
@@ -130,6 +130,14 @@ cSpuDecoder *cDevice::GetSpuDecoder(void)
return NULL;
}
+cDevice *cDevice::ActualDevice(void)
+{
+ cDevice *d = cTransferControl::ReceiverDevice();
+ if (!d)
+ d = PrimaryDevice();
+ return d;
+}
+
cDevice *cDevice::GetDevice(int Index)
{
return (0 <= Index && Index < numDevices) ? device[Index] : NULL;
diff --git a/device.h b/device.h
index d2cc4f8..a41312a 100644
--- a/device.h
+++ b/device.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.h 1.32 2003/05/03 13:35:55 kls Exp $
+ * $Id: device.h 1.33 2003/05/11 08:50:04 kls Exp $
*/
#ifndef __DEVICE_H
@@ -75,6 +75,9 @@ public:
///< \return true if this was possible.
static cDevice *PrimaryDevice(void) { return primaryDevice; }
///< Returns the primary device.
+ static cDevice *ActualDevice(void);
+ ///< Returns the actual receiving device in case of Transfer Mode, or the
+ ///< primary device otherwise.
static cDevice *GetDevice(int Index);
///< Gets the device with the given Index.
///< \param Index must be in the range 0..numDevices-1.
diff --git a/eit.c b/eit.c
index 9b2442c..76da266 100644
--- a/eit.c
+++ b/eit.c
@@ -16,7 +16,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: eit.c 1.74 2003/04/27 14:41:36 kls Exp $
+ * $Id: eit.c 1.75 2003/05/11 11:25:04 kls Exp $
***************************************************************************/
#include "eit.h"
@@ -1291,8 +1291,9 @@ void cSIProcessor::Action()
cEIT ceit(buf, seclen, schedules);
ceit.ProcessEIT(buf, currentSource);
}
- else
+ /*else
dsyslog("Received stuffing section in EIT\n");
+ */
break;
default: {
diff --git a/i18n.c b/i18n.c
index 734e015..34b2423 100644
--- a/i18n.c
+++ b/i18n.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: i18n.c 1.107 2003/05/01 14:10:18 kls Exp $
+ * $Id: i18n.c 1.108 2003/05/11 13:54:23 kls Exp $
*
* Translations provided by:
*
@@ -2222,6 +2222,38 @@ const tI18nPhrase Phrases[] = {
"Prioritate implicita",
"Default priority",
},
+ { "Setup.Recording$Pause lifetime (d)",
+ "Pause Lebensdauer (d)",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
+ { "Setup.Recording$Pause priority",
+ "Pause Priorität",
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ "",// TODO
+ },
{ "Setup.Recording$Default lifetime (d)",
"Default Lebensdauer (d)",
"Osnovni zivljenski cas (d)",
diff --git a/libdtv/liblx/liblx.h b/libdtv/liblx/liblx.h
index 26ea664..2e12295 100644
--- a/libdtv/liblx/liblx.h
+++ b/libdtv/liblx/liblx.h
@@ -1,29 +1,30 @@
-//////////////////////////////////////////////////////////////
-/// ///
-/// liblx.h: definitions necessary for the liblx package ///
-/// ///
-//////////////////////////////////////////////////////////////
-
-// $Revision: 1.2 $
-// $Date: 2001/06/25 19:39:00 $
-// $Author: hakenes $
-//
-// (C) 1992-2001 Rolf Hakenes <hakenes@hippomi.de>, under the GNU GPL.
-//
-// liblx is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// liblx is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You may have received a copy of the GNU General Public License
-// along with liblx; see the file COPYING. If not, write to the
-// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-// Boston, MA 02111-1307, USA.
+/*
+ *
+ * liblx.h: definitions necessary for the liblx package
+ *
+ *
+ * $Revision: 1.2 $
+ * $Date: 2001/06/25 19:39:00 $
+ * $Author: hakenes $
+ *
+ * (C) 1992-2001 Rolf Hakenes <hakenes@hippomi.de>, under the GNU GPL.
+ *
+ * liblx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * liblx is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You may have received a copy of the GNU General Public License
+ * along with liblx; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
#ifndef LIBLX_H
#define LIBLX_H
diff --git a/libdtv/liblx/xListFuncs.c b/libdtv/liblx/xListFuncs.c
index 01b85b8..88a908b 100644
--- a/libdtv/liblx/xListFuncs.c
+++ b/libdtv/liblx/xListFuncs.c
@@ -1,29 +1,30 @@
-//////////////////////////////////////////////////////////////
-/// ///
-/// xListFuncs.c: list handling functions of liblx ///
-/// ///
-//////////////////////////////////////////////////////////////
-
-// $Revision: 1.1 $
-// $Date: 2001/06/25 12:29:47 $
-// $Author: hakenes $
-//
-// (C) 1992-2001 Rolf Hakenes <hakenes@hippomi.de>, under the GNU GPL.
-//
-// liblx is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// liblx is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You may have received a copy of the GNU General Public License
-// along with liblx; see the file COPYING. If not, write to the
-// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-// Boston, MA 02111-1307, USA.
+/*
+ *
+ * xListFuncs.c: list handling functions of liblx
+ *
+ *
+ * $Revision: 1.1 $
+ * $Date: 2001/06/25 12:29:47 $
+ * $Author: hakenes $
+ *
+ * (C) 1992-2001 Rolf Hakenes <hakenes@hippomi.de>, under the GNU GPL.
+ *
+ * liblx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * liblx is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You may have received a copy of the GNU General Public License
+ * along with liblx; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
#include <string.h>
#include "liblx.h"
diff --git a/libdtv/liblx/xMemMgt.c b/libdtv/liblx/xMemMgt.c
index c93713b..b1b07de 100644
--- a/libdtv/liblx/xMemMgt.c
+++ b/libdtv/liblx/xMemMgt.c
@@ -1,29 +1,30 @@
-//////////////////////////////////////////////////////////////
-/// ///
-/// xMemMgt.c: memory management functions of liblx ///
-/// ///
-//////////////////////////////////////////////////////////////
-
-// $Revision: 1.1 $
-// $Date: 2001/06/25 12:29:47 $
-// $Author: hakenes $
-//
-// (C) 1992-2001 Rolf Hakenes <hakenes@hippomi.de>, under the GNU GPL.
-//
-// liblx is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// liblx is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You may have received a copy of the GNU General Public License
-// along with liblx; see the file COPYING. If not, write to the
-// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-// Boston, MA 02111-1307, USA.
+/*
+ *
+ * xMemMgt.c: memory management functions of liblx
+ *
+ *
+ * $Revision: 1.1 $
+ * $Date: 2001/06/25 12:29:47 $
+ * $Author: hakenes $
+ *
+ * (C) 1992-2001 Rolf Hakenes <hakenes@hippomi.de>, under the GNU GPL.
+ *
+ * liblx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * liblx is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You may have received a copy of the GNU General Public License
+ * along with liblx; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
#include <stdio.h>
#include <stdlib.h>
diff --git a/libdtv/libsi/include/libsi.h b/libdtv/libsi/include/libsi.h
index 715d18b..b2f8ba2 100644
--- a/libdtv/libsi/include/libsi.h
+++ b/libdtv/libsi/include/libsi.h
@@ -1037,23 +1037,81 @@ struct SatelliteDeliverySystemDescriptor {
unsigned short Tag;
long Frequency;
short OrbitalPosition;
+ short Modulation;
char Polarization;
long SymbolRate;
char FEC;
};
-#define CreateSatelliteDeliverySystemDescriptor(descr, freq, orb, polar, sr, fec) \
+#define CreateSatelliteDeliverySystemDescriptor(descr, freq, orb, mod, polar, sr, fec) \
do \
{ \
xCreateNode (((struct SatelliteDeliverySystemDescriptor *)descr), NULL); \
((struct SatelliteDeliverySystemDescriptor *)descr)->Tag = DESCR_SAT_DEL_SYS; \
((struct SatelliteDeliverySystemDescriptor *)descr)->Frequency = freq; \
((struct SatelliteDeliverySystemDescriptor *)descr)->OrbitalPosition = orb; \
+ ((struct SatelliteDeliverySystemDescriptor *)descr)->Modulation = mod; \
((struct SatelliteDeliverySystemDescriptor *)descr)->Polarization = polar; \
((struct SatelliteDeliverySystemDescriptor *)descr)->SymbolRate = sr; \
((struct SatelliteDeliverySystemDescriptor *)descr)->FEC = fec; \
} while (0)
+/* CableDeliverySystemDescriptor */
+
+struct CableDeliverySystemDescriptor {
+ struct NODE Node;
+ unsigned short Tag;
+ long Frequency;
+ long SymbolRate;
+ char FECouter;
+ char FECinner;
+ char Modulation;
+};
+
+#define CreateCableDeliverySystemDescriptor(descr, freq, sr, fec_o, fec_i, mod) \
+ do \
+ { \
+ xCreateNode (((struct CableDeliverySystemDescriptor *)descr), NULL); \
+ ((struct CableDeliverySystemDescriptor *)descr)->Tag = DESCR_CABLE_DEL_SYS; \
+ ((struct CableDeliverySystemDescriptor *)descr)->Frequency = freq; \
+ ((struct CableDeliverySystemDescriptor *)descr)->SymbolRate = sr; \
+ ((struct CableDeliverySystemDescriptor *)descr)->FECouter = fec_o; \
+ ((struct CableDeliverySystemDescriptor *)descr)->FECinner = fec_i; \
+ ((struct CableDeliverySystemDescriptor *)descr)->Modulation = mod; \
+ } while (0)
+
+/* TerrestrialDeliverySystemDescriptor */
+
+struct TerrestrialDeliverySystemDescriptor {
+ struct NODE Node;
+ unsigned short Tag;
+ long Frequency;
+ char Bandwidth;
+ char Constellation;
+ char Hierarchy;
+ char CodeRateHP;
+ char CodeRateLP;
+ char GuardInterval;
+ char TransmissionMode;
+ char OtherFrequencyFlag;
+};
+
+#define CreateTerrestrialDeliverySystemDescriptor(descr, freq, bw, cst, hr, crh, crl, gi, tm, ofm) \
+ do \
+ { \
+ xCreateNode (((struct CableDeliverySystemDescriptor *)descr), NULL); \
+ ((struct TerrestrialDeliverySystemDescriptor *)descr)->Tag = DESCR_TERR_DEL_SYS; \
+ ((struct TerrestrialDeliverySystemDescriptor *)descr)->Frequency = freq; \
+ ((struct TerrestrialDeliverySystemDescriptor *)descr)->Bandwidth = bw; \
+ ((struct TerrestrialDeliverySystemDescriptor *)descr)->Constellation = cst; \
+ ((struct TerrestrialDeliverySystemDescriptor *)descr)->Hierarchy = hr; \
+ ((struct TerrestrialDeliverySystemDescriptor *)descr)->CodeRateHP = crh; \
+ ((struct TerrestrialDeliverySystemDescriptor *)descr)->CodeRateLP = crl; \
+ ((struct TerrestrialDeliverySystemDescriptor *)descr)->GuardInterval = gi; \
+ ((struct TerrestrialDeliverySystemDescriptor *)descr)->TransmissionMode = tm; \
+ ((struct TerrestrialDeliverySystemDescriptor *)descr)->OtherFrequencyFlag = ofm; \
+ } while (0)
+
/* ServiceListDescriptor */
struct ServiceListDescriptor {
diff --git a/libdtv/libsi/include/si_tables.h b/libdtv/libsi/include/si_tables.h
index b7cfea2..24c316d 100644
--- a/libdtv/libsi/include/si_tables.h
+++ b/libdtv/libsi/include/si_tables.h
@@ -1126,7 +1126,41 @@ typedef struct item_subtitling_struct {
typedef struct descr_terrestrial_delivery_struct {
u_char descriptor_tag :8;
u_char descriptor_length :8;
- /* TBD */
+ u_char frequency1 :8;
+ u_char frequency2 :8;
+ u_char frequency3 :8;
+ u_char frequency4 :8;
+#if BYTE_ORDER == BIG_ENDIAN
+ u_char bandwidth :3;
+ u_char reserved1 :5;
+#else
+ u_char reserved1 :5;
+ u_char bandwidth :3;
+#endif
+#if BYTE_ORDER == BIG_ENDIAN
+ u_char constellation :2;
+ u_char hierarchy :3;
+ u_char code_rate_HP :3;
+#else
+ u_char code_rate_HP :3;
+ u_char hierarchy :3;
+ u_char constellation :2;
+#endif
+#if BYTE_ORDER == BIG_ENDIAN
+ u_char code_rate_LP :3;
+ u_char guard_interval :2;
+ u_char transmission_mode :2;
+ u_char other_frequency_flag :1;
+#else
+ u_char other_frequency_flag :1;
+ u_char transmission_mode :2;
+ u_char guard_interval :2;
+ u_char code_rate_LP :3;
+#endif
+ u_char reserver2 :8;
+ u_char reserver3 :8;
+ u_char reserver4 :8;
+ u_char reserver5 :8;
} descr_terrestrial_delivery_system_t;
#define CastTerrestrialDeliverySystemDescriptor(x) ((descr_terrestrial_delivery_system_t *)(x))
diff --git a/libdtv/libsi/si_debug_services.c b/libdtv/libsi/si_debug_services.c
index ac8de34..1ff7400 100644
--- a/libdtv/libsi/si_debug_services.c
+++ b/libdtv/libsi/si_debug_services.c
@@ -535,11 +535,44 @@ void siDebugDescriptors (char *Prepend, struct LIST *Descriptors)
printf ("%s Frequency: %ld\n", Prepend, sds->Frequency);
printf ("%s OrbitalPosition: %d\n", Prepend, sds->OrbitalPosition);
printf ("%s Polarization: %c\n", Prepend, sds->Polarization);
+ printf ("%s Modulation: %c\n", Prepend, sds->Modulation);
printf ("%s SymbolRate: %ld\n", Prepend, sds->SymbolRate);
printf ("%s FEC: %c\n", Prepend, sds->FEC);
}
break;
+ case DESCR_CABLE_DEL_SYS:
+ {
+ struct CableDeliverySystemDescriptor *cds =
+ (struct CableDeliverySystemDescriptor *)Descriptor;
+
+ printf ("%sDescriptor: Cable Delivery System\n", Prepend);
+ printf ("%s Frequency: %ld\n", Prepend, cds->Frequency);
+ printf ("%s SymbolRate: %ld\n", Prepend, cds->SymbolRate);
+ printf ("%s FEC outer: %d\n", Prepend, cds->FECouter);
+ printf ("%s FEC inner: %d\n", Prepend, cds->FECinner);
+ printf ("%s Modulation: %d\n", Prepend, cds->Modulation);
+ }
+ break;
+
+ case DESCR_TERR_DEL_SYS:
+ {
+ struct TerrestrialDeliverySystemDescriptor *tds =
+ (struct TerrestrialDeliverySystemDescriptor *)Descriptor;
+
+ printf ("%sDescriptor: Terrestrial Delivery System\n", Prepend);
+ printf ("%s Frequency: %ld\n", Prepend, tds->Frequency);
+ printf ("%s Bandwidth: %d\n", Prepend, tds->Bandwidth);
+ printf ("%s Constellation: %d\n", Prepend, tds->Constellation);
+ printf ("%s Hierarchy: %d\n", Prepend, tds->Hierarchy);
+ printf ("%s CodeRateHP: %d\n", Prepend, tds->CodeRateHP);
+ printf ("%s CodeRateLP: %d\n", Prepend, tds->CodeRateLP);
+ printf ("%s GuardInterval: %d\n", Prepend, tds->GuardInterval);
+ printf ("%s TransmissionMode: %d\n", Prepend, tds->TransmissionMode);
+ printf ("%s OtherFrequencyFlag: %d\n", Prepend, tds->OtherFrequencyFlag);
+ }
+ break;
+
case DESCR_SERVICE_LIST:
{
struct ServiceListEntry *Entry;
@@ -572,12 +605,10 @@ void siDebugDescriptors (char *Prepend, struct LIST *Descriptors)
break;
case DESCR_STUFFING:
- case DESCR_CABLE_DEL_SYS:
case DESCR_VBI_DATA:
case DESCR_VBI_TELETEXT:
case DESCR_MOSAIC:
case DESCR_TELEPHONE:
- case DESCR_TERR_DEL_SYS:
case DESCR_ML_NW_NAME:
case DESCR_ML_BQ_NAME:
case DESCR_ML_SERVICE_NAME:
@@ -598,7 +629,7 @@ void siDebugDescriptors (char *Prepend, struct LIST *Descriptors)
case DESCR_CELL_FREQ_LINK:
case DESCR_ANNOUNCEMENT_SUPPORT:
default:
- printf ("%sDescriptor: (noch nicht unterstützt)\n", Prepend);
+ printf ("%sDescriptor: %02x (noch nicht unterstützt)\n", Prepend, DescriptorTag (Descriptor));
break;
}
}
diff --git a/libdtv/libsi/si_parser.c b/libdtv/libsi/si_parser.c
index e8cf8b2..a922b7e 100644
--- a/libdtv/libsi/si_parser.c
+++ b/libdtv/libsi/si_parser.c
@@ -1050,6 +1050,7 @@ void siParseDescriptor (struct LIST *Descriptors, u_char *Buffer)
(sds->west_east_flag ? 1 : -1) *
(BcdCharToInt (sds->orbital_position1) * 100 +
BcdCharToInt (sds->orbital_position2)),
+ sds->modulation,
sds->polarization,
BcdCharToInt (sds->symbol_rate1) * 10 * 1000 +
BcdCharToInt (sds->symbol_rate2) * 100 +
@@ -1064,6 +1065,68 @@ void siParseDescriptor (struct LIST *Descriptors, u_char *Buffer)
}
break;
+ case DESCR_CABLE_DEL_SYS:
+// fprintf (stderr, "got descriptor 0x%x\n", GetDescriptorTag(Buffer));
+ {
+ descr_cable_delivery_system_t *cds;
+ cds = (descr_cable_delivery_system_t *) Ptr;
+ if (CheckBcdChar (cds->frequency1) && CheckBcdChar (cds->frequency2) &&
+ CheckBcdChar (cds->frequency3) && CheckBcdChar (cds->frequency4) &&
+ CheckBcdChar (cds->symbol_rate1) && CheckBcdChar (cds->symbol_rate1) &&
+ CheckBcdChar (cds->symbol_rate3) && (cds->fec_inner != 0))
+ {
+ CreateCableDeliverySystemDescriptor (Descriptor,
+ BcdCharToInt (cds->frequency1) * 100 * 1000 * 1000 +
+ BcdCharToInt (cds->frequency2) * 1000 * 1000 +
+ BcdCharToInt (cds->frequency3) * 10 * 1000 +
+ BcdCharToInt (cds->frequency4) * 100,
+ BcdCharToInt (cds->symbol_rate1) * 10 * 1000 +
+ BcdCharToInt (cds->symbol_rate2) * 100 +
+ BcdCharToInt (cds->symbol_rate3),
+ cds->fec_outer,
+ cds->fec_inner,
+ cds->modulation
+ );
+ }
+ /* else
+ {
+ fprintf (stderr, "Illegal cds descriptor\n");
+ siDumpDescriptor (Buffer);
+ } */
+ }
+ break;
+
+ case DESCR_TERR_DEL_SYS:
+// fprintf (stderr, "got descriptor 0x%x\n", GetDescriptorTag(Buffer));
+ {
+ descr_terrestrial_delivery_system_t *tds;
+ tds = (descr_terrestrial_delivery_system_t *) Ptr;
+ if (CheckBcdChar (tds->frequency1) && CheckBcdChar (tds->frequency2) &&
+ CheckBcdChar (tds->frequency3) && CheckBcdChar (tds->frequency4))
+ {
+ CreateTerrestrialDeliverySystemDescriptor (Descriptor,
+ BcdCharToInt (tds->frequency1) * 100 * 1000 * 1000 +
+ BcdCharToInt (tds->frequency2) * 1000 * 1000 +
+ BcdCharToInt (tds->frequency3) * 10 * 1000 +
+ BcdCharToInt (tds->frequency4) * 100,
+ tds->bandwidth,
+ tds->constellation,
+ tds->hierarchy,
+ tds->code_rate_HP,
+ tds->code_rate_LP,
+ tds->guard_interval,
+ tds->transmission_mode,
+ tds->other_frequency_flag
+ );
+ }
+ /* else
+ {
+ fprintf (stderr, "Illegal cds descriptor\n");
+ siDumpDescriptor (Buffer);
+ } */
+ }
+ break;
+
case DESCR_SERVICE_LIST:
// fprintf (stderr, "got descriptor 0x%x\n", GetDescriptorTag(Buffer));
CreateServiceListDescriptor (Descriptor);
@@ -1119,12 +1182,10 @@ void siParseDescriptor (struct LIST *Descriptors, u_char *Buffer)
case DESCR_SMOOTHING_BUFFER:
case DESCR_STD:
case DESCR_IBP:
- case DESCR_CABLE_DEL_SYS:
case DESCR_VBI_DATA:
case DESCR_VBI_TELETEXT:
case DESCR_MOSAIC:
case DESCR_TELEPHONE:
- case DESCR_TERR_DEL_SYS:
case DESCR_ML_NW_NAME:
case DESCR_ML_BQ_NAME:
case DESCR_ML_SERVICE_NAME:
@@ -1181,7 +1242,6 @@ char *siGetDescriptorTextHandler (u_char *Buffer, int Length, int type)
if ((*Buffer >= ' ' && *Buffer <= '~') || (*Buffer == '\n') ||
(*Buffer >= 0xa0 && *Buffer <= 0xff)) *tmp++ = *Buffer;
if (*Buffer == 0x8A) *tmp++ = '\n';
- if (*Buffer == 0x86 || *Buffer == 0x87) *tmp++ = ' ';
if ((*Buffer == 0x86 || *Buffer == 0x87) && !(GDT_NAME_DESCRIPTOR & type)) *tmp++ = ' ';
Buffer++;
}
diff --git a/libdtv/libvdr/libvdr.c b/libdtv/libvdr/libvdr.c
index 0ade4d3..e041fd8 100644
--- a/libdtv/libvdr/libvdr.c
+++ b/libdtv/libvdr/libvdr.c
@@ -47,7 +47,8 @@ struct LIST *createVdrProgramInfos (unsigned char *siBuffer)
struct LIST *Result, *EventList;
struct Event *Event;
struct Descriptor *Descriptor;
-
+ int GotVdrProgramInfo;
+
if (!siBuffer) return (NULL);
if (!(EventList = siParseEIT (siBuffer))) return (NULL);
@@ -57,9 +58,18 @@ struct LIST *createVdrProgramInfos (unsigned char *siBuffer)
xForeach (EventList, Event)
{
VdrProgramInfo = NULL;
-
+ GotVdrProgramInfo = 0;
+
xForeach (Event->Descriptors, Descriptor)
{
+ if (!VdrProgramInfo)
+ {
+ CreateVdrProgramInfo(VdrProgramInfo,
+ Event->EventID, Event->TransportStreamID,
+ Event->ServiceID, Event->StartTime,
+ Event->Duration, Event->Status);
+ }
+
switch (Descriptor->Tag)
{
case DESCR_SHORT_EVENT:
@@ -67,43 +77,29 @@ struct LIST *createVdrProgramInfos (unsigned char *siBuffer)
if (!xName(Descriptor) || !xName(Descriptor)[0])
break;
- if (!VdrProgramInfo)
- {
- CreateVdrProgramInfo(VdrProgramInfo,
- Event->EventID, Event->TransportStreamID,
- Event->ServiceID, Event->StartTime,
- Event->Duration, Event->Status);
-
- VdrProgramInfo->ShortName =
- xSetText (xName (Descriptor));
- VdrProgramInfo->ShortText =
- xSetText (((struct ShortEventDescriptor
- *)Descriptor)->Text);
- memcpy (VdrProgramInfo->LanguageCode, ((struct
- ShortEventDescriptor *)Descriptor)->
- LanguageCode, 4);
- }
- }
+ VdrProgramInfo->ShortName =
+ xSetText (xName (Descriptor));
+ VdrProgramInfo->ShortText =
+ xSetText (((struct ShortEventDescriptor
+ *)Descriptor)->Text);
+ memcpy (VdrProgramInfo->LanguageCode, ((struct
+ ShortEventDescriptor *)Descriptor)->
+ LanguageCode, 4);
+ GotVdrProgramInfo = 1;
+ }
break;
case DESCR_TIME_SHIFTED_EVENT:
{
struct tm *StartTime;
- if (!VdrProgramInfo)
- {
- CreateVdrProgramInfo(VdrProgramInfo,
- Event->EventID, Event->TransportStreamID,
- Event->ServiceID, Event->StartTime,
- Event->Duration, Event->Status);
-
- VdrProgramInfo->ReferenceServiceID =
- ((struct TimeShiftedEventDescriptor
- *)Descriptor)->ReferenceServiceID;
- VdrProgramInfo->ReferenceEventID =
- ((struct TimeShiftedEventDescriptor
- *)Descriptor)->ReferenceEventID;
- }
+ VdrProgramInfo->ReferenceServiceID =
+ ((struct TimeShiftedEventDescriptor
+ *)Descriptor)->ReferenceServiceID;
+ VdrProgramInfo->ReferenceEventID =
+ ((struct TimeShiftedEventDescriptor
+ *)Descriptor)->ReferenceEventID;
+ GotVdrProgramInfo = 1;
}
break;
@@ -111,20 +107,18 @@ struct LIST *createVdrProgramInfos (unsigned char *siBuffer)
{
struct ExtendedEventItem *Item;
- if (VdrProgramInfo)
+ if (xName (Descriptor))
+ AddToText (xName (Descriptor),
+ VdrProgramInfo->ExtendedName);
+ xForeach (((struct ExtendedEventDescriptor*)
+ Descriptor)->Items, Item)
{
- if (xName (Descriptor))
- AddToText (xName (Descriptor),
- VdrProgramInfo->ExtendedName);
- xForeach (((struct ExtendedEventDescriptor*)
- Descriptor)->Items, Item)
- {
- AddItemToText (xName (Item),
- VdrProgramInfo->ExtendedText);
- AddItemToText (Item->Text,
- VdrProgramInfo->ExtendedText);
- }
+ AddItemToText (xName (Item),
+ VdrProgramInfo->ExtendedText);
+ AddItemToText (Item->Text,
+ VdrProgramInfo->ExtendedText);
}
+ GotVdrProgramInfo = 1;
}
break;
@@ -132,37 +126,33 @@ struct LIST *createVdrProgramInfos (unsigned char *siBuffer)
{
int i, j;
- if (VdrProgramInfo)
+ for (j = 0; j < ((struct ContentDescriptor*)
+ Descriptor)->Amount; j++)
{
- for (j = 0; j < ((struct ContentDescriptor*)
- Descriptor)->Amount; j++)
- {
- VdrProgramInfo->ContentNibble1 =
- GetContentContentNibble1(Descriptor, j);
- VdrProgramInfo->ContentNibble2 =
- GetContentContentNibble2(Descriptor, j);
- }
+ VdrProgramInfo->ContentNibble1 =
+ GetContentContentNibble1(Descriptor, j);
+ VdrProgramInfo->ContentNibble2 =
+ GetContentContentNibble2(Descriptor, j);
}
+ GotVdrProgramInfo = 1;
}
break;
case DESCR_PARENTAL_RATING:
{
struct ParentalRating *Rating;
-
- if (VdrProgramInfo)
- {
- xForeach (((struct ParentalRatingDescriptor *)
- Descriptor)->Ratings, Rating)
- if (!strncmp (VdrProgramInfo->LanguageCode,
- Rating->LanguageCode, 3))
- VdrProgramInfo->Rating = Rating->Rating;
- }
+
+ xForeach (((struct ParentalRatingDescriptor *)
+ Descriptor)->Ratings, Rating)
+ if (!strncmp (VdrProgramInfo->LanguageCode,
+ Rating->LanguageCode, 3))
+ VdrProgramInfo->Rating = Rating->Rating;
+ GotVdrProgramInfo = 1;
}
break;
}
- }
- if (VdrProgramInfo) xAddTail (Result, VdrProgramInfo);
+ }
+ if (GotVdrProgramInfo) xAddTail (Result, VdrProgramInfo);
}
return (Result);
diff --git a/menu.c b/menu.c
index 7fc2f36..b8dbf5b 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.241 2003/05/03 15:59:07 kls Exp $
+ * $Id: menu.c 1.243 2003/05/11 13:58:13 kls Exp $
*/
#include "menu.h"
@@ -1704,6 +1704,7 @@ cMenuRecordings::cMenuRecordings(const char *Base, int Level, bool OpenSubMenus)
{
base = Base ? strdup(Base) : NULL;
level = Setup.RecordingDirs ? Level : -1;
+ Display(); // this keeps the higher level menus from showing up briefly when pressing 'Back' during replay
if (!Base) {
Interface->Status(tr("scanning recordings..."));
Interface->Flush();
@@ -1737,7 +1738,6 @@ cMenuRecordings::cMenuRecordings(const char *Base, int Level, bool OpenSubMenus)
else if (OpenSubMenus && Open(true))
return;
}
- Display(); // this keeps the higher level menus from showing up briefly when pressing 'Back' during replay
SetHelpKeys();
}
@@ -2188,6 +2188,8 @@ cMenuSetupRecord::cMenuSetupRecord(void)
Add(new cMenuEditIntItem( tr("Setup.Recording$Primary limit"), &data.PrimaryLimit, 0, MAXPRIORITY));
Add(new cMenuEditIntItem( tr("Setup.Recording$Default priority"), &data.DefaultPriority, 0, MAXPRIORITY));
Add(new cMenuEditIntItem( tr("Setup.Recording$Default lifetime (d)"), &data.DefaultLifetime, 0, MAXLIFETIME));
+ Add(new cMenuEditIntItem( tr("Setup.Recording$Pause priority"), &data.PausePriority, 0, MAXPRIORITY));
+ Add(new cMenuEditIntItem( tr("Setup.Recording$Pause lifetime (d)"), &data.PauseLifetime, 0, MAXLIFETIME));
Add(new cMenuEditBoolItem(tr("Setup.Recording$Use episode name"), &data.UseSubtitle));
Add(new cMenuEditBoolItem(tr("Setup.Recording$Mark instant recording"), &data.MarkInstantRecord));
Add(new cMenuEditStrItem( tr("Setup.Recording$Name instant recording"), data.NameInstantRecord, sizeof(data.NameInstantRecord), tr(FileNameChars)));
@@ -2907,7 +2909,7 @@ eOSState cDisplayVolume::ProcessKey(eKeys Key)
// --- cRecordControl --------------------------------------------------------
-cRecordControl::cRecordControl(cDevice *Device, cTimer *Timer)
+cRecordControl::cRecordControl(cDevice *Device, cTimer *Timer, bool Pause = false)
{
eventInfo = NULL;
instantId = NULL;
@@ -2917,7 +2919,7 @@ cRecordControl::cRecordControl(cDevice *Device, cTimer *Timer)
if (!device) device = cDevice::PrimaryDevice();//XXX
timer = Timer;
if (!timer) {
- timer = new cTimer(true);
+ timer = new cTimer(true, Pause);
Timers.Add(timer);
Timers.Save();
asprintf(&instantId, cDevice::NumDevices() > 1 ? "%s - %d" : "%s", timer->Channel()->Name(), device->CardIndex() + 1);
@@ -3014,14 +3016,15 @@ bool cRecordControl::Process(time_t t)
cRecordControl *cRecordControls::RecordControls[MAXRECORDCONTROLS] = { NULL };
-bool cRecordControls::Start(cTimer *Timer)
+bool cRecordControls::Start(cTimer *Timer, bool Pause)
{
int ch = Timer ? Timer->Channel()->Number() : cDevice::CurrentChannel();
cChannel *channel = Channels.GetByNumber(ch);
if (channel) {
bool NeedsDetachReceivers = false;
- cDevice *device = cDevice::GetDevice(channel, Timer ? Timer->Priority() : Setup.DefaultPriority, &NeedsDetachReceivers);
+ int Priority = Timer ? Timer->Priority() : Pause ? Setup.PausePriority : Setup.DefaultPriority;
+ cDevice *device = cDevice::GetDevice(channel, Priority, &NeedsDetachReceivers);
if (device) {
if (NeedsDetachReceivers)
Stop(device);
@@ -3031,7 +3034,7 @@ bool cRecordControls::Start(cTimer *Timer)
}
for (int i = 0; i < MAXRECORDCONTROLS; i++) {
if (!RecordControls[i]) {
- RecordControls[i] = new cRecordControl(device, Timer);
+ RecordControls[i] = new cRecordControl(device, Timer, Pause);
return true;
}
}
@@ -3087,7 +3090,7 @@ bool cRecordControls::PauseLiveVideo(void)
Interface->Status(tr("Pausing live video..."));
Interface->Flush();
cReplayControl::SetRecording(NULL, NULL); // make sure the new cRecordControl will set cReplayControl::LastReplayed()
- if (Start()) {
+ if (Start(NULL, true)) {
sleep(2); // allow recorded file to fill up enough to start replaying
cReplayControl *rc = new cReplayControl;
cControl::Launch(rc);
diff --git a/menu.h b/menu.h
index fab74a7..a404505 100644
--- a/menu.h
+++ b/menu.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.h 1.54 2003/04/21 13:40:45 kls Exp $
+ * $Id: menu.h 1.55 2003/05/11 13:43:58 kls Exp $
*/
#ifndef __MENU_H
@@ -116,7 +116,7 @@ private:
char *fileName;
bool GetEventInfo(void);
public:
- cRecordControl(cDevice *Device, cTimer *Timer = NULL);
+ cRecordControl(cDevice *Device, cTimer *Timer = NULL, bool Pause = false);
virtual ~cRecordControl();
bool Process(time_t t);
bool Uses(cDevice *Device) { return Device == device; }
@@ -131,7 +131,7 @@ class cRecordControls {
private:
static cRecordControl *RecordControls[];
public:
- static bool Start(cTimer *Timer = NULL);
+ static bool Start(cTimer *Timer = NULL, bool Pause = false);
static void Stop(const char *InstantId);
static void Stop(cDevice *Device);
static bool StopPrimary(bool DoIt = false);
diff --git a/newplugin b/newplugin
index 1f4d5da..e474266 100755
--- a/newplugin
+++ b/newplugin
@@ -12,7 +12,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
-# $Id: newplugin 1.14 2002/12/13 14:51:46 kls Exp $
+# $Id: newplugin 1.15 2003/05/09 14:59:28 kls Exp $
$PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin <name>\n";
@@ -162,6 +162,7 @@ public:
virtual const char *Description(void) { return DESCRIPTION; }
virtual const char *CommandLineHelp(void);
virtual bool ProcessArgs(int argc, char *argv[]);
+ virtual bool Initialize(void);
virtual bool Start(void);
virtual void Housekeeping(void);
virtual const char *MainMenuEntry(void) { return MAINMENUENTRY; }
@@ -194,6 +195,12 @@ bool cPlugin${PLUGIN_CLASS}::ProcessArgs(int argc, char *argv[])
return true;
}
+bool cPlugin${PLUGIN_CLASS}::Initialize(void)
+{
+ // Initialize any background activities the plugin shall perform.
+ return true;
+}
+
bool cPlugin${PLUGIN_CLASS}::Start(void)
{
// Start any background activities the plugin shall perform.
diff --git a/plugin.c b/plugin.c
index 5b8bc5f..7439534 100644
--- a/plugin.c
+++ b/plugin.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: plugin.c 1.8 2002/11/16 14:22:37 kls Exp $
+ * $Id: plugin.c 1.9 2003/05/09 15:01:26 kls Exp $
*/
#include "plugin.h"
@@ -50,6 +50,11 @@ bool cPlugin::ProcessArgs(int argc, char *argv[])
return true;
}
+bool cPlugin::Initialize(void)
+{
+ return true;
+}
+
bool cPlugin::Start(void)
{
return true;
@@ -293,6 +298,22 @@ bool cPluginManager::LoadPlugins(bool Log)
return true;
}
+bool cPluginManager::InitializePlugins(void)
+{
+ for (cDll *dll = dlls.First(); dll; dll = dlls.Next(dll)) {
+ cPlugin *p = dll->Plugin();
+ if (p) {
+ int Language = Setup.OSDLanguage;
+ Setup.OSDLanguage = 0; // the i18n texts are only available _after_ Start()
+ isyslog("initializing plugin: %s (%s): %s", p->Name(), p->Version(), p->Description());
+ Setup.OSDLanguage = Language;
+ if (!p->Initialize())
+ return false;
+ }
+ }
+ return true;
+}
+
bool cPluginManager::StartPlugins(void)
{
for (cDll *dll = dlls.First(); dll; dll = dlls.Next(dll)) {
@@ -300,7 +321,7 @@ bool cPluginManager::StartPlugins(void)
if (p) {
int Language = Setup.OSDLanguage;
Setup.OSDLanguage = 0; // the i18n texts are only available _after_ Start()
- isyslog("starting plugin: %s (%s): %s", p->Name(), p->Version(), p->Description());
+ isyslog("starting plugin: %s", p->Name());
Setup.OSDLanguage = Language;
if (!p->Start())
return false;
diff --git a/plugin.h b/plugin.h
index d3e26d6..0a753fa 100644
--- a/plugin.h
+++ b/plugin.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: plugin.h 1.5 2002/11/16 14:22:24 kls Exp $
+ * $Id: plugin.h 1.6 2003/05/09 14:57:55 kls Exp $
*/
#ifndef __PLUGIN_H
@@ -33,6 +33,7 @@ public:
virtual const char *CommandLineHelp(void);
virtual bool ProcessArgs(int argc, char *argv[]);
+ virtual bool Initialize(void);
virtual bool Start(void);
virtual void Housekeeping(void);
@@ -78,6 +79,7 @@ public:
void SetDirectory(const char *Directory);
void AddPlugin(const char *Args);
bool LoadPlugins(bool Log = false);
+ bool InitializePlugins(void);
bool StartPlugins(void);
void Housekeeping(void);
static bool HasPlugins(void);
diff --git a/recording.c b/recording.c
index 23521a6..3610382 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 1.76 2003/04/27 15:52:17 kls Exp $
+ * $Id: recording.c 1.77 2003/05/11 13:09:08 kls Exp $
*/
#include "recording.h"
@@ -768,7 +768,7 @@ void cRecordingUserCommand::InvokeCommand(const char *State, const char *Recordi
#define MAXINDEXCATCHUP 2 // seconds
// The minimum age of an index file for considering it no longer to be written:
-#define MININDEXAGE 300 // seconds
+#define MININDEXAGE 3600 // seconds
cIndexFile::cIndexFile(const char *FileName, bool Record)
:resumeFile(FileName)
diff --git a/ringbuffer.c b/ringbuffer.c
index 6913c71..770b7c3 100644
--- a/ringbuffer.c
+++ b/ringbuffer.c
@@ -7,7 +7,7 @@
* Parts of this file were inspired by the 'ringbuffy.c' from the
* LinuxDVB driver (see linuxtv.org).
*
- * $Id: ringbuffer.c 1.15 2003/04/27 09:54:32 kls Exp $
+ * $Id: ringbuffer.c 1.16 2003/05/11 09:47:56 kls Exp $
*/
#include "ringbuffer.h"
@@ -31,30 +31,6 @@ cRingBuffer::~cRingBuffer()
dsyslog("buffer stats: %d (%d%%) used", maxFill, maxFill * 100 / (size - 1));
}
-void cRingBuffer::WaitForPut(void)
-{
- putMutex.Lock();
- readyForPut.TimedWait(putMutex, 1000);
- putMutex.Unlock();
-}
-
-void cRingBuffer::WaitForGet(void)
-{
- getMutex.Lock();
- readyForGet.TimedWait(getMutex, 10);
- getMutex.Unlock();
-}
-
-void cRingBuffer::EnablePut(void)
-{
- readyForPut.Broadcast();
-}
-
-void cRingBuffer::EnableGet(void)
-{
- readyForGet.Broadcast();
-}
-
// --- cRingBufferLinear -----------------------------------------------------
cRingBufferLinear::cRingBufferLinear(int Size, int Margin, bool Statistics)
@@ -92,8 +68,6 @@ void cRingBufferLinear::Clear(void)
head = tail = margin;
lastGet = -1;
Unlock();
- EnablePut();
- EnableGet();
}
int cRingBufferLinear::Put(const uchar *Data, int Count)
@@ -135,9 +109,6 @@ int cRingBufferLinear::Put(const uchar *Data, int Count)
else
Count = 0;
Unlock();
- EnableGet();
- if (Count == 0)
- WaitForPut();
}
return Count;
}
@@ -163,8 +134,6 @@ uchar *cRingBufferLinear::Get(int &Count)
Count = lastGet = cont;
}
Unlock();
- if (!p)
- WaitForGet();
return p;
}
@@ -177,7 +146,6 @@ void cRingBufferLinear::Del(int Count)
if (tail >= Size())
tail = margin;
Unlock();
- EnablePut();
}
else
esyslog("ERROR: invalid Count in cRingBufferLinear::Del: %d", Count);
@@ -228,8 +196,6 @@ void cRingBufferFrame::Clear(void)
while ((p = Get()) != NULL)
Drop(p);
Unlock();
- EnablePut();
- EnableGet();
}
bool cRingBufferFrame::Put(cFrame *Frame)
@@ -246,7 +212,6 @@ bool cRingBufferFrame::Put(cFrame *Frame)
}
currentFill += Frame->Count();
Unlock();
- EnableGet();
return true;
}
return false;
@@ -284,7 +249,6 @@ void cRingBufferFrame::Drop(cFrame *Frame)
esyslog("ERROR: attempt to drop wrong frame from ring buffer!");
}
Unlock();
- EnablePut();
}
int cRingBufferFrame::Available(void)
diff --git a/ringbuffer.h b/ringbuffer.h
index 0ce0a48..6b25662 100644
--- a/ringbuffer.h
+++ b/ringbuffer.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: ringbuffer.h 1.10 2003/04/27 09:55:08 kls Exp $
+ * $Id: ringbuffer.h 1.11 2003/05/11 09:48:23 kls Exp $
*/
#ifndef __RINGBUFFER_H
@@ -16,17 +16,11 @@
class cRingBuffer {
private:
cMutex mutex;
- cCondVar readyForPut, readyForGet;
- cMutex putMutex, getMutex;
int size;
protected:
int maxFill;//XXX
int lastPercent;
bool statistics;//XXX
- void WaitForPut(void);
- void WaitForGet(void);
- void EnablePut(void);
- void EnableGet(void);
virtual void Clear(void) = 0;
virtual int Available(void) = 0;
int Free(void) { return size - Available() - 1; }
diff --git a/timers.c b/timers.c
index 8c982e2..1542942 100644
--- a/timers.c
+++ b/timers.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: timers.c 1.4 2003/04/27 11:11:45 kls Exp $
+ * $Id: timers.c 1.5 2003/05/11 13:48:49 kls Exp $
*/
#include "timers.h"
@@ -20,7 +20,7 @@
char *cTimer::buffer = NULL;
-cTimer::cTimer(bool Instant)
+cTimer::cTimer(bool Instant, bool Pause)
{
startTime = stopTime = 0;
recording = pending = false;
@@ -35,8 +35,8 @@ cTimer::cTimer(bool Instant)
stop = (stop / 60) * 100 + (stop % 60);
if (stop >= 2400)
stop -= 2400;
- priority = Setup.DefaultPriority;
- lifetime = Setup.DefaultLifetime;
+ priority = Pause ? Setup.PausePriority : Setup.DefaultPriority;
+ lifetime = Pause ? Setup.PauseLifetime : Setup.DefaultLifetime;
*file = 0;
firstday = 0;
summary = NULL;
diff --git a/timers.h b/timers.h
index a179e52..3b1a3ca 100644
--- a/timers.h
+++ b/timers.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: timers.h 1.4 2003/02/09 12:49:45 kls Exp $
+ * $Id: timers.h 1.5 2003/05/11 13:35:53 kls Exp $
*/
#ifndef __TIMERS_H
@@ -38,7 +38,7 @@ private:
time_t firstday;
char *summary;
public:
- cTimer(bool Instant = false);
+ cTimer(bool Instant = false, bool Pause = false);
cTimer(const cEventInfo *EventInfo);
virtual ~cTimer();
cTimer& operator= (const cTimer &Timer);
diff --git a/transfer.c b/transfer.c
index 9354e58..cdde552 100644
--- a/transfer.c
+++ b/transfer.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: transfer.c 1.11 2003/03/30 12:52:11 kls Exp $
+ * $Id: transfer.c 1.12 2003/05/11 08:48:05 kls Exp $
*/
#include "transfer.h"
@@ -179,13 +179,17 @@ void cTransfer::SetAudioTrack(int Index)
// --- cTransferControl ------------------------------------------------------
+cDevice *cTransferControl::receiverDevice = NULL;
+
cTransferControl::cTransferControl(cDevice *ReceiverDevice, int VPid, int APid1, int APid2, int DPid1, int DPid2)
:cControl(transfer = new cTransfer(VPid, APid1, APid2, DPid1, DPid2), true)
{
ReceiverDevice->AttachReceiver(transfer);
+ receiverDevice = ReceiverDevice;
}
cTransferControl::~cTransferControl()
{
+ receiverDevice = NULL;
delete transfer;
}
diff --git a/transfer.h b/transfer.h
index d94c85a..5ecb96a 100644
--- a/transfer.h
+++ b/transfer.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: transfer.h 1.3 2002/10/12 12:59:05 kls Exp $
+ * $Id: transfer.h 1.4 2003/05/11 08:48:36 kls Exp $
*/
#ifndef __TRANSFER_H
@@ -40,10 +40,12 @@ public:
class cTransferControl : public cControl {
private:
cTransfer *transfer;
+ static cDevice *receiverDevice;
public:
cTransferControl(cDevice *ReceiverDevice, int VPid, int APid1, int APid2, int DPid1, int DPid2);
~cTransferControl();
virtual void Hide(void) {}
+ static cDevice *ReceiverDevice(void) { return receiverDevice; }
};
#endif //__TRANSFER_H
diff --git a/vdr.c b/vdr.c
index ae4edd5..c969e6e 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/people/kls/vdr
*
- * $Id: vdr.c 1.152 2003/05/03 13:39:57 kls Exp $
+ * $Id: vdr.c 1.154 2003/05/11 08:39:09 kls Exp $
*/
#include <getopt.h>
@@ -355,9 +355,9 @@ int main(int argc, char *argv[])
cDvbDevice::Initialize();
- // Start plugins:
+ // Initialize plugins:
- if (!PluginManager.StartPlugins())
+ if (!PluginManager.InitializePlugins())
return 2;
// Primary device:
@@ -437,6 +437,18 @@ int main(int argc, char *argv[])
if (WatchdogTimeout > 0)
if (signal(SIGALRM, Watchdog) == SIG_IGN) signal(SIGALRM, SIG_IGN);
+ // Watchdog:
+
+ if (WatchdogTimeout > 0) {
+ dsyslog("setting watchdog timer to %d seconds", WatchdogTimeout);
+ alarm(WatchdogTimeout); // Initial watchdog timer start
+ }
+
+ // Start plugins:
+
+ if (!PluginManager.StartPlugins())
+ return 2;
+
// Main program loop:
cOsdObject *Menu = NULL;
@@ -448,11 +460,6 @@ int main(int argc, char *argv[])
bool ForceShutdown = false;
bool UserShutdown = false;
- if (WatchdogTimeout > 0) {
- dsyslog("setting watchdog timer to %d seconds", WatchdogTimeout);
- alarm(WatchdogTimeout); // Initial watchdog timer start
- }
-
while (!Interrupted) {
// Handle emergency exits:
if (cThread::EmergencyExit()) {
@@ -462,7 +469,7 @@ int main(int argc, char *argv[])
// Attach launched player control:
cControl::Attach();
// Make sure we have a visible programme in case device usage has changed:
- if (!cDevice::PrimaryDevice()->HasProgramme()) {
+ if (cDevice::PrimaryDevice()->HasDecoder() && !cDevice::PrimaryDevice()->HasProgramme()) {
static time_t lastTime = 0;
if (time(NULL) - lastTime > MINCHANNELWAIT) {
if (!Channels.SwitchTo(cDevice::CurrentChannel()))