summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2008-01-13 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2008-01-13 18:00:00 +0100
commitfc4c8740a72e6c7cea5a001e19fdacb63c3cc538 (patch)
tree6ab0ae16b8d588e34d86f8a1a69c101ce8ba2809
parent29b2d48bb53df75f1cb978e72bc709a6658d6e5c (diff)
downloadvdr-patches-fc4c8740a72e6c7cea5a001e19fdacb63c3cc538.tar.gz
vdr-patches-fc4c8740a72e6c7cea5a001e19fdacb63c3cc538.tar.bz2
Version 1.5.13
- Fixed the declaration of cSubtitleObject::Decode8BppCodeString() (thanks to Gregoire Favre). - The new setup option "Miscellaneous/Emergency exit" can be used to turn off the automatic restart of VDR in case a recording fails for some reason. - The kInfo key is now propagated to any open menu, so that it can react to it in a context sensitive manner (suggested by Andreas Brugger). If there is no menu open it will show the info of the current broadcast or replay. - cTimeMs now uses the monotonic clock, if available (thanks to Petri Hintukainen). - Fixed cVector::Clear() and cStringList::Clear(). - Added cString::Truncate(). - Fixed the "i18n:" target in the "newplugin" script, so that it can create the initial *.pot file. - Fixed handling the '-l' option. - Fixed error handling in cCuttingThread::Action() (thanks to Udo Richter). - Fixed a loss of the date display in the "classic" skin's main menu (reported by Andreas Brugger). - Added a missing setting of lastFreeMB in cMenuMain::Update() (reported by Andreas Brugger). - Added '-Wno-parentheses' to the compiler options in order to avoid silly compiler warnings for expressions like 'a || b && c', where GCC 4.3 wants to force the programmer to write 'a || (b && c)', while everybody knows that '&&' links stronger than '||' (reported by Tobias Grimm). - Updated the Hungarian language texts (thanks to István Füley). - Fixed displaying weekday names in the Schedule menu if the system uses UTF-8 (reported by Jiri Dobry). - The new plugin "pictures" implements a simple picture viewer. See PLUGINS/src/pictures/README for details. - The automatic shutdown is now suppressed if the remote control is currently disabled (suggested by Helmut Auer, implemented by Udo Richter). - Added a section about "Logging" to PLUGINS.html (suggested by Torsten Kunkel). - Enhanced the SVDRP command CLRE to allow clearing the EPG data of a particular channel (thanks to Benjamin Hess).
-rw-r--r--CONTRIBUTORS23
-rw-r--r--HISTORY35
-rw-r--r--MANUAL11
-rw-r--r--Make.config.template4
-rw-r--r--Makefile6
-rw-r--r--PLUGINS.html53
-rw-r--r--PLUGINS/src/hello/Makefile4
-rw-r--r--PLUGINS/src/osddemo/Makefile4
-rw-r--r--PLUGINS/src/pictures/COPYING340
-rw-r--r--PLUGINS/src/pictures/HISTORY6
-rw-r--r--PLUGINS/src/pictures/Makefile110
-rw-r--r--PLUGINS/src/pictures/README119
-rw-r--r--PLUGINS/src/pictures/entry.c144
-rw-r--r--PLUGINS/src/pictures/entry.h36
-rw-r--r--PLUGINS/src/pictures/menu.c129
-rw-r--r--PLUGINS/src/pictures/menu.h31
-rwxr-xr-xPLUGINS/src/pictures/pic2mpg176
-rw-r--r--PLUGINS/src/pictures/pictures.c124
-rw-r--r--PLUGINS/src/pictures/player.c249
-rw-r--r--PLUGINS/src/pictures/player.h47
-rw-r--r--PLUGINS/src/pictures/po/de_DE.po32
-rw-r--r--PLUGINS/src/servicedemo/Makefile4
-rw-r--r--PLUGINS/src/sky/Makefile4
-rw-r--r--PLUGINS/src/status/Makefile4
-rw-r--r--PLUGINS/src/svdrpdemo/Makefile4
-rw-r--r--config.c5
-rw-r--r--config.h11
-rw-r--r--cutter.c6
-rw-r--r--dvbsubtitle.c4
-rw-r--r--menu.c15
-rwxr-xr-xnewplugin6
-rw-r--r--po/ca_ES.po5
-rw-r--r--po/cs_CZ.po5
-rw-r--r--po/da_DK.po5
-rw-r--r--po/de_DE.po7
-rw-r--r--po/el_GR.po5
-rw-r--r--po/es_ES.po5
-rw-r--r--po/et_EE.po5
-rw-r--r--po/fi_FI.po5
-rw-r--r--po/fr_FR.po5
-rw-r--r--po/hr_HR.po5
-rw-r--r--po/hu_HU.po123
-rw-r--r--po/it_IT.po5
-rw-r--r--po/nl_NL.po5
-rw-r--r--po/nn_NO.po5
-rw-r--r--po/pl_PL.po5
-rw-r--r--po/pt_PT.po5
-rw-r--r--po/ro_RO.po5
-rw-r--r--po/ru_RU.po5
-rw-r--r--po/sl_SI.po5
-rw-r--r--po/sv_SE.po5
-rw-r--r--po/tr_TR.po5
-rw-r--r--po/uk_UA.po5
-rw-r--r--remux.c6
-rw-r--r--shutdown.c15
-rw-r--r--skinclassic.c7
-rw-r--r--svdrp.c60
-rw-r--r--tools.c48
-rw-r--r--tools.h8
-rw-r--r--vdr.c16
60 files changed, 1982 insertions, 154 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 60a99e7..7f5acb8 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -531,6 +531,7 @@ Gregoire Favre <greg@ulima.unil.ch>
for translating OSD texts to the French language
for suggesting to initiate an "emergency exit" if there are UPT errors during a
recording
+ for fixing the declaration of cSubtitleObject::Decode8BppCodeString()
Sven Grothklags <sven@uni-paderborn.de>
for fixing the cutting mechanism to make it re-sync in case a frame is larger
@@ -590,6 +591,8 @@ Helmut Auer <vdr@helmutauer.de>
for a patch that was used to implement the SVDRP command REMO
for reporting a possible crash in decoding filename characters in case there are
not two hex digits after the '#'
+ for suggesting to suppress the automatic shutdown if the remote control is
+ currently disabled
Jeremy Hall <jhall@UU.NET>
for fixing an incomplete initialization of the filter parameters in eit.c
@@ -1547,6 +1550,8 @@ Udo Richter <udo_richter@gmx.de>
for fixing a new[]/delete mismatch in cMenuEditStrItem::LeaveEditMode()
for improving shutdown handling
for making housekeeping wait for a while after a replay has ended
+ for fixing error handling in cCuttingThread::Action()
+ for suppressing the automatic shutdown if the remote control is currently disabled
Sven Kreiensen <svenk@kammer.uni-hannover.de>
for his help in keeping 'channels.conf.terr' up to date
@@ -1599,6 +1604,10 @@ Andreas Brugger <brougs78@gmx.net>
for reporting a typo in the change to the "Use small font" setup option in version
1.3.47 in the HISTORY and CONTRIBUTORS file
for reporting a missing 'const' in cRecordingInfo::ChannelID()
+ for suggesting to propagate the kInfo key to any open menu, so that it can react to
+ it in a context sensitive manner
+ for reporting a loss of the date display in the "classic" skin's main menu
+ for reporting a missing setting of lastFreeMB in cMenuMain::Update()
Dino Ravnic <dino.ravnic@fer.hr>
for fixing some characters in the iso8859-2 font file
@@ -1940,6 +1949,7 @@ Petri Hintukainen <Petri.Hintukainen@hut.fi>
for making cRemote::PutMacro() set a lock while it expands the macro
for pointing out that plugins from cRemote::PutMacro() and cRemote::CallPlugin()
need to be handled separately
+ for making cTimeMs use the monotonic clock
Marcel Schaeben <mts280@gmx.de>
for his "Easy Input" patch
@@ -2060,6 +2070,7 @@ Tobias Grimm <listaccount@e-tobi.net>
for fixing a memory leak in handling external EPG data
for fixing a memory leak in closing the video file during replay
for fixing deleting the 'skinDescriptions' in cMenuSetupOSD::~cMenuSetupOSD()
+ for reporting that GCC 4.3 issues a silly warning for expressions like 'a || b && c'
Helge Lenz <h.lenz@gmx.de>
for reporting a bug in setting the 'Delta' parameter when calling the shutdown
@@ -2228,6 +2239,7 @@ Elias Luttinen <el@iki.fi>
Torsten Kunkel <vdrml@tkunkel.de>
for pointing out that it was not obvious how to initiate internationalization
support for a plugin
+ for suggesting to add a section about "Logging" to PLUGINS.html
Michael Nival <mnival@club-internet.fr>
for translating OSD texts to the French language
@@ -2240,3 +2252,14 @@ Lauri Nurmi <lanurmi@iki.fi>
Mario Ivankovits <mario@ops.co.at>
for fixing a crash if no fonts are found
+
+István Füley <ifuley@tigercomp.ro>
+ for translating OSD texts to the Hungarian language
+
+Jiri Dobry <jdobry@centrum.cz>
+ for reporting a bug in displaying weekday names in the Schedule menu if the system
+ uses UTF-8
+
+Benjamin Hess <benjamin.h@gmx.ch>
+ for enhancing the SVDRP command CLRE to allow clearing the EPG data of a particular
+ channel
diff --git a/HISTORY b/HISTORY
index 7379bd1..3c95325 100644
--- a/HISTORY
+++ b/HISTORY
@@ -5528,3 +5528,38 @@ Video Disk Recorder Revision History
in live mode (based on a patch from Reinhard Nissl).
- Fixed stopping live subtitles when a player is attached to the device.
- Fixed suddenly stopping subtitles in live mode.
+
+2008-01-13: Version 1.5.13
+
+- Fixed the declaration of cSubtitleObject::Decode8BppCodeString() (thanks to
+ Gregoire Favre).
+- The new setup option "Miscellaneous/Emergency exit" can be used to turn off
+ the automatic restart of VDR in case a recording fails for some reason.
+- The kInfo key is now propagated to any open menu, so that it can react to it
+ in a context sensitive manner (suggested by Andreas Brugger). If there is
+ no menu open it will show the info of the current broadcast or replay.
+- cTimeMs now uses the monotonic clock, if available (thanks to Petri Hintukainen).
+- Fixed cVector::Clear() and cStringList::Clear().
+- Added cString::Truncate().
+- Fixed the "i18n:" target in the "newplugin" script, so that it can create the
+ initial *.pot file.
+- Fixed handling the '-l' option.
+- Fixed error handling in cCuttingThread::Action() (thanks to Udo Richter).
+- Fixed a loss of the date display in the "classic" skin's main menu (reported by
+ Andreas Brugger).
+- Added a missing setting of lastFreeMB in cMenuMain::Update() (reported by
+ Andreas Brugger).
+- Added '-Wno-parentheses' to the compiler options in order to avoid silly compiler
+ warnings for expessions like 'a || b && c', where GCC 4.3 wants to force the
+ programmer to write 'a || (b && c)', while everybody knows that '&&' links
+ stronger than '||' (reported by Tobias Grimm).
+- Updated the Hungarian language texts (thanks to István Füley).
+- Fixed displaying weekday names in the Schedule menu if the system uses UTF-8
+ (reported by Jiri Dobry).
+- The new plugin "pictures" implements a simple picture viewer.
+ See PLUGINS/src/pictures/README for details.
+- The automatic shutdown is now suppressed if the remote control is currently
+ disabled (suggested by Helmut Auer, implemented by Udo Richter).
+- Added a section about "Logging" to PLUGINS.html (suggested by Torsten Kunkel).
+- Enhanced the SVDRP command CLRE to allow clearing the EPG data of a particular
+ channel (thanks to Benjamin Hess).
diff --git a/MANUAL b/MANUAL
index 106533c..8798728 100644
--- a/MANUAL
+++ b/MANUAL
@@ -37,7 +37,8 @@ Version 1.4
If your remote control provides additional keys, they can be used for the
following functions:
- Info display information on the currently viewed programme or recording
+ Info display information on the currently viewed programme or recording,
+ or on the current item in a menu
Play resume normal replay
Pause pause replay or live video
Stop stop replay
@@ -850,6 +851,14 @@ Version 1.4
VDR was stopped will be used. The valid range is from
0 (silent) to 255 (loudest).
+ Emergency exit = yes If, for some reason, a recording fails because the video
+ data stream is broken, or the CAM doesn't decrypt etc.,
+ VDR automatically exits in order to allow the surrounding
+ wrapper script to reload the DVB drivers. If this option
+ is set to 'no', the "emergency exit" will be ignored,
+ hoping that the problem will go away by itself (as, for
+ instance, with bad weather conditions).
+
* Executing system commands
The "VDR" menu option "Commands" allows you to execute any system commands
diff --git a/Make.config.template b/Make.config.template
index a4b4812..9063d66 100644
--- a/Make.config.template
+++ b/Make.config.template
@@ -6,7 +6,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
-# $Id: Make.config.template 1.15 2007/08/25 08:53:45 kls Exp $
+# $Id: Make.config.template 1.16 2008/01/13 12:54:09 kls Exp $
### The C compiler and options:
@@ -14,7 +14,7 @@ CC = gcc
CFLAGS = -g -O2 -Wall
CXX = g++
-CXXFLAGS = -g -O2 -Wall -Woverloaded-virtual
+CXXFLAGS = -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
ifdef PLUGIN
CFLAGS += -fPIC
diff --git a/Makefile b/Makefile
index f32773c..bbf6703 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
-# $Id: Makefile 1.110 2007/11/04 10:15:59 kls Exp $
+# $Id: Makefile 1.112 2008/01/13 12:53:17 kls Exp $
.DELETE_ON_ERROR:
@@ -12,7 +12,7 @@ CC ?= gcc
CFLAGS ?= -g -O2 -Wall
CXX ?= g++
-CXXFLAGS ?= -g -O2 -Wall -Woverloaded-virtual
+CXXFLAGS ?= -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
LSIDIR = ./libsi
DESTDIR ?=
@@ -20,7 +20,7 @@ PREFIX ?= /usr/local
MANDIR = $(PREFIX)/share/man
BINDIR = $(PREFIX)/bin
LOCDIR = ./locale
-LIBS = -ljpeg -lpthread -ldl -lcap -lfreetype -lfontconfig
+LIBS = -ljpeg -lpthread -ldl -lcap -lrt -lfreetype -lfontconfig
INCLUDES = -I/usr/include/freetype2
PLUGINDIR= ./PLUGINS
diff --git a/PLUGINS.html b/PLUGINS.html
index e34ab0e..5644b68 100644
--- a/PLUGINS.html
+++ b/PLUGINS.html
@@ -14,18 +14,18 @@ Copyright &copy; 2006 Klaus Schmidinger<br>
<a href="http://www.cadsoft.de/vdr">www.cadsoft.de/vdr</a>
</center>
<p>
-<!--X1.5.3--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
-Important modifications introduced in version 1.5.3 are marked like this.
-<!--X1.5.3--></td></tr></table>
-<!--X1.5.7--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
+<!--X1.5.7--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.5.7 are marked like this.
<!--X1.5.7--></td></tr></table>
-<!--X1.5.8--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
+<!--X1.5.8--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.5.8 are marked like this.
<!--X1.5.8--></td></tr></table>
-<!--X1.5.10--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+<!--X1.5.10--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.5.10 are marked like this.
<!--X1.5.10--></td></tr></table>
+<!--X1.5.13--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+Important modifications introduced in version 1.5.13 are marked like this.
+<!--X1.5.13--></td></tr></table>
<p>
VDR provides an easy to use plugin interface that allows additional functionality
to be added to the program by implementing a dynamically loadable library file.
@@ -59,6 +59,9 @@ structures and allows it to hook itself into specific areas to perform special a
<li><a href="#Command line help">Command line help</a>
<li><a href="#Getting started">Getting started</a>
<li><a href="#Shutting down">Shutting down</a>
+<!--X1.5.13--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+<li><a href="#Logging">Logging</a>
+<!--X1.5.13--></td></tr></table>
<li><a href="#Main menu entry">Main menu entry</a>
<li><a href="#User interaction">User interaction</a>
<li><a href="#Housekeeping">Housekeeping</a>
@@ -540,6 +543,26 @@ The <tt>Stop()</tt> function will only be called if a previous call to the
returned <i>true</i>. The <tt>Stop()</tt> functions are called in the reverse order
as the <a href="#Getting started"><tt>Start()</tt></a> functions were called.
+<!--X1.5.13--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+<a name="Logging"><hr><h2>Logging</h2>
+
+If the plugin should print log messages, you can use <tt>dsyslog()</tt>, <tt>isyslog()</tt> or <tt>esyslog()</tt>.<br>
+<ul>
+<li><tt>dsyslog()</tt> prints the log message only if the log level of vdr is set to 3.
+<li><tt>isyslog()</tt> prints the log message only if the log level of vdr is set to 2 or above.
+<li><tt>esyslog()</tt> prints the log message only if the log level of vdr is set to 1 or above.
+</ul>
+The output of this log is the syslog of the system vdr is running on.
+The logmessage can be formatted like <tt>printf()</tt>, as in
+
+<p><table><tr><td bgcolor=#F0F0F0><pre>
+esyslog("pluginname: error #%d has occurred", ErrorNumber);
+</pre></td></tr></table><p>
+
+Note that the log messages will be given as provided, the plugin's name will not
+automatically be added, so make shure your log messages are obvious enough.
+<!--X1.5.13--></td></tr></table>
+
<a name="Main menu entry"><hr><h2>Main menu entry</h2>
<center><i><b>Today's special is...</b></i></center><p>
@@ -906,7 +929,7 @@ const char *MyConfigDir = cPlugin::ConfigDirectory();
<center><i><b>Welcome to Babylon!</b></i></center><p>
-<!--X1.5.7--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
+<!--X1.5.7--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
If a plugin displays texts to the user, it should prepare for internationalization
of these texts. All that is necessary for this is to mark every text that is
presented to the user as translatable, as in
@@ -917,7 +940,7 @@ const char *s = tr("Hello world!");
The text given here must be the English version, and the returned pointer is either
a translated version (if available) or the original string.
-<!--X1.5.8--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
+<!--X1.5.8--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
Texts are searched for in the domain registered for this plugin.
If a plugin wants to make use of texts defined by the core VDR code, it can use
the special <tt>trVDR()</tt> macro to mark these texts without having them
@@ -940,7 +963,6 @@ for (int i = 0; i &lt; 3; i++)
</pre></td></tr></table><p>
<p>
-<!--X1.5.3--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
The system VDR is running on may use a character encoding where a single character
(or <i>symbol</i>) consists of more than one byte (UTF-8, as opposed to, for instance,
ISO8859-1, where every character is represented by a single byte in memory).
@@ -951,7 +973,6 @@ character set. The names of these functions and macros are all of the form <tt>U
and are defined in <tt>VDR/tools.h</tt>.
Most of the time a plugin doesn't need to care about this, but when it comes to
handling individual characters these functions may come in handy.
-<!--X1.5.3--></td></tr></table>
<!--X1.5.7--></td></tr></table>
<a name="Custom services"><hr><h2>Custom services</h2>
@@ -1328,7 +1349,7 @@ A player that has special requirements about audio tracks should announce its
available audio tracks by calling
<p><table><tr><td bgcolor=#F0F0F0><pre>
-<!--X1.5.10--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+<!--X1.5.10--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
bool DeviceSetAvailableTrack(eTrackType Type, int Index, uint16_t Id, const char *Language = NULL, const char *Description = NULL)
<!--X1.5.10--></td></tr></table>
</pre></td></tr></table><p>
@@ -1456,13 +1477,13 @@ public:
};
cMyReceiver::cMyReceiver(int Pid)
-<!--X1.5.10--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+<!--X1.5.10--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
:cReceiver(tChannelID(), -1, Pid)
<!--X1.5.10--></td></tr></table>
{
}
-<!--X1.5.10--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%><pre>
+<!--X1.5.10--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%><pre>
cMyReceiver::~cMyReceiver()
{
cReceiver::Detach();
@@ -1614,7 +1635,6 @@ with the full required resolution. Only if this fails shall it use alternate
areas. Drawing areas are always rectangular and may not overlap (but do not need
to be adjacent).
<p>
-<!--X1.5.3--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
Special consideration may have to be given to color usage if the OSD provides
8bpp (256 colors). In that case, fonts may be drawn using <i>anti-aliasing</i>,
which requires several blended color values between the foreground and background
@@ -1628,7 +1648,6 @@ osd-&gt;SetAntiAliasGranularity();
which allows the system to evenly distribute the palette entries to the various
color combinations (see <tt>VDR/osd.h</tt> for details).
-<!--X1.5.3--></td></tr></table>
<p>
Directly accessing the OSD is only allowed from the foreground thread, which
restricts this to a <tt>cOsdObject</tt> returned from the plugin's <tt>MainMenuAction()</tt>
@@ -1832,7 +1851,7 @@ virtual bool HasDecoder(void) const;
virtual bool CanReplay(void) const;
virtual bool SetPlayMode(ePlayMode PlayMode);
virtual int64_t GetSTC(void);
-<!--X1.5.10--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+<!--X1.5.10--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
virtual bool HasIBPTrickSpeed(void);
<!--X1.5.10--></td></tr></table>
virtual void TrickSpeed(int Speed);
@@ -1862,7 +1881,7 @@ the functions
<p><table><tr><td bgcolor=#F0F0F0><pre>
virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask);
-<!--X1.5.10--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+<!--X1.5.10--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
virtual void CloseFilter(int Handle);
<!--X1.5.10--></td></tr></table>
</pre></td></tr></table><p>
diff --git a/PLUGINS/src/hello/Makefile b/PLUGINS/src/hello/Makefile
index 185b527..c4ea46f 100644
--- a/PLUGINS/src/hello/Makefile
+++ b/PLUGINS/src/hello/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.21 2007/11/04 10:52:15 kls Exp $
+# $Id: Makefile 1.22 2008/01/13 12:59:58 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -18,7 +18,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
### The C++ compiler and options:
CXX ?= g++
-CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual
+CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
### The directory environment:
diff --git a/PLUGINS/src/osddemo/Makefile b/PLUGINS/src/osddemo/Makefile
index 568faa6..e85663f 100644
--- a/PLUGINS/src/osddemo/Makefile
+++ b/PLUGINS/src/osddemo/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.10 2007/08/15 13:05:24 kls Exp $
+# $Id: Makefile 1.11 2008/01/13 13:00:01 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -16,7 +16,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
### The C++ compiler and options:
CXX ?= g++
-CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual
+CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
### The directory environment:
diff --git a/PLUGINS/src/pictures/COPYING b/PLUGINS/src/pictures/COPYING
new file mode 100644
index 0000000..f90922e
--- /dev/null
+++ b/PLUGINS/src/pictures/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program 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 of the License, or
+ (at your option) any later version.
+
+ This program 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 should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/PLUGINS/src/pictures/HISTORY b/PLUGINS/src/pictures/HISTORY
new file mode 100644
index 0000000..c04a628
--- /dev/null
+++ b/PLUGINS/src/pictures/HISTORY
@@ -0,0 +1,6 @@
+VDR Plugin 'pictures' Revision History
+--------------------------------------
+
+2008-01-13: Version 0.0.1
+
+- Initial revision.
diff --git a/PLUGINS/src/pictures/Makefile b/PLUGINS/src/pictures/Makefile
new file mode 100644
index 0000000..d949944
--- /dev/null
+++ b/PLUGINS/src/pictures/Makefile
@@ -0,0 +1,110 @@
+#
+# Makefile for a Video Disk Recorder plugin
+#
+# $Id: Makefile 1.2 2008/01/13 13:00:04 kls Exp $
+
+# The official name of this plugin.
+# This name will be used in the '-P...' option of VDR to load the plugin.
+# By default the main source file also carries this name.
+# IMPORTANT: the presence of this macro is important for the Make.config
+# file. So it must be defined, even if it is not used here!
+#
+PLUGIN = pictures
+
+### The version number of this plugin (taken from the main source file):
+
+VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g')
+
+### The C++ compiler and options:
+
+CXX ?= g++
+CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
+
+### The directory environment:
+
+VDRDIR = ../../..
+LIBDIR = ../../lib
+TMPDIR = /tmp
+
+### Allow user defined options to overwrite defaults:
+
+-include $(VDRDIR)/Make.config
+
+### The version number of VDR's plugin API (taken from VDR's "config.h"):
+
+APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h)
+
+### The name of the distribution archive:
+
+ARCHIVE = $(PLUGIN)-$(VERSION)
+PACKAGE = vdr-$(ARCHIVE)
+
+### Includes and Defines (add further entries here):
+
+INCLUDES += -I$(VDRDIR)/include
+
+DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
+
+### The object files (add further files here):
+
+OBJS = $(PLUGIN).o entry.o menu.o player.o
+
+### The main target:
+
+all: libvdr-$(PLUGIN).so i18n
+
+### Implicit rules:
+
+%.o: %.c
+ $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
+
+### Dependencies:
+
+MAKEDEP = $(CXX) -MM -MG
+DEPFILE = .dependencies
+$(DEPFILE): Makefile
+ @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
+
+-include $(DEPFILE)
+
+### Internationalization (I18N):
+
+PODIR = po
+LOCALEDIR = $(VDRDIR)/locale
+I18Npo = $(wildcard $(PODIR)/*.po)
+I18Nmsgs = $(addprefix $(LOCALEDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
+I18Npot = $(PODIR)/$(PLUGIN).pot
+
+%.mo: %.po
+ msgfmt -c -o $@ $<
+
+$(I18Npot): $(wildcard *.c)
+ xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --msgid-bugs-address='<vdr-bugs@cadsoft.de>' -o $@ $^
+
+%.po: $(I18Npot)
+ msgmerge -U --no-wrap --no-location --backup=none -q $@ $<
+ @touch $@
+
+$(I18Nmsgs): $(LOCALEDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
+ @mkdir -p $(dir $@)
+ cp $< $@
+
+.PHONY: i18n
+i18n: $(I18Nmsgs) $(I18Npot)
+
+### Targets:
+
+libvdr-$(PLUGIN).so: $(OBJS)
+ $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
+ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
+
+dist: clean
+ @-rm -rf $(TMPDIR)/$(ARCHIVE)
+ @mkdir $(TMPDIR)/$(ARCHIVE)
+ @cp -a * $(TMPDIR)/$(ARCHIVE)
+ @tar czf $(PACKAGE).tgz -C $(TMPDIR) $(ARCHIVE)
+ @-rm -rf $(TMPDIR)/$(ARCHIVE)
+ @echo Distribution package created as $(PACKAGE).tgz
+
+clean:
+ @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
diff --git a/PLUGINS/src/pictures/README b/PLUGINS/src/pictures/README
new file mode 100644
index 0000000..bd6bb7d
--- /dev/null
+++ b/PLUGINS/src/pictures/README
@@ -0,0 +1,119 @@
+This is a "plugin" for the Video Disk Recorder (VDR).
+
+Written by: Klaus Schmidinger <kls@cadsoft.de>
+
+Project's homepage: www.cadsoft.de/vdr
+
+Latest version available at: www.cadsoft.de/vdr
+
+This program 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 of the License, or
+(at your option) any later version.
+See the file COPYING for more information.
+
+Description:
+============
+
+The 'pictures' plugin implements a simple picture viewer.
+
+There is already an 'image' plugin out there which has a lot more
+functionality than this one, but it's way too complex for my taste,
+and also converts the image files on-the-fly, which makes it slow
+on slow hardware.
+
+This plugin assumes that the pictures have already been converted to
+MPEG frames (with the 'pic2mpg' script that comes with this archive),
+and doesn't implement any fancy features like zooming, panning or
+tiled previews. It's just a very simple viewer.
+
+It also assumes a rather particular directory structure (see below),
+which I have found to fit well for my needs. If you use a different
+structure, the plugin should still work, but the information displayed
+in the caption may not be as expected.
+
+Remote control key functions while in the Pictures menu:
+========================================================
+
+- Left/right/Up/Down: navigate in the menu as usual.
+- Ok: opens a directory or displays the selected
+ picture.
+- Red/Play: start a slide show at the first picture in the
+ selected directory (or at the selected picture).
+
+Remote control key functions while displaying pictures:
+=======================================================
+
+- Left/Right: advances to the previous/next picture. At the end of a directory
+ it automatically advances to the first picture of the next
+ directory and displays the caption.
+- Up/Play: start the slide show.
+- Down/Pause: stop the slide show.
+- Blue/Stop: exit from the picture viewer.
+- Green/Prev: skip to the first picture in the previous directory.
+- Yellow/Next: skip to the first picture in the next directory.
+- Ok: toggle the caption display.
+- Back: return to the picture selection menu.
+
+The slide show starts with the picture immediately following the one that
+is currently visible, and continues until the last available picture,
+automatically crossing directories as necessary.
+
+Pressing any of the Left/Right, Green/Prev, Yellow/Next or Back keys
+automatically stops an ongoing slide show.
+
+Directory structure:
+====================
+
+The 'pictures' plugin requires a particular directory structure in order to
+work properly. Starting at some base directory (e.g. "/path/to/pictures"),
+there is one directory level marking the year in which the pictures were
+taken, followed by a level with a properly sortable combination of month
+and description, and finally the plain picture files, as in
+
+/path/to/pictures/YEAR/MONTH_DESCRIPTION/*.jpg
+
+For example
+
+/path/to/pictures/2007/06a_Vacation_in_Colorado/dsc01234.jpg
+/path/to/pictures/2007/06a_Vacation_in_Colorado/dsc01235.jpg
+/path/to/pictures/2007/06b_Our_cat/dsc01236.jpg
+
+The MONTH is "01" for January through "12" for December. If there is more
+than one entry for one month, it should be followed by a letter to make them
+sort correctly. Note that this is just a suggestion on how to make the
+directories sort in the correct chronological order. Instead of the two digit
+month number, optionally followed by a letter, you can use anything else you
+like. There must be an underscore between the MONTH and the DESCRIPTION part,
+and any underscores within the DESCRIPTION will be converted to blanks when
+displaying the description (this is done so that blanks can be avoided in
+the directory names).
+
+Preparing the files:
+====================
+
+In order to display the pictures as "still pictures" on the DVB device, they
+need to be converted into MPEG frames. This procedure takes some time, and
+would make viewing pictures sluggish, especially on slow hardware. Therefore
+the script "pic2mpg" must be used to convert all picture files before
+using this plugin, as in
+
+pic2mpg /path/to/pictures /path/to/pictures.MPG
+
+This will recursively walk through all pictures in the source directory and
+convert them into MPEG frames, stored in the destination directory. The
+extension ".MPG" is just a suggestion, you can name the directory anything
+you like, and it doesn't have to start with the same path as the source
+directory. Just don't make the destination directory a subdirectory of
+the source directory, because this would surely lead to problems.
+See "pic2mpg -h" for a list of available options.
+The pic2mpg conversion can be run any time, even if converted pictures
+already exist. It will only convert pictures that haven't been converted
+yet. Any changes to the source directory will be reflected in the destination
+directory accordingly after pic2mpg has finished (note that this especially
+means that any files or directories in the destination tree that have no
+corresponding entry in the source tree will be deleted!). So you can run
+pic2mpg, for instance, after copying new pictures into your picture
+directory, or after making any other kind of changes to your existing
+pictures. It might even be a good idea to run pic2mpg in a (nightly)
+cron job.
diff --git a/PLUGINS/src/pictures/entry.c b/PLUGINS/src/pictures/entry.c
new file mode 100644
index 0000000..006a359
--- /dev/null
+++ b/PLUGINS/src/pictures/entry.c
@@ -0,0 +1,144 @@
+/*
+ * entry.c: Data structure to handle still pictures
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ * $Id: entry.c 1.1 2008/01/06 09:52:41 kls Exp $
+ */
+
+#include "entry.h"
+
+cPictureEntry::cPictureEntry(const char *Name, const cPictureEntry *Parent, bool IsDirectory)
+{
+ name = strdup(Name);
+ parent = Parent;
+ isDirectory = IsDirectory;
+ entries = NULL;
+}
+
+cPictureEntry::~cPictureEntry()
+{
+ free(name);
+ delete entries;
+}
+
+int cPictureEntry::Compare(const cListObject &ListObject) const
+{
+ cPictureEntry *p = (cPictureEntry *)&ListObject;
+ if (IsDirectory() && !p->IsDirectory())
+ return -1;
+ if (!IsDirectory() && p->IsDirectory())
+ return +1;
+ if (IsDirectory())
+ return strcoll(name, p->name);
+ else
+ return strcmp(name, p->name); // correctly sorts dsc01234.jpg and dsc01234a.jpg in case pictures have been "squeezed in"
+}
+
+cString cPictureEntry::Path(void) const
+{
+ return parent ? AddDirectory(parent->Path(), name) : name;
+}
+
+void cPictureEntry::Load(void) const
+{
+ if (isDirectory && !entries) {
+ cString Directory = Path();
+ cReadDir d(Directory);
+ if (d.Ok()) {
+ struct dirent *e;
+ while ((e = d.Next()) != NULL) {
+ if (strcmp(e->d_name, ".") && strcmp(e->d_name, "..")) {
+ struct stat ds;
+ if (stat(AddDirectory(Directory, e->d_name), &ds) == 0) {
+ if (!entries)
+ entries = new cList<cPictureEntry>;
+ entries->Add(new cPictureEntry(e->d_name, this, S_ISDIR(ds.st_mode)));
+ }
+ }
+ }
+ if (entries)
+ entries->Sort();
+ }
+ else
+ LOG_ERROR_STR(*Directory);
+ }
+}
+
+const cList<cPictureEntry> *cPictureEntry::Entries(void) const
+{
+ Load();
+ return entries;
+}
+
+const cPictureEntry *cPictureEntry::FirstPicture(void) const
+{
+ Load();
+ if (entries) {
+ for (cPictureEntry *pe = entries->First(); pe; pe = entries->Next(pe)) {
+ if (pe->IsDirectory()) {
+ const cPictureEntry *p = pe->FirstPicture();
+ if (p)
+ return p;
+ }
+ else
+ return pe;
+ }
+ }
+ return NULL;
+}
+
+const cPictureEntry *cPictureEntry::LastPicture(void) const
+{
+ Load();
+ if (entries) {
+ for (cPictureEntry *pe = entries->Last(); pe; pe = entries->Prev(pe)) {
+ if (pe->IsDirectory()) {
+ const cPictureEntry *p = pe->LastPicture();
+ if (p)
+ return p;
+ }
+ else
+ return pe;
+ }
+ }
+ return NULL;
+}
+
+const cPictureEntry *cPictureEntry::PrevPicture(const cPictureEntry *This) const
+{
+ if (This) {
+ const cPictureEntry *pe = (cPictureEntry *)entries->Prev(This);
+ if (pe) {
+ if (pe->IsDirectory()) {
+ const cPictureEntry *p = pe->LastPicture();
+ if (p)
+ return p;
+ return PrevPicture(pe);
+ }
+ return pe;
+ }
+ }
+ if (parent)
+ return parent->PrevPicture(this);
+ return NULL;
+}
+
+const cPictureEntry *cPictureEntry::NextPicture(const cPictureEntry *This) const
+{
+ if (This) {
+ cPictureEntry *pe = (cPictureEntry *)entries->Next(This);
+ if (pe) {
+ if (pe->IsDirectory()) {
+ const cPictureEntry *p = pe->FirstPicture();
+ if (p)
+ return p;
+ return NextPicture(pe);
+ }
+ return pe;
+ }
+ }
+ if (parent)
+ return parent->NextPicture(this);
+ return NULL;
+}
diff --git a/PLUGINS/src/pictures/entry.h b/PLUGINS/src/pictures/entry.h
new file mode 100644
index 0000000..5c72e5e
--- /dev/null
+++ b/PLUGINS/src/pictures/entry.h
@@ -0,0 +1,36 @@
+/*
+ * entry.h: Data structure to handle still pictures
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ * $Id: entry.h 1.1 2008/01/06 12:30:50 kls Exp $
+ */
+
+#ifndef _ENTRY_H
+#define _ENTRY_H
+
+#include <vdr/tools.h>
+
+class cPictureEntry : public cListObject {
+private:
+ char *name;
+ const cPictureEntry *parent;
+ bool isDirectory;
+ mutable cList<cPictureEntry> *entries;
+ void Load(void) const;
+public:
+ cPictureEntry(const char *Name, const cPictureEntry *Parent, bool IsDirectory);
+ virtual ~cPictureEntry();
+ virtual int Compare(const cListObject &ListObject) const;
+ const char *Name(void) const { return name; }
+ const cPictureEntry *Parent(void) const { return parent; }
+ bool IsDirectory(void) const { return isDirectory; }
+ cString Path(void) const;
+ const cList<cPictureEntry> *Entries(void) const;
+ const cPictureEntry *FirstPicture(void) const;
+ const cPictureEntry *LastPicture(void) const;
+ const cPictureEntry *PrevPicture(const cPictureEntry *This = NULL) const;
+ const cPictureEntry *NextPicture(const cPictureEntry *This = NULL) const;
+ };
+
+#endif //_ENTRY_H
diff --git a/PLUGINS/src/pictures/menu.c b/PLUGINS/src/pictures/menu.c
new file mode 100644
index 0000000..6a64d48
--- /dev/null
+++ b/PLUGINS/src/pictures/menu.c
@@ -0,0 +1,129 @@
+/*
+ * menu.c: A menu for still pictures
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ * $Id: menu.c 1.1 2008/01/13 11:35:18 kls Exp $
+ */
+
+#include "menu.h"
+#include <vdr/tools.h>
+#include "entry.h"
+#include "player.h"
+
+char PictureDirectory[PATH_MAX] = "";
+
+static bool PathStartsWith(const char *Path, const char *Name)
+{
+ if (Path && Name) {
+ while (*Name) {
+ if (*Path++ != *Name++)
+ return false;
+ }
+ if (*Path && *Path != '/')
+ return false;
+ return true;
+ }
+ return false;
+}
+
+static const char *NextLevel(const char *Path)
+{
+ if (Path) {
+ const char *p = strchr(Path, '/');
+ return p ? p + 1 : NULL;
+ }
+ return Path;
+}
+
+cPictureEntry *cPictureMenu::pictures = NULL;
+
+cPictureMenu::cPictureMenu(const cPictureEntry *PictureEntry, const char *Path)
+:cOsdMenu(tr("Pictures"))
+{
+ pictureEntry = PictureEntry;
+ if (!pictureEntry)
+ pictureEntry = pictures = new cPictureEntry(PictureDirectory, NULL, true);
+ if (pictureEntry->Parent()) {
+ if (!pictureEntry->Parent()->Parent())
+ SetTitle(pictureEntry->Name()); // Year
+ else
+ SetTitle(cString::sprintf("%s: %s", pictureEntry->Parent()->Name(), *HandleUnderscores(pictureEntry->Name()))); // Year/Description
+ }
+ Set(Path);
+}
+
+cPictureMenu::~cPictureMenu()
+{
+ if (pictures && pictureEntry && !pictureEntry->Parent())
+ DELETENULL(pictures);
+}
+
+void cPictureMenu::Set(const char *Path)
+{
+ Clear();
+ const cList<cPictureEntry> *l = pictureEntry->Entries();
+ if (l) {
+ for (const cPictureEntry *e = l->First(); e; e = l->Next(e)) {
+ cString Name = HandleUnderscores(e->Name());
+ if (!e->IsDirectory())
+ Name.Truncate(-4); // don't display the ".mpg" extension
+ Add(new cOsdItem(HandleUnderscores(Name)), PathStartsWith(Path, e->Name()));
+ }
+ }
+ SetHelp(Count() ? trVDR("Button$Play") : NULL, NULL, NULL, cPictureControl::Active() ? trVDR("Button$Stop") : NULL);
+ if (Current() >= 0) {
+ const char *p = NextLevel(Path);
+ if (p)
+ SelectItem(p);
+ }
+}
+
+eOSState cPictureMenu::SelectItem(const char *Path, bool SlideShow)
+{
+ cOsdItem *Item = Get(Current());
+ if (Item) {
+ const cList<cPictureEntry> *l = pictureEntry->Entries();
+ if (l) {
+ cPictureEntry *pe = l->Get(Current());
+ if (pe) {
+ if (SlideShow) {
+ cControl::Launch(new cPictureControl(pictures, pe, true));
+ pictures = NULL; // cPictureControl takes ownership
+ return osEnd;
+ }
+ if (pe->IsDirectory())
+ return AddSubMenu(new cPictureMenu(pe, Path));
+ else if (!Path) {
+ cControl::Launch(new cPictureControl(pictures, pe));
+ pictures = NULL; // cPictureControl takes ownership
+ return osEnd;
+ }
+ }
+ }
+ }
+ return osContinue;
+}
+
+eOSState cPictureMenu::ProcessKey(eKeys Key)
+{
+ eOSState state = cOsdMenu::ProcessKey(Key);
+ if (state == osUnknown) {
+ switch (Key) {
+ case kRed:
+ case kPlay: return SelectItem(NULL, true);
+ case kBlue:
+ case kStop: if (cPictureControl::Active())
+ return osStopReplay;
+ break;
+ case kOk: return SelectItem();
+ default: break;
+ }
+ }
+ return state;
+}
+
+cPictureMenu *cPictureMenu::CreatePictureMenu(void)
+{
+ return new cPictureMenu(NULL, cPictureControl::LastDisplayed());
+}
diff --git a/PLUGINS/src/pictures/menu.h b/PLUGINS/src/pictures/menu.h
new file mode 100644
index 0000000..ace753e
--- /dev/null
+++ b/PLUGINS/src/pictures/menu.h
@@ -0,0 +1,31 @@
+/*
+ * menu.h: A menu for still pictures
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ * $Id: menu.h 1.1 2008/01/12 11:22:52 kls Exp $
+ */
+
+#ifndef _MENU_H
+#define _MENU_H
+
+#include <vdr/osdbase.h>
+#include <vdr/tools.h>
+#include "entry.h"
+
+extern char PictureDirectory[PATH_MAX];
+
+class cPictureMenu : public cOsdMenu {
+private:
+ static cPictureEntry *pictures;
+ const cPictureEntry *pictureEntry;
+ void Set(const char *Path);
+ eOSState SelectItem(const char *Path = NULL, bool SlideShow = false);
+public:
+ cPictureMenu(const cPictureEntry *PictureEntry, const char *Path = NULL);
+ ~cPictureMenu();
+ virtual eOSState ProcessKey(eKeys Key);
+ static cPictureMenu *CreatePictureMenu(void);
+ };
+
+#endif //_MENU_H
diff --git a/PLUGINS/src/pictures/pic2mpg b/PLUGINS/src/pictures/pic2mpg
new file mode 100755
index 0000000..5791685
--- /dev/null
+++ b/PLUGINS/src/pictures/pic2mpg
@@ -0,0 +1,176 @@
+#!/usr/bin/perl
+
+# pic2mpg: Convert picture files to MPEG still frames
+#
+# Converts either a single picture file or all files in a
+# given directory (recursively) to MPEG still frames.
+#
+# See the README file for copyright information and how to reach the author.
+#
+# $Id: pic2mpg 1.1 2008/01/13 11:09:12 kls Exp $
+
+## TODO implement HDTV (1920 x 1080)
+
+use File::Path;
+use Getopt::Std;
+use Image::Size;
+
+$Usage = qq{
+Usage: $0 [options] picture-dir mpeg-dir
+ $0 [options] picture-file mpeg-file
+
+Options: -a Aspect ratio 4:3 (default is 16:9)
+ -h print Help
+ -f Force conversion
+ -n NTSC (default is PAL)
+ -v num Verbose (0=none, 1=list files, 2=detailed)
+ -x percent X overscan in percent
+ -y percent Y overscan in percent
+};
+
+getopts("ahfnv:x:y:") || die $Usage;
+
+die $Usage if $opt_h;
+
+$Aspect = $opt_a;
+$Force = $opt_f;
+$NTSC = $opt_n;
+$Verbose = $opt_v;
+$OverscanX = $opt_x;
+$OverscanY = $opt_y;
+
+$ListFiles = $Verbose >= 1;
+$Detailed = $Verbose >= 2;
+
+# Screen size:
+
+$SW = $NTSC ? 720 : 720;
+$SH = $NTSC ? 480 : 576;
+
+$ScreenRatio = $Aspect ? 4 / 3 : 16 / 9;
+
+# Converter programs:
+
+%PNMCONV = (
+ bmp => "bmptopnm",
+ gif => "giftopnm",
+ jpeg => "jpegtopnm",
+ jpg => "jpegtopnm",
+ png => "pngtopnm",
+ pnm => "cat",
+ tif => "tifftopnm",
+ tiff => "tifftopnm",
+ );
+
+# Command options:
+
+die "$0: missing parameter\n" unless $ARGV[0] && $ARGV[1];
+die "$0: file or directory not found: $ARGV[0]\n" unless -e $ARGV[0];
+die "$0: source and destination must be different\n" if $ARGV[0] eq $ARGV[1];
+
+$verbose1 = $Detailed ? "--verbose" : "";
+$verbose2 = $Detailed ? "-v 2" : "-v 0";
+$system1 = $NTSC ? "" : "--pal";
+$system2 = $NTSC ? "n" : "p";
+$framerate = $NTSC ? "30000:1001" : "25:1";
+$aspect = $Aspect ? "2" : "3";
+
+# Convert a single file:
+
+if (-f $ARGV[0]) {
+ die "$0: mixed file and directory ('$ARGV[0]' <-> '$ARGV[1]')\n" unless !-e $ARGV[1] || -f $ARGV[1];
+ ConvertFile($ARGV[0], $ARGV[1]);
+ exit;
+ }
+
+die "$0: mixed directory and file ('$ARGV[0]' <-> '$ARGV[1]')\n" unless !-e $ARGV[1] || -d $ARGV[1];
+
+$PICDIR = $ARGV[0];
+$MPGDIR = $ARGV[1];
+
+# Convert pictures to mpegs:
+
+chdir($PICDIR) || die "$PICDIR: $!\n";
+
+@Pictures = `find -type f`;
+chomp(@Pictures);
+
+for $pic (@Pictures) {
+ my $mpg = "$MPGDIR/$pic.mpg";
+ if ($Force || !-e $mpg || -M $mpg > -M $pic) {
+ (my $dir = $mpg) =~ s/\/[^\/]*$//;
+ mkpath($dir);
+ ConvertFile($pic, $mpg);
+ }
+ }
+
+# Remove mpegs without pictures:
+
+chdir($MPGDIR) || die "$MPGDIR: $!\n";
+
+@Mpegs = `find -type f`;
+chomp(@Mpegs);
+
+for $mpg (@Mpegs) {
+ my $pic = "$PICDIR/$mpg";
+ $pic =~ s/\.mpg$//;
+ if (!-e $pic) {
+ print "removing $mpg\n";
+ unlink($mpg);
+ }
+ }
+
+# Remove empty directories:
+
+chdir($MPGDIR) || die "$MPGDIR: $!\n";
+
+for ($i = 0; $i < 10; $i++) { # dirs might become empty when removing empty subdirs
+ @Dirs = `find -type d -empty`;
+ chomp(@Dirs);
+ last unless @Dirs;
+
+ for $dir (@Dirs) {
+ $dir = EscapeMeta($dir);
+ print "removing $dir\n";
+ !system("rm -rf $dir") || die "$dir: $!\n";
+ }
+ }
+
+# Actual file conversion:
+
+sub ConvertFile
+{
+ my ($Pict, $Mpeg) = @_;
+ (my $Type) = $Pict =~ /\.([^\.]*)$/;
+ die "unknown file type '$Type': '$Pict'\n" unless defined $PNMCONV{$Type};
+ my ($w, $h) = imgsize($Pict);
+ print "image size is $w x $h\n" if ($Detailed);
+ if ($w / $h <= $ScreenRatio) {
+ $w = $h * $ScreenRatio;
+ }
+ else {
+ $h = $w / $ScreenRatio;
+ }
+ my $ScaleW = $SW / $w * (100 - 2 * $OverscanX) / 100;
+ my $ScaleH = $SH / $h * (100 - 2 * $OverscanY) / 100;
+ $Pict = EscapeMeta($Pict);
+ $Mpeg = EscapeMeta($Mpeg);
+ print "$Pict -> $Mpeg\n" if $ListFiles;
+ my $Cmd = "$PNMCONV{$Type} $Pict 2> /dev/null |"
+ . "pnmscale $verbose1 --xscale=$ScaleW --yscale=$ScaleH |"
+ . "pnmpad $verbose1 --black --width $SW --height $SH |"
+ . "ppmntsc $verbose1 $system1 |"
+ . "ppmtoy4m $verbose2 -F $framerate -I p -S 420mpeg2 |"
+ . "mpeg2enc $verbose2 -f 3 -b 12500 -a $aspect -q 1 -n $system2 -o $Mpeg";
+ !system($Cmd) || die "$Cmd: $!\n";
+ $Cmd = "touch -r $Pict $Mpeg";
+ !system($Cmd) || die "$Cmd: $!\n";
+}
+
+sub EscapeMeta
+{
+ my $META = ' !"#$%&\'()*;<>?[\\]`{|}~';
+ my $s = shift;
+ $s =~ s/([$META])/\\$1/g;
+ return $s;
+}
diff --git a/PLUGINS/src/pictures/pictures.c b/PLUGINS/src/pictures/pictures.c
new file mode 100644
index 0000000..aa06c98
--- /dev/null
+++ b/PLUGINS/src/pictures/pictures.c
@@ -0,0 +1,124 @@
+/*
+ * pictures.c: A plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ * $Id: pictures.c 1.1 2008/01/12 14:46:52 kls Exp $
+ */
+
+#include <getopt.h>
+#include <vdr/plugin.h>
+#include "menu.h"
+#include "player.h"
+
+static const char *VERSION = "0.0.1";
+static const char *DESCRIPTION = trNOOP("A simple picture viewer");
+static const char *MAINMENUENTRY = trNOOP("Pictures");
+
+// --- cMenuSetupPictures ----------------------------------------------------
+
+class cMenuSetupPictures : public cMenuSetupPage {
+private:
+ char newPictureDirectory[PATH_MAX];
+ int newSlideShowDelay;
+protected:
+ virtual void Store(void);
+public:
+ cMenuSetupPictures(void);
+ };
+
+cMenuSetupPictures::cMenuSetupPictures(void)
+{
+ strn0cpy(newPictureDirectory, PictureDirectory, sizeof(newPictureDirectory));
+ newSlideShowDelay = SlideShowDelay;
+ Add(new cMenuEditStrItem(tr("Picture directory"), newPictureDirectory, sizeof(newPictureDirectory)));
+ Add(new cMenuEditIntItem(tr("Slide show delay (s)"), &newSlideShowDelay));
+}
+
+void cMenuSetupPictures::Store(void)
+{
+ SetupStore("PictureDirectory", strn0cpy(PictureDirectory, newPictureDirectory, sizeof(PictureDirectory)));
+ SetupStore("SlideShowDelay", SlideShowDelay = newSlideShowDelay);
+}
+
+// --- cPluginPictures -------------------------------------------------------
+
+class cPluginPictures : public cPlugin {
+private:
+ // Add any member variables or functions you may need here.
+public:
+ cPluginPictures(void);
+ virtual ~cPluginPictures();
+ virtual const char *Version(void) { return VERSION; }
+ virtual const char *Description(void) { return tr(DESCRIPTION); }
+ virtual const char *CommandLineHelp(void);
+ virtual bool ProcessArgs(int argc, char *argv[]);
+ virtual const char *MainMenuEntry(void) { return tr(MAINMENUENTRY); }
+ virtual cOsdObject *MainMenuAction(void);
+ virtual cMenuSetupPage *SetupMenu(void);
+ virtual bool SetupParse(const char *Name, const char *Value);
+ };
+
+cPluginPictures::cPluginPictures(void)
+{
+ // Initialize any member variables here.
+ // DON'T DO ANYTHING ELSE THAT MAY HAVE SIDE EFFECTS, REQUIRE GLOBAL
+ // VDR OBJECTS TO EXIST OR PRODUCE ANY OUTPUT!
+}
+
+cPluginPictures::~cPluginPictures()
+{
+ // Clean up after yourself!
+}
+
+const char *cPluginPictures::CommandLineHelp(void)
+{
+ // Return a string that describes all known command line options.
+ return " -d DIR, --dir=DIR set the picture directory to DIR\n";
+}
+
+bool cPluginPictures::ProcessArgs(int argc, char *argv[])
+{
+ // Implement command line argument processing here if applicable.
+ static struct option long_options[] = {
+ { "dir", required_argument, NULL, 'd' },
+ { NULL }
+ };
+
+ int c;
+ while ((c = getopt_long(argc, argv, "d:s:", long_options, NULL)) != -1) {
+ switch (c) {
+ case 'd': strn0cpy(PictureDirectory, optarg, sizeof(PictureDirectory));
+ break;
+ default: return false;
+ }
+ }
+ return true;
+}
+
+cOsdObject *cPluginPictures::MainMenuAction(void)
+{
+ // Perform the action when selected from the main VDR menu.
+ if (*PictureDirectory)
+ return cPictureMenu::CreatePictureMenu();
+ Skins.Message(mtWarning, tr("No picture directory has been defined!"));
+ return NULL;
+}
+
+cMenuSetupPage *cPluginPictures::SetupMenu(void)
+{
+ // Return a setup menu in case the plugin supports one.
+ return new cMenuSetupPictures;
+}
+
+bool cPluginPictures::SetupParse(const char *Name, const char *Value)
+{
+ // Parse your own setup parameters and store their values.
+ if (!strcasecmp(Name, "PictureDirectory")) strn0cpy(PictureDirectory, Value, sizeof(PictureDirectory));
+ else if (!strcasecmp(Name, "SlideShowDelay")) SlideShowDelay = atoi(Value);
+ else
+ return false;
+ return true;
+}
+
+VDRPLUGINCREATOR(cPluginPictures); // Don't touch this!
diff --git a/PLUGINS/src/pictures/player.c b/PLUGINS/src/pictures/player.c
new file mode 100644
index 0000000..9e07fc5
--- /dev/null
+++ b/PLUGINS/src/pictures/player.c
@@ -0,0 +1,249 @@
+/*
+ * player.c: A player for still pictures
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ * $Id: player.c 1.1 2008/01/13 11:29:27 kls Exp $
+ */
+
+#include "player.h"
+#include <vdr/remote.h>
+#include <vdr/tools.h>
+
+int SlideShowDelay = 3; // seconds
+
+cString HandleUnderscores(const char *s)
+{
+ // Skip anything before and including the first '_' and replace
+ // any remaining '_' with blanks:
+ const char *p = strchr(s, '_');
+ if (p) {
+ p++;
+ char buf[strlen(p) + 1];
+ strcpy(buf, p);
+ return strreplace(buf, '_', ' ');
+ }
+ return s;
+}
+
+// --- cPicturePlayer --------------------------------------------------------
+
+class cPicturePlayer : public cPlayer {
+private:
+ int size;
+ int length;
+ uchar *buffer;
+ virtual void Activate(bool On);
+public:
+ cPicturePlayer(void);
+ ~cPicturePlayer();
+ void SetPicture(const char *FileName);
+ };
+
+cPicturePlayer::cPicturePlayer(void)
+{
+ size = KILOBYTE(100); // will be adjusted automatically if files are larger
+ length = 0;
+ buffer = MALLOC(uchar, size);
+}
+
+cPicturePlayer::~cPicturePlayer()
+{
+ free(buffer);
+}
+
+void cPicturePlayer::Activate(bool On)
+{
+ if (length > 0)
+ DeviceStillPicture(buffer, length);
+}
+
+void cPicturePlayer::SetPicture(const char *FileName)
+{
+ int f = open(FileName, O_RDONLY);
+ if (f >= 0) {
+ for (;;) {
+ length = read(f, buffer, size);
+ if (length > 0) {
+ if (length >= size) {
+ size = size * 3 / 2;
+ buffer = (uchar *)realloc(buffer, size);
+ lseek(f, 0, SEEK_SET);
+ continue;
+ }
+ DeviceStillPicture(buffer, length);
+ }
+ else
+ LOG_ERROR_STR(FileName);
+ break;
+ }
+ close(f);
+ }
+ else
+ LOG_ERROR_STR(FileName);
+}
+
+// --- cPictureControl -------------------------------------------------------
+
+int cPictureControl::active = 0;
+cString cPictureControl::lastDisplayed;
+
+cPictureControl::cPictureControl(cPictureEntry *Pictures, const cPictureEntry *PictureEntry, bool SlideShow)
+:cControl(player = new cPicturePlayer)
+{
+ pictures = Pictures;
+ pictureEntry = PictureEntry;
+ osd = NULL;
+ lastPath = "/";
+ slideShow = SlideShow;
+ alwaysDisplayCaption = false;
+ NextPicture(slideShow && pictureEntry->IsDirectory() ? 1 : 0);
+ active++;
+}
+
+cPictureControl::~cPictureControl()
+{
+ active--;
+ delete osd;
+ delete player;
+ delete pictures;
+}
+
+void cPictureControl::NextPicture(int Direction)
+{
+ if (Direction) {
+ const cPictureEntry *pe = Direction > 0 ? pictureEntry->NextPicture() : pictureEntry->PrevPicture();
+ if (pe)
+ pictureEntry = pe;
+ }
+ if (pictureEntry) {
+ player->SetPicture(pictureEntry->Path());
+ DisplayCaption();
+ }
+}
+
+void cPictureControl::NextDirectory(int Direction)
+{
+ // This only works reliable if a directory contains only subdirectories or pictures, not both!
+ if (Direction) {
+ const cPictureEntry *pe = Direction > 0 ? pictureEntry->Parent()->Entries()->Last()->NextPicture() : pictureEntry->Parent()->Entries()->First()->PrevPicture();
+ if (pe && Direction < 0)
+ pe = pe->Parent()->Entries()->First();
+ if (pe && pe != pictureEntry) {
+ pictureEntry = pe;
+ player->SetPicture(pictureEntry->Path());
+ DisplayCaption();
+ }
+ }
+}
+
+static void DrawTextOutlined(cOsd *Osd, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font)
+{
+ for (int dx = -1; dx <= 1; dx++) {
+ for (int dy = -1; dy <= 1; dy++) {
+ if (dx || dy)
+ Osd->DrawText(x + dx, y + dy, s, ColorBg, clrTransparent, Font);
+ }
+ }
+ Osd->DrawText(x, y, s, ColorFg, clrTransparent, Font);
+}
+
+void cPictureControl::DisplayCaption(void)
+{
+ bool Force = false;
+ cString Path = pictureEntry->Path();
+ lastDisplayed = Path + strlen(pictures->Name()) + 1;
+ const char *p = strrchr(Path, '/');
+ const char *q = strrchr(lastPath, '/');
+ if (p && q) {
+ int lp = p - Path;
+ int lq = q - lastPath;
+ if (lp != lq || strncmp(lastPath, Path, lp)) {
+ lastPath = Path;
+ Force = true;
+ }
+ }
+ if (!alwaysDisplayCaption && !Force) {
+ DELETENULL(osd);
+ return;
+ }
+ const cFont *Font = cFont::GetFont(fontOsd);
+ int w = cOsd::OsdWidth();
+ int h = 2 * Font->Height();
+ if (!osd) {
+ osd = cOsdProvider::NewOsd(cOsd::OsdLeft(), cOsd::OsdTop() + cOsd::OsdHeight() - h, OSD_LEVEL_SUBTITLES);
+ tArea Areas[] = { { 0, 0, w, h, 8 } };
+ if (Setup.AntiAlias && osd->CanHandleAreas(Areas, sizeof(Areas) / sizeof(tArea)) == oeOk)
+ osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea));
+ else {
+ tArea Areas[] = { { 0, 0, w, h, 4 } };
+ osd->SetAreas(Areas, sizeof(Areas) / sizeof(tArea));
+ }
+ }
+ const char *Year = pictureEntry->Parent()->Parent() ? pictureEntry->Parent()->Parent()->Name() : "";
+ cString Description = HandleUnderscores(pictureEntry->Parent()->Name());
+ osd->DrawRectangle(0, 0, w - 1, h - 1, clrTransparent);
+ DrawTextOutlined(osd, 0, 0, Description, clrWhite, clrBlack, Font);
+ DrawTextOutlined(osd, 0, h / 2, Year, clrWhite, clrBlack, Font);
+ struct stat sb;
+ if (stat(Path, &sb) == 0) {
+ cString Time = DayDateTime(sb.st_mtime);
+ DrawTextOutlined(osd, w - Font->Width(Time), h / 2, Time, clrWhite, clrBlack, Font);
+ }
+ p++;
+ Path.Truncate(-4); // don't display the ".mpg" extension
+ DrawTextOutlined(osd, w - Font->Width(p), 0, p, clrWhite, clrBlack, Font);
+ osd->Flush();
+}
+
+eOSState cPictureControl::ProcessKey(eKeys Key)
+{
+ switch (Key) {
+ case kUp:
+ case kPlay: slideShowDelay.Set();
+ slideShow = true;
+ break;
+ case kDown:
+ case kPause: slideShow = false;
+ break;
+ case kLeft|k_Repeat:
+ case kLeft: NextPicture(-1);
+ slideShow = false;
+ break;
+ case kRight|k_Repeat:
+ case kRight: NextPicture(+1);
+ slideShow = false;
+ break;
+ case kOk: if (osd && !alwaysDisplayCaption)
+ DELETENULL(osd);
+ else {
+ alwaysDisplayCaption = !alwaysDisplayCaption;
+ DisplayCaption();
+ }
+ break;
+ case kGreen:
+ case kPrev: NextDirectory(-1);
+ slideShow = false;
+ break;
+ case kYellow:
+ case kNext: NextDirectory(+1);
+ slideShow = false;
+ break;
+ case kBlue:
+ case kStop: return osEnd;
+ case kBack: slideShow = false;
+ cRemote::CallPlugin(PLUGIN_NAME_I18N);
+ break;
+ default: break;
+ }
+ if (slideShow && slideShowDelay.TimedOut()) {
+ NextPicture(+1);
+ slideShowDelay.Set(SlideShowDelay * 1000);
+ }
+ return osContinue;
+}
+
+const char *cPictureControl::LastDisplayed(void)
+{
+ return lastDisplayed;
+}
diff --git a/PLUGINS/src/pictures/player.h b/PLUGINS/src/pictures/player.h
new file mode 100644
index 0000000..ee9488f
--- /dev/null
+++ b/PLUGINS/src/pictures/player.h
@@ -0,0 +1,47 @@
+/*
+ * player.h: A player for still pictures
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ * $Id: player.h 1.1 2008/01/12 16:21:57 kls Exp $
+ */
+
+#ifndef _PLAYER_H
+#define _PLAYER_H
+
+#include <vdr/osd.h>
+#include <vdr/player.h>
+#include <vdr/tools.h>
+#include "entry.h"
+
+extern int SlideShowDelay;
+
+cString HandleUnderscores(const char *s);
+
+class cPicturePlayer;
+
+class cPictureControl : public cControl {
+private:
+ static int active;
+ static cString lastDisplayed;
+ cPictureEntry *pictures;
+ const cPictureEntry *pictureEntry;
+ cPicturePlayer *player;
+ cOsd *osd;
+ cString lastPath;
+ cTimeMs slideShowDelay;
+ bool slideShow;
+ bool alwaysDisplayCaption;
+ void NextPicture(int Direction);
+ void NextDirectory(int Direction);
+ void DisplayCaption(void);
+ virtual void Hide(void) {}
+public:
+ cPictureControl(cPictureEntry *Pictures, const cPictureEntry *PictureEntry, bool SlideShow = false);
+ virtual ~cPictureControl();
+ virtual eOSState ProcessKey(eKeys Key);
+ static bool Active(void) { return active > 0; }
+ static const char *LastDisplayed(void);
+ };
+
+#endif //_PLAYER_H
diff --git a/PLUGINS/src/pictures/po/de_DE.po b/PLUGINS/src/pictures/po/de_DE.po
new file mode 100644
index 0000000..48f942e
--- /dev/null
+++ b/PLUGINS/src/pictures/po/de_DE.po
@@ -0,0 +1,32 @@
+# VDR plugin language source file.
+# Copyright (C) 2008 Klaus Schmidinger <kls@cadsoft.de>
+# This file is distributed under the same license as the VDR package.
+# Klaus Schmidinger <kls@cadsoft.de>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pictures 0.0.1\n"
+"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
+"POT-Creation-Date: 2008-01-12 17:38+0100\n"
+"PO-Revision-Date: 2008-01-12 17:41+0100\n"
+"Last-Translator: Klaus Schmidinger <kls@cadsoft.de>\n"
+"Language-Team: German\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgid "Pictures"
+msgstr "Bilder"
+
+msgid "A simple picture viewer"
+msgstr "Ein einfacher Bildbetrachter"
+
+msgid "Picture directory"
+msgstr "Bilder-Verzeichnis"
+
+msgid "Slide show delay (s)"
+msgstr "Dia-Schau Wartezeit"
+
+msgid "No picture directory has been defined!"
+msgstr "Es wurde kein Bilder-Verzeichnis angegeben!"
diff --git a/PLUGINS/src/servicedemo/Makefile b/PLUGINS/src/servicedemo/Makefile
index 9625953..a20009a 100644
--- a/PLUGINS/src/servicedemo/Makefile
+++ b/PLUGINS/src/servicedemo/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.9 2007/08/15 13:05:42 kls Exp $
+# $Id: Makefile 1.10 2008/01/13 13:00:07 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -18,7 +18,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN1).c | awk '{ pr
### The C++ compiler and options:
CXX ?= g++
-CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual
+CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
### The directory environment:
diff --git a/PLUGINS/src/sky/Makefile b/PLUGINS/src/sky/Makefile
index 52a520b..30fbb42 100644
--- a/PLUGINS/src/sky/Makefile
+++ b/PLUGINS/src/sky/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.10 2007/08/15 13:06:08 kls Exp $
+# $Id: Makefile 1.11 2008/01/13 13:00:16 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -16,7 +16,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
### The C++ compiler and options:
CXX ?= g++
-CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual
+CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
### The directory environment:
diff --git a/PLUGINS/src/status/Makefile b/PLUGINS/src/status/Makefile
index 2c66d20..d725a39 100644
--- a/PLUGINS/src/status/Makefile
+++ b/PLUGINS/src/status/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.14 2007/08/15 13:06:17 kls Exp $
+# $Id: Makefile 1.15 2008/01/13 13:00:18 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -16,7 +16,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
### The C++ compiler and options:
CXX ?= g++
-CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual
+CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
### The directory environment:
diff --git a/PLUGINS/src/svdrpdemo/Makefile b/PLUGINS/src/svdrpdemo/Makefile
index a694446..7715284 100644
--- a/PLUGINS/src/svdrpdemo/Makefile
+++ b/PLUGINS/src/svdrpdemo/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile 1.8 2007/08/15 13:06:28 kls Exp $
+# $Id: Makefile 1.9 2008/01/13 13:00:20 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -16,7 +16,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
### The C++ compiler and options:
CXX ?= g++
-CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual
+CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
### The directory environment:
diff --git a/config.c b/config.c
index 1305ffb..31365f8 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.157 2007/10/06 14:28:58 kls Exp $
+ * $Id: config.c 1.158 2007/11/25 13:46:27 kls Exp $
*/
#include "config.h"
@@ -289,6 +289,7 @@ cSetup::cSetup(void)
CurrentDolby = 0;
InitialChannel = 0;
InitialVolume = -1;
+ EmergencyExit = 1;
}
cSetup& cSetup::operator= (const cSetup &s)
@@ -464,6 +465,7 @@ bool cSetup::Parse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "CurrentDolby")) CurrentDolby = atoi(Value);
else if (!strcasecmp(Name, "InitialChannel")) InitialChannel = atoi(Value);
else if (!strcasecmp(Name, "InitialVolume")) InitialVolume = atoi(Value);
+ else if (!strcasecmp(Name, "EmergencyExit")) EmergencyExit = atoi(Value);
else
return false;
return true;
@@ -546,6 +548,7 @@ bool cSetup::Save(void)
Store("CurrentDolby", CurrentDolby);
Store("InitialChannel", InitialChannel);
Store("InitialVolume", InitialVolume);
+ Store("EmergencyExit", EmergencyExit);
Sort();
diff --git a/config.h b/config.h
index 9ecda27..ba3a384 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.301 2007/11/10 13:38:19 kls Exp $
+ * $Id: config.h 1.303 2007/11/25 13:45:48 kls Exp $
*/
#ifndef __CONFIG_H
@@ -22,13 +22,13 @@
// VDR's own version number:
-#define VDRVERSION "1.5.12"
-#define VDRVERSNUM 10512 // Version * 10000 + Major * 100 + Minor
+#define VDRVERSION "1.5.13"
+#define VDRVERSNUM 10513 // Version * 10000 + Major * 100 + Minor
// The plugin API's version number:
-#define APIVERSION "1.5.12"
-#define APIVERSNUM 10512 // Version * 10000 + Major * 100 + Minor
+#define APIVERSION "1.5.13"
+#define APIVERSNUM 10513 // Version * 10000 + Major * 100 + Minor
// When loading plugins, VDR searches them by their APIVERSION, which
// may be smaller than VDRVERSION in case there have been no changes to
@@ -266,6 +266,7 @@ public:
int CurrentDolby;
int InitialChannel;
int InitialVolume;
+ int EmergencyExit;
int __EndData__;
cSetup(void);
cSetup& operator= (const cSetup &s);
diff --git a/cutter.c b/cutter.c
index b596f3f..42f3ab3 100644
--- a/cutter.c
+++ b/cutter.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: cutter.c 1.17 2007/08/25 10:33:18 kls Exp $
+ * $Id: cutter.c 1.18 2008/01/13 12:22:21 kls Exp $
*/
#include "cutter.h"
@@ -111,7 +111,9 @@ void cCuttingThread::Action(void)
}
}
else {
- error = "index";
+ // Error, unless we're past the last cut-in and there's no cut-out
+ if (Mark || LastMark)
+ error = "index";
break;
}
diff --git a/dvbsubtitle.c b/dvbsubtitle.c
index e845594..16a02c6 100644
--- a/dvbsubtitle.c
+++ b/dvbsubtitle.c
@@ -7,7 +7,7 @@
* Original author: Marco Schlüßler <marco@lordzodiac.de>
* With some input from the "subtitle plugin" by Pekka Virtanen <pekka.virtanen@sci.fi>
*
- * $Id: dvbsubtitle.c 1.2 2007/11/03 14:36:07 kls Exp $
+ * $Id: dvbsubtitle.c 1.3 2007/11/25 13:33:08 kls Exp $
*/
#include "dvbsubtitle.h"
@@ -102,7 +102,7 @@ private:
uchar Get4Bits(const uchar *Data, int &Index);
bool Decode2BppCodeString(const uchar *Data, int &Index, int&x, int y);
bool Decode4BppCodeString(const uchar *Data, int &Index, int&x, int y);
- bool Decode8BppCodeString(const uchar *Data, int &Index, int&y, int y);
+ bool Decode8BppCodeString(const uchar *Data, int &Index, int&x, int y);
public:
cSubtitleObject(int ObjectId, cBitmap *Bitmap);
int ObjectId(void) { return objectId; }
diff --git a/menu.c b/menu.c
index 7b8ce9a..b7ecf2a 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.465 2007/11/03 15:02:00 kls Exp $
+ * $Id: menu.c 1.469 2008/01/13 13:59:33 kls Exp $
*/
#include "menu.h"
@@ -931,6 +931,7 @@ eOSState cMenuTimers::ProcessKey(eKeys Key)
case kRed: state = OnOff(); break; // must go through SetHelpKeys()!
case kGreen: return New();
case kYellow: state = Delete(); break;
+ case kInfo:
case kBlue: return Info();
break;
default: break;
@@ -986,6 +987,7 @@ eOSState cMenuEvent::ProcessKey(eKeys Key)
DisplayMenu()->Scroll(NORMALKEY(Key) == kUp || NORMALKEY(Key) == kLeft, NORMALKEY(Key) == kLeft || NORMALKEY(Key) == kRight);
cStatus::MsgOsdTextItem(NULL, NORMALKEY(Key) == kUp || NORMALKEY(Key) == kLeft);
return osContinue;
+ case kInfo: return osBack;
default: break;
}
@@ -1057,12 +1059,13 @@ bool cMenuScheduleItem::Update(bool Force)
char v = event->Vps() && (event->Vps() - event->StartTime()) ? 'V' : ' ';
char r = event->SeenWithin(30) && event->IsRunning() ? '*' : ' ';
const char *csn = channel ? channel->ShortName(true) : NULL;
+ cString eds = event->GetDateString();
if (channel && withDate)
- asprintf(&buffer, "%d\t%.*s\t%.*s\t%s\t%c%c%c\t%s", channel->Number(), Utf8SymChars(csn, 6), csn, 6, *event->GetDateString(), *event->GetTimeString(), t, v, r, event->Title());
+ asprintf(&buffer, "%d\t%.*s\t%.*s\t%s\t%c%c%c\t%s", channel->Number(), Utf8SymChars(csn, 6), csn, Utf8SymChars(eds, 6), *eds, *event->GetTimeString(), t, v, r, event->Title());
else if (channel)
asprintf(&buffer, "%d\t%.*s\t%s\t%c%c%c\t%s", channel->Number(), Utf8SymChars(csn, 6), csn, *event->GetTimeString(), t, v, r, event->Title());
else
- asprintf(&buffer, "%.*s\t%s\t%c%c%c\t%s", 6, *event->GetDateString(), *event->GetTimeString(), t, v, r, event->Title());
+ asprintf(&buffer, "%.*s\t%s\t%c%c%c\t%s", Utf8SymChars(eds, 6), *eds, *event->GetTimeString(), t, v, r, event->Title());
SetText(buffer, false);
result = true;
}
@@ -1216,6 +1219,7 @@ eOSState cMenuWhatsOn::ProcessKey(eKeys Key)
}
break;
case kBlue: return Switch();
+ case kInfo:
case kOk: if (Count())
return AddSubMenu(new cMenuEvent(((cMenuScheduleItem *)Get(Current()))->event, true, true));
break;
@@ -1486,6 +1490,7 @@ eOSState cMenuSchedule::ProcessKey(eKeys Key)
case kBlue: if (Count() && otherChannel)
return Switch();
break;
+ case kInfo:
case kOk: if (Count())
return AddSubMenu(new cMenuEvent(((cMenuScheduleItem *)Get(Current()))->event, otherChannel, true));
break;
@@ -1815,6 +1820,7 @@ eOSState cMenuRecording::ProcessKey(eKeys Key)
DisplayMenu()->Scroll(NORMALKEY(Key) == kUp || NORMALKEY(Key) == kLeft, NORMALKEY(Key) == kLeft || NORMALKEY(Key) == kRight);
cStatus::MsgOsdTextItem(NULL, NORMALKEY(Key) == kUp || NORMALKEY(Key) == kLeft);
return osContinue;
+ case kInfo: return osBack;
default: break;
}
@@ -2112,6 +2118,7 @@ eOSState cMenuRecordings::ProcessKey(eKeys Key)
case kRed: return (helpKeys > 1 && RecordingCommands.Count()) ? Commands() : Play();
case kGreen: return Rewind();
case kYellow: return Delete();
+ case kInfo:
case kBlue: return Info();
case k1...k9: return Commands(Key);
case kNone: if (Recordings.StateChanged(recordingsState))
@@ -2760,6 +2767,7 @@ cMenuSetupMisc::cMenuSetupMisc(void)
Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Channel entry timeout (ms)"), &data.ChannelEntryTimeout, 0));
Add(new cMenuEditChanItem(tr("Setup.Miscellaneous$Initial channel"), &data.InitialChannel, tr("Setup.Miscellaneous$as before")));
Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Initial volume"), &data.InitialVolume, -1, 255, tr("Setup.Miscellaneous$as before")));
+ Add(new cMenuEditBoolItem(tr("Setup.Miscellaneous$Emergency exit"), &data.EmergencyExit));
}
// --- cMenuSetupPluginItem --------------------------------------------------
@@ -3008,6 +3016,7 @@ bool cMenuMain::Update(bool Force)
Minutes %= 60;
//XXX -> skin function!!!
SetTitle(cString::sprintf("%s - %s %d%% - %2d:%02d %s", tr("VDR"), tr("Disk"), Percent, Hours, Minutes, tr("free")));
+ lastFreeMB = FreeMB;
result = true;
}
lastDiskSpaceCheck = time(NULL);
diff --git a/newplugin b/newplugin
index e025f74..d4d82fe 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.39 2007/11/04 10:42:52 kls Exp $
+# $Id: newplugin 1.41 2008/01/13 13:00:23 kls Exp $
$PLUGIN_NAME = $ARGV[0] || die "Usage: newplugin <name>\n";
@@ -77,7 +77,7 @@ VERSION = \$(shell grep 'static const char \\*VERSION *=' \$(PLUGIN).c | awk '{
### The C++ compiler and options:
CXX ?= g++
-CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual
+CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
### The directory environment:
@@ -149,7 +149,7 @@ I18Npot = \$(PODIR)/\$(PLUGIN).pot
cp \$< \$\@
.PHONY: i18n
-i18n: \$(I18Nmsgs)
+i18n: \$(I18Nmsgs) \$(I18Npot)
### Targets:
diff --git a/po/ca_ES.po b/po/ca_ES.po
index c874f43..fa5c847 100644
--- a/po/ca_ES.po
+++ b/po/ca_ES.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Jordi Vilà <jvila@tinet.org>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -778,6 +778,9 @@ msgstr ""
msgid "Setup.Miscellaneous$Initial volume"
msgstr ""
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "Plugins"
diff --git a/po/cs_CZ.po b/po/cs_CZ.po
index cdd5715..c3ae43c 100644
--- a/po/cs_CZ.po
+++ b/po/cs_CZ.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Vladimír Bárta <vladimir.barta@k2atmitec.cz>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -776,6 +776,9 @@ msgstr "jako naposledy"
msgid "Setup.Miscellaneous$Initial volume"
msgstr "Hlasitost po spu¹tìní"
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "Moduly"
diff --git a/po/da_DK.po b/po/da_DK.po
index b11e105..e08e7e4 100644
--- a/po/da_DK.po
+++ b/po/da_DK.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Mogens Elneff <mogens@elneff.dk>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -776,6 +776,9 @@ msgstr "som før"
msgid "Setup.Miscellaneous$Initial volume"
msgstr "Lydstyrke ved opstart"
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "Plugins"
diff --git a/po/de_DE.po b/po/de_DE.po
index 621c3fc..05f139e 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
-"PO-Revision-Date: 2007-08-12 14:17+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
+"PO-Revision-Date: 2007-11-25 15:19+0200\n"
"Last-Translator: Klaus Schmidinger <kls@cadsoft.de>\n"
"Language-Team: <vdr@linuxtv.org>\n"
"MIME-Version: 1.0\n"
@@ -776,6 +776,9 @@ msgstr "wie vorher"
msgid "Setup.Miscellaneous$Initial volume"
msgstr "Lautstärke beim Einschalten"
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr "Notausstieg"
+
msgid "Plugins"
msgstr "Plugins"
diff --git a/po/el_GR.po b/po/el_GR.po
index 1e79779..4595fb1 100644
--- a/po/el_GR.po
+++ b/po/el_GR.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Dimitrios Dimitrakos <mail@dimitrios.de>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -776,6 +776,9 @@ msgstr ""
msgid "Setup.Miscellaneous$Initial volume"
msgstr ""
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "ÅðåêôÜóåéò"
diff --git a/po/es_ES.po b/po/es_ES.po
index 39450a8..a90a74e 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Ruben Nunez Francisco <ruben.nunez@tang-it.com>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -776,6 +776,9 @@ msgstr ""
msgid "Setup.Miscellaneous$Initial volume"
msgstr ""
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "Plugins"
diff --git a/po/et_EE.po b/po/et_EE.po
index f8edfc1..d5c47cd 100644
--- a/po/et_EE.po
+++ b/po/et_EE.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Arthur Konovalov <kasjas@hot.ee>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -776,6 +776,9 @@ msgstr "nagu enne"
msgid "Setup.Miscellaneous$Initial volume"
msgstr "Helitugevus käivitamisel"
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "Laiendusmoodulid"
diff --git a/po/fi_FI.po b/po/fi_FI.po
index 6ab2638..b0de1e5 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-08-15 15:52+0200\n"
"Last-Translator: Rolf Ahrenberg <rahrenbe@cc.hut.fi>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -779,6 +779,9 @@ msgstr "edellinen"
msgid "Setup.Miscellaneous$Initial volume"
msgstr "Äänenvoimakkuus käynnistettäessä"
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "Laajennokset"
diff --git a/po/fr_FR.po b/po/fr_FR.po
index de25e80..35d35af 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -13,7 +13,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-10-18 16:12+0100\n"
"Last-Translator: Michael Nival <mnival@club-internet.fr>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -782,6 +782,9 @@ msgstr "comme avant"
msgid "Setup.Miscellaneous$Initial volume"
msgstr "Volume initial"
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "Plugins"
diff --git a/po/hr_HR.po b/po/hr_HR.po
index f0712a0..a7bf2e1 100644
--- a/po/hr_HR.po
+++ b/po/hr_HR.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Drazen Dupor <drazen.dupor@dupor.com>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -777,6 +777,9 @@ msgstr ""
msgid "Setup.Miscellaneous$Initial volume"
msgstr ""
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "Dodaci (Plugins)"
diff --git a/po/hu_HU.po b/po/hu_HU.po
index 6f8b9ad..ebd244f 100644
--- a/po/hu_HU.po
+++ b/po/hu_HU.po
@@ -4,15 +4,16 @@
# Istvan Koenigsberger <istvnko@hotmail.com>, 2002
# Guido Josten <guido.josten@t-online.de>, 2002
# Thomas Günther <tom@toms-cafe.de>, 2007
+# István Füley <ifuley@tigercomp.ro>, 2007
#
msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
-"PO-Revision-Date: 2007-10-13 14:32+0200\n"
-"Last-Translator: Thomas Günther <tom@toms-cafe.de>\n"
-"Language-Team: <vdr@linuxtv.org>\n"
+"POT-Creation-Date: 2008-01-13 14:21+0100\n"
+"PO-Revision-Date: 2007-12-01 21:42+0200\n"
+"Last-Translator: István Füley <ifuley@tigercomp.ro>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-2\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -168,7 +169,7 @@ msgid "Key$Audio"
msgstr "Hang"
msgid "Key$Subtitles"
-msgstr ""
+msgstr "Feliratok"
msgid "Key$Schedule"
msgstr "Program"
@@ -189,31 +190,31 @@ msgid "Key$Commands"
msgstr "Parancsok"
msgid "Key$User1"
-msgstr ""
+msgstr "Felhasználó1"
msgid "Key$User2"
-msgstr ""
+msgstr "Felhasználó2"
msgid "Key$User3"
-msgstr ""
+msgstr "Felhasználó3"
msgid "Key$User4"
-msgstr ""
+msgstr "Felhasználó4"
msgid "Key$User5"
-msgstr ""
+msgstr "Felhasználó5"
msgid "Key$User6"
-msgstr ""
+msgstr "Felhasználó6"
msgid "Key$User7"
-msgstr ""
+msgstr "Felhasználó7"
msgid "Key$User8"
-msgstr ""
+msgstr "Felhasználó8"
msgid "Key$User9"
-msgstr ""
+msgstr "Felhasználó9"
msgid "Free To Air"
msgstr "Kódolatlan"
@@ -255,10 +256,10 @@ msgid "Dpid2"
msgstr "Dpid2"
msgid "Spid1"
-msgstr ""
+msgstr "Spid1"
msgid "Spid2"
-msgstr ""
+msgstr "Spid2"
msgid "Tpid"
msgstr "Tpid"
@@ -291,19 +292,19 @@ msgid "CoderateL"
msgstr "CoderateL"
msgid "Modulation"
-msgstr "Modulation"
+msgstr "Moduláció"
msgid "Bandwidth"
-msgstr "Bandwidth"
+msgstr "Sávszélesség"
msgid "Transmission"
-msgstr "Transmission"
+msgstr "Átvitel"
msgid "Guard"
msgstr "Guard"
msgid "Hierarchy"
-msgstr "Hierarchy"
+msgstr "Hierarhia"
msgid "Channel settings are not unique!"
msgstr "Az adóbeállítások nem egyértelmûek"
@@ -426,7 +427,7 @@ msgid "Please enter %d digits!"
msgstr "Üssön be %d számot!"
msgid "CAM not responding!"
-msgstr ""
+msgstr "A CAM nem válaszol!"
msgid "Recording info"
msgstr "Felvétel"
@@ -498,25 +499,25 @@ msgid "Setup.OSD$Use small font"
msgstr "Kisbetût használni"
msgid "Setup.OSD$Anti-alias"
-msgstr ""
+msgstr "Anti-alias"
msgid "Setup.OSD$Default font"
-msgstr ""
+msgstr "Alapértelmezett betûtipus"
msgid "Setup.OSD$Small font"
-msgstr ""
+msgstr "Kis betûtipus"
msgid "Setup.OSD$Fixed font"
-msgstr ""
+msgstr "Kötött betûtipus"
msgid "Setup.OSD$Default font size (pixel)"
-msgstr ""
+msgstr "Alapértelmezett betûtipus méret (pixel)"
msgid "Setup.OSD$Small font size (pixel)"
-msgstr ""
+msgstr "Kis betûtipus méret (pixel)"
msgid "Setup.OSD$Fixed font size (pixel)"
-msgstr ""
+msgstr "Kötött betûtipus méret (pixel)"
msgid "Setup.OSD$Channel info position"
msgstr "Adásinformáció poziciója"
@@ -593,10 +594,10 @@ msgid "names only"
msgstr "kizárólag nevek"
msgid "PIDs only"
-msgstr "kizárólag PID-k"
+msgstr "kizárólag PIDek"
msgid "names and PIDs"
-msgstr "nevek és PID-k"
+msgstr "nevek és PIDek"
msgid "add new channels"
msgstr "új adók hozzáadása"
@@ -623,28 +624,28 @@ msgid "Setup.DVB$Update channels"
msgstr "Adók aktualizálása"
msgid "Setup.DVB$Audio languages"
-msgstr "Audio-nyelvek"
+msgstr "Audio nyelvek"
msgid "Setup.DVB$Audio language"
-msgstr "Audio-nyelv"
+msgstr "Audio nyelv"
msgid "Setup.DVB$Display subtitles"
-msgstr ""
+msgstr "Felirat látható"
msgid "Setup.DVB$Subtitle languages"
-msgstr ""
+msgstr "Felirat nyelvek"
msgid "Setup.DVB$Subtitle language"
-msgstr ""
+msgstr "Felirat nyelv"
msgid "Setup.DVB$Subtitle offset"
-msgstr ""
+msgstr "Felirat eltolása"
msgid "Setup.DVB$Subtitle foreground transparency"
-msgstr ""
+msgstr "Felirat transzparenciája"
msgid "Setup.DVB$Subtitle background transparency"
-msgstr ""
+msgstr "Felirat hátterének transzparenciája"
msgid "LNB"
msgstr "LNB"
@@ -662,13 +663,13 @@ msgid "Setup.LNB$High LNB frequency (MHz)"
msgstr "Felsõ LNB-frekvencia (MHZ)"
msgid "CAM reset"
-msgstr ""
+msgstr "CAM újraindítás"
msgid "CAM present"
-msgstr ""
+msgstr "CAM jelen"
msgid "CAM ready"
-msgstr ""
+msgstr "CAM mûködik"
msgid "CAM"
msgstr "CAM"
@@ -680,16 +681,16 @@ msgid "Button$Reset"
msgstr "Reset"
msgid "Opening CAM menu..."
-msgstr "A CAM-menü nyitás alatt..."
+msgstr "A CAM menü nyitás alatt..."
msgid "Can't open CAM menu!"
-msgstr "A CAM-Menü nem nyitható"
+msgstr "A CAM menü nem nyitható"
msgid "CAM is in use - really reset?"
-msgstr ""
+msgstr "CAM használatban - valóban újraindítjuk?"
msgid "Can't reset CAM!"
-msgstr "A CAM-Reset nem sikerült"
+msgstr "A CAM újraindítás nem sikerült"
msgid "Recording"
msgstr "Felvétel"
@@ -704,10 +705,10 @@ msgid "Setup.Recording$Primary limit"
msgstr "Primér-határ"
msgid "Setup.Recording$Default priority"
-msgstr "Default priority"
+msgstr "Alapértelmezett prioritás"
msgid "Setup.Recording$Default lifetime (d)"
-msgstr "Default élettartam"
+msgstr "Alapértelmezett élettartam"
msgid "Setup.Recording$Pause priority"
msgstr "Szünet prioritás"
@@ -767,7 +768,7 @@ msgid "Setup.Miscellaneous$Zap timeout (s)"
msgstr "Adásváltás ideje (s)"
msgid "Setup.Miscellaneous$Channel entry timeout (ms)"
-msgstr ""
+msgstr "Csatornaváltás timeout (ms)"
msgid "Setup.Miscellaneous$Initial channel"
msgstr "Adás a bekapcsolásnál"
@@ -778,6 +779,10 @@ msgstr "ahogy az elõbb"
msgid "Setup.Miscellaneous$Initial volume"
msgstr "Hangerõ a bekapcsolásnál"
+#, fuzzy
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr "ahogy az elõbb"
+
msgid "Plugins"
msgstr "Plugins"
@@ -839,13 +844,13 @@ msgid "No audio available!"
msgstr "Hang nem lehetséges!"
msgid "No subtitles"
-msgstr ""
+msgstr "Felirat ki"
msgid "Button$Subtitles"
-msgstr ""
+msgstr "Feliratok"
msgid "No subtitles available!"
-msgstr ""
+msgstr "A csatornán nincs felirat!"
msgid "Not enough disk space to start recording!"
msgstr "Nincs elegendõ hely a felvételre"
@@ -870,7 +875,7 @@ msgid "Editing process started"
msgstr "Vágás elindítva"
msgid "Editing process already active!"
-msgstr "A vágás már aktivált!"
+msgstr "A vágás már aktív!"
msgid "FileNameChars$ abcdefghijklmnopqrstuvwxyz0123456789-.,#~\\^$[]|()*+?{}/:%@&"
msgstr " aábcdeéfghiíjklmnoóöõpqrstuúüûvwxyz0123456789-.,#~\\^$[]|()*+?{}/:%@&"
@@ -906,7 +911,7 @@ msgid "Can't shutdown - option '-s' not given!"
msgstr "A leállítás nem lehetséges - Opció '-s' hiányzik!"
msgid "Editing - shut down anyway?"
-msgstr ""
+msgstr "Szerkesztés folyamatban - valóban leállítjuk?"
msgid "Recording - shut down anyway?"
msgstr "Felvétel folyamatban van - mégis kikapcsolni?"
@@ -920,10 +925,10 @@ msgstr "mégis kikapcsolni?"
#, c-format
msgid "Plugin %s wakes up in %ld min, continue?"
-msgstr ""
+msgstr "A(z) %s plugin ébreszt %ld perc múlva, folytatjuk?"
msgid "Editing - restart anyway?"
-msgstr ""
+msgstr "Szerkesztés folyamatban - valóban újraindítjuk?"
msgid "Recording - restart anyway?"
msgstr "Felvétel folyamatban van - mégis újraindítani?"
@@ -977,10 +982,10 @@ msgid "Recording started"
msgstr "A felvétel elindítva"
msgid "VDR will shut down later - press Power to force"
-msgstr ""
+msgstr "A VDR késõbb fog leállni - Kikapcs gombbal kényszerített leállítás"
msgid "Press any key to cancel shutdown"
-msgstr "Nyomj egy gombot a leállás megállításához"
+msgstr "Nyomj egy gombot a leállás megszakításához"
msgid "Switching primary DVB..."
msgstr "Primér Interface átkapcsolva..."
@@ -992,8 +997,8 @@ msgid "Editing process finished"
msgstr "Vágás befejezve"
msgid "Press any key to cancel restart"
-msgstr ""
+msgstr "Nyomj egy gombot az újraindítás megszakításához"
#, c-format
msgid "VDR will shut down in %s minutes"
-msgstr ""
+msgstr "A VDR leáll %s perc múlva"
diff --git a/po/it_IT.po b/po/it_IT.po
index 18eced8..2f88680 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-10-16 02:15+0100\n"
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -779,6 +779,9 @@ msgstr "come prima"
msgid "Setup.Miscellaneous$Initial volume"
msgstr "Volume iniziale"
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "Plugins"
diff --git a/po/nl_NL.po b/po/nl_NL.po
index c8a9b36..e945bef 100644
--- a/po/nl_NL.po
+++ b/po/nl_NL.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Maarten Wisse <Maarten.Wisse@urz.uni-hd.de>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -778,6 +778,9 @@ msgstr ""
msgid "Setup.Miscellaneous$Initial volume"
msgstr ""
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "Plugins"
diff --git a/po/nn_NO.po b/po/nn_NO.po
index 8063992..bd2238e 100644
--- a/po/nn_NO.po
+++ b/po/nn_NO.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Truls Slevigen <truls@slevigen.no>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -777,6 +777,9 @@ msgstr ""
msgid "Setup.Miscellaneous$Initial volume"
msgstr ""
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "Plugins"
diff --git a/po/pl_PL.po b/po/pl_PL.po
index 9663840..d8be877 100644
--- a/po/pl_PL.po
+++ b/po/pl_PL.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Michael Rakowski <mrak@gmx.de>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -776,6 +776,9 @@ msgstr "jak ostatnio"
msgid "Setup.Miscellaneous$Initial volume"
msgstr "Pocz±tkowa g³o¶no¶æ"
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "Wtyczki"
diff --git a/po/pt_PT.po b/po/pt_PT.po
index 8439538..1786077 100644
--- a/po/pt_PT.po
+++ b/po/pt_PT.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Paulo Lopes <pmml@netvita.pt>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -776,6 +776,9 @@ msgstr ""
msgid "Setup.Miscellaneous$Initial volume"
msgstr ""
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "Plugins"
diff --git a/po/ro_RO.po b/po/ro_RO.po
index 52b3452..72fc8b9 100644
--- a/po/ro_RO.po
+++ b/po/ro_RO.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Lucian Muresan <lucianm@users.sourceforge.net>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -777,6 +777,9 @@ msgstr "ca mai înainte"
msgid "Setup.Miscellaneous$Initial volume"
msgstr "Volumul la pornire"
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "Plugin-uri"
diff --git a/po/ru_RU.po b/po/ru_RU.po
index 6e4f41a..6f6038e 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-11-05 14:24+0100\n"
"Last-Translator: Oleg Roitburd <oleg@roitburd.de>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -777,6 +777,9 @@ msgstr "ÚÐÚ àÐÝìèÕ"
msgid "Setup.Miscellaneous$Initial volume"
msgstr "³àÞÜÚÞáâì ßàØ ÒÚÛîçÕÝØØ"
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "¼ÞÔãÛØ àÐáèØàÕÝØï"
diff --git a/po/sl_SI.po b/po/sl_SI.po
index da1de4d..002b82c 100644
--- a/po/sl_SI.po
+++ b/po/sl_SI.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Matjaz Thaler <matjaz.thaler@guest.arnes.si>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -777,6 +777,9 @@ msgstr "kot prej"
msgid "Setup.Miscellaneous$Initial volume"
msgstr "Privzeta glasnost"
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "Vstavki"
diff --git a/po/sv_SE.po b/po/sv_SE.po
index cde4ca7..40d3c25 100644
--- a/po/sv_SE.po
+++ b/po/sv_SE.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Tomas Prybil <tomas@prybil.se>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -777,6 +777,9 @@ msgstr "som förut"
msgid "Setup.Miscellaneous$Initial volume"
msgstr "Ljudstyrka vid uppstart"
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "Moduler"
diff --git a/po/tr_TR.po b/po/tr_TR.po
index 461a322..57a7309 100644
--- a/po/tr_TR.po
+++ b/po/tr_TR.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.7\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-08-24 14:37+0200\n"
"Last-Translator: Oktay Yolgeçen <oktay_73@yahoo.de>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -776,6 +776,9 @@ msgstr "önceki gibi"
msgid "Setup.Miscellaneous$Initial volume"
msgstr "Açýlýþdaki ses"
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "Eklentiler"
diff --git a/po/uk_UA.po b/po/uk_UA.po
index fdddc90..70afcaf 100644
--- a/po/uk_UA.po
+++ b/po/uk_UA.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR 1.5.10\n"
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
-"POT-Creation-Date: 2007-11-01 11:36+0100\n"
+"POT-Creation-Date: 2007-11-25 14:59+0100\n"
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
"Last-Translator: Yarema Aka Knedlyk <yupadmin@gmail.com>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -776,6 +776,9 @@ msgstr "ïÚ àÐÝöèÕ"
msgid "Setup.Miscellaneous$Initial volume"
msgstr "³ãçÝöáâì ßàØ ÒÚÛîçÕÝÝö"
+msgid "Setup.Miscellaneous$Emergency exit"
+msgstr ""
+
msgid "Plugins"
msgstr "¼ÞÔãÛö àÞ×èØàÕÝÝï"
diff --git a/remux.c b/remux.c
index e265c40..9b9aa24 100644
--- a/remux.c
+++ b/remux.c
@@ -11,7 +11,7 @@
* The cRepacker family's code was originally written by Reinhard Nissl <rnissl@gmx.de>,
* and adapted to the VDR coding style by Klaus.Schmidinger@cadsoft.de.
*
- * $Id: remux.c 1.63 2007/11/18 14:45:28 kls Exp $
+ * $Id: remux.c 1.64 2007/11/25 13:56:03 kls Exp $
*/
#include "remux.h"
@@ -2099,8 +2099,10 @@ uchar *cRemux::Get(int &Count, uchar *PictureType)
if (pt != NO_PICTURE) {
if (pt < I_FRAME || B_FRAME < pt) {
esyslog("ERROR: unknown picture type '%d'", pt);
- if (++numUPTerrors > MAXNUMUPTERRORS && exitOnFailure)
+ if (++numUPTerrors > MAXNUMUPTERRORS && exitOnFailure) {
ShutdownHandler.RequestEmergencyExit();
+ numUPTerrors = 0;
+ }
}
else if (!synced) {
if (pt == I_FRAME) {
diff --git a/shutdown.c b/shutdown.c
index 4fde544..ea137ed 100644
--- a/shutdown.c
+++ b/shutdown.c
@@ -6,7 +6,7 @@
*
* Original version written by Udo Richter <udo_richter@gmx.de>.
*
- * $Id: shutdown.c 1.2 2007/10/19 14:33:40 kls Exp $
+ * $Id: shutdown.c 1.4 2008/01/13 14:27:29 kls Exp $
*/
#include "shutdown.h"
@@ -95,9 +95,13 @@ cShutdownHandler::~cShutdownHandler()
void cShutdownHandler::RequestEmergencyExit(void)
{
- esyslog("initiating emergency exit");
- emergencyExitRequested = true;
- Exit(1);
+ if (Setup.EmergencyExit) {
+ esyslog("initiating emergency exit");
+ emergencyExitRequested = true;
+ Exit(1);
+ }
+ else
+ dsyslog("emergency exit request ignored according to setup");
}
void cShutdownHandler::CheckManualStart(int ManualStart)
@@ -150,6 +154,9 @@ void cShutdownHandler::SetUserInactiveTimeout(int Seconds, bool Force)
bool cShutdownHandler::ConfirmShutdown(bool Interactive)
{
+ if (!Interactive && !cRemote::Enabled())
+ return false;
+
if (!shutdownCommand) {
if (Interactive)
Skins.Message(mtError, tr("Can't shutdown - option '-s' not given!"));
diff --git a/skinclassic.c b/skinclassic.c
index 144d072..11b5ce4 100644
--- a/skinclassic.c
+++ b/skinclassic.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: skinclassic.c 1.18 2007/07/29 12:35:03 kls Exp $
+ * $Id: skinclassic.c 1.19 2008/01/13 12:38:00 kls Exp $
*/
#include "skinclassic.h"
@@ -162,6 +162,7 @@ private:
int x0, x1;
int y0, y1, y2, y3, y4, y5;
int lineHeight;
+ int dateWidth;
cString lastDate;
void SetScrollbar(void);
public:
@@ -186,6 +187,7 @@ cSkinClassicDisplayMenu::cSkinClassicDisplayMenu(void)
{
const cFont *font = cFont::GetFont(fontOsd);
lineHeight = font->Height();
+ dateWidth = 0;
x0 = 0;
x1 = cOsd::OsdWidth();
y0 = 0;
@@ -253,7 +255,7 @@ void cSkinClassicDisplayMenu::Clear(void)
void cSkinClassicDisplayMenu::SetTitle(const char *Title)
{
const cFont *font = cFont::GetFont(fontOsd);
- osd->DrawText(x0, y0, Title, Theme.Color(clrMenuTitleFg), Theme.Color(clrMenuTitleBg), font, x1 - x0);
+ osd->DrawText(x0, y0, Title, Theme.Color(clrMenuTitleFg), Theme.Color(clrMenuTitleBg), font, x1 - x0 - dateWidth);
}
void cSkinClassicDisplayMenu::SetButtons(const char *Red, const char *Green, const char *Yellow, const char *Blue)
@@ -395,6 +397,7 @@ void cSkinClassicDisplayMenu::Flush(void)
int w = font->Width(date);
osd->DrawText(x1 - w - 2, y0, date, Theme.Color(clrMenuDate), Theme.Color(clrMenuTitleBg), font, w);
lastDate = date;
+ dateWidth = max(w + 2, dateWidth);
}
osd->Flush();
}
diff --git a/svdrp.c b/svdrp.c
index c8cd5be..2ac3a4b 100644
--- a/svdrp.c
+++ b/svdrp.c
@@ -10,7 +10,7 @@
* and interact with the Video Disk Recorder - or write a full featured
* graphical interface that sits on top of an SVDRP connection.
*
- * $Id: svdrp.c 1.104 2007/10/13 10:17:48 kls Exp $
+ * $Id: svdrp.c 1.105 2008/01/13 15:06:25 kls Exp $
*/
#include "svdrp.h"
@@ -185,8 +185,9 @@ const char *HelpPages[] = {
" Switch channel up, down or to the given channel number, name or id.\n"
" Without option (or after successfully switching to the channel)\n"
" it returns the current channel number and name.",
- "CLRE\n"
- " Clear the entire EPG list.",
+ "CLRE [ <number> | <name> | <id> ]\n"
+ " Clear the EPG list of the given channel number, name or id.\n"
+ " Without option it clears the entire EPG list.",
"DELC <number>\n"
" Delete channel.",
"DELR <number>\n"
@@ -538,8 +539,57 @@ void cSVDRP::CmdCHAN(const char *Option)
void cSVDRP::CmdCLRE(const char *Option)
{
- cSchedules::ClearAll();
- Reply(250, "EPG data cleared");
+ if (*Option) {
+ tChannelID ChannelID = tChannelID::InvalidID;
+ if (isnumber(Option)) {
+ int o = strtol(Option, NULL, 10);
+ if (o >= 1 && o <= Channels.MaxNumber())
+ ChannelID = Channels.GetByNumber(o)->GetChannelID();
+ }
+ else {
+ ChannelID = tChannelID::FromString(Option);
+ if (ChannelID == tChannelID::InvalidID) {
+ for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) {
+ if (!Channel->GroupSep()) {
+ if (strcasecmp(Channel->Name(), Option) == 0) {
+ ChannelID = Channel->GetChannelID();
+ break;
+ }
+ }
+ }
+ }
+ }
+ if (!(ChannelID == tChannelID::InvalidID)) {
+ cSchedulesLock SchedulesLock(true, 1000);
+ cSchedules *s = (cSchedules *)cSchedules::Schedules(SchedulesLock);
+ if (s) {
+ cSchedule *Schedule = NULL;
+ ChannelID.ClrRid();
+ for (cSchedule *p = s->First(); p; p = s->Next(p)) {
+ if (p->ChannelID() == ChannelID) {
+ Schedule = p;
+ break;
+ }
+ }
+ if (Schedule) {
+ Schedule->Cleanup(INT_MAX);
+ Reply(250, "EPG data of channel \"%s\" cleared", Option);
+ }
+ else {
+ Reply(550, "No EPG data found for channel \"%s\"", Option);
+ return;
+ }
+ }
+ else
+ Reply(451, "Can't get EPG data");
+ }
+ else
+ Reply(501, "Undefined channel \"%s\"", Option);
+ }
+ else {
+ cSchedules::ClearAll();
+ Reply(250, "EPG data cleared");
+ }
}
void cSVDRP::CmdDELC(const char *Option)
diff --git a/tools.c b/tools.c
index ba7b0cf..98d2501 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 1.137 2007/11/03 15:34:07 kls Exp $
+ * $Id: tools.c 1.140 2008/01/13 11:26:30 kls Exp $
*/
#include "tools.h"
@@ -545,6 +545,41 @@ cTimeMs::cTimeMs(int Ms)
uint64_t cTimeMs::Now(void)
{
+#if _POSIX_TIMERS > 0 && defined(_POSIX_MONOTONIC_CLOCK)
+#define MIN_RESOLUTION 5 // ms
+ static bool initialized = false;
+ static bool monotonic = false;
+ struct timespec tp;
+ if (!initialized) {
+ // check if monotonic timer is available and provides enough accurate resolution:
+ if (clock_getres(CLOCK_MONOTONIC, &tp) == 0) {
+ long Resolution = tp.tv_nsec;
+ // require a minimum resolution:
+ if (tp.tv_sec == 0 && tp.tv_nsec <= MIN_RESOLUTION * 1000000) {
+ if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) {
+ dsyslog("cTimeMs: using monotonic clock (resolution is %ld ns)", Resolution);
+ monotonic = true;
+ }
+ else
+ esyslog("cTimeMs: clock_gettime(CLOCK_MONOTONIC) failed");
+ }
+ else
+ dsyslog("cTimeMs: not using monotonic clock - resolution is too bad (%ld s %ld ns)", tp.tv_sec, tp.tv_nsec);
+ }
+ else
+ esyslog("cTimeMs: clock_getres(CLOCK_MONOTONIC) failed");
+ initialized = true;
+ }
+ if (monotonic) {
+ if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
+ return (uint64_t(tp.tv_sec)) * 1000 + tp.tv_nsec / 1000000;
+ esyslog("cTimeMs: clock_gettime(CLOCK_MONOTONIC) failed");
+ monotonic = false;
+ // fall back to gettimeofday()
+ }
+#else
+# warning Posix monotonic clock not available
+#endif
struct timeval t;
if (gettimeofday(&t, NULL) == 0)
return (uint64_t(t.tv_sec)) * 1000 + t.tv_usec / 1000;
@@ -838,6 +873,16 @@ cString &cString::operator=(const cString &String)
return *this;
}
+cString &cString::Truncate(int Index)
+{
+ int l = strlen(s);
+ if (Index < 0)
+ Index = l + Index;
+ if (Index >= 0 && Index < l)
+ s[Index] = 0;
+ return *this;
+}
+
cString cString::sprintf(const char *fmt, ...)
{
va_list ap;
@@ -1174,6 +1219,7 @@ void cStringList::Clear(void)
{
for (int i = 0; i < Size(); i++)
free(At(i));
+ cVector<char *>::Clear();
}
// --- cFileNameList ---------------------------------------------------------
diff --git a/tools.h b/tools.h
index 28dbd5e..3c804b5 100644
--- a/tools.h
+++ b/tools.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.h 1.108 2007/08/25 14:16:39 kls Exp $
+ * $Id: tools.h 1.110 2008/01/13 11:22:26 kls Exp $
*/
#ifndef __TOOLS_H
@@ -159,6 +159,7 @@ public:
operator const char * () const { return s; } // for use in (const char *) context
const char * operator*() const { return s; } // for use in (const void *) context (printf() etc.)
cString &operator=(const cString &String);
+ cString &Truncate(int Index); ///< Truncate the string at the given Index (if Index is < 0 it is counted from the end of the string).
static cString sprintf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
};
@@ -470,7 +471,10 @@ public:
memmove(&data[Index], &data[Index + 1], (size - Index) * sizeof(T));
size--;
}
- virtual void Clear(void) {}
+ virtual void Clear(void)
+ {
+ size = 0;
+ }
void Sort(__compar_fn_t Compare)
{
qsort(data, size, sizeof(T), Compare);
diff --git a/vdr.c b/vdr.c
index a4e6e1f..05b9e48 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
- * $Id: vdr.c 1.302 2007/11/03 14:46:29 kls Exp $
+ * $Id: vdr.c 1.305 2008/01/13 11:51:53 kls Exp $
*/
#include <getopt.h>
@@ -304,7 +304,7 @@ int main(int argc, char *argv[])
}
break;
case 'l' | 0x100:
- LircDevice = optarg ? : LIRC_DEVICE;
+ LircDevice = optarg ? optarg : LIRC_DEVICE;
break;
case 'm': MuteAudio = true;
break;
@@ -345,7 +345,8 @@ int main(int argc, char *argv[])
while (optarg && *optarg && optarg[strlen(optarg) - 1] == '/')
optarg[strlen(optarg) - 1] = 0;
break;
- case 'w': if (isnumber(optarg)) { int t = atoi(optarg);
+ case 'w': if (isnumber(optarg)) {
+ int t = atoi(optarg);
if (t >= 0) {
WatchdogTimeout = t;
break;
@@ -914,9 +915,11 @@ int main(int argc, char *argv[])
break;
// Info:
case kInfo: {
- bool WasInfoMenu = IsInfoMenu;
- DELETE_MENU;
- if (!WasInfoMenu) {
+ if (IsInfoMenu) {
+ key = kNone; // nobody else needs to see this key
+ DELETE_MENU;
+ }
+ else if (!Menu) {
IsInfoMenu = true;
if (cControl::Control()) {
cControl::Control()->Hide();
@@ -930,6 +933,7 @@ int main(int argc, char *argv[])
cRemote::Put(kOk, true);
cRemote::Put(kSchedule, true);
}
+ key = kNone; // nobody else needs to see this key
}
}
break;