[vdr] [RFC] Shutdown rewrite for 1.5.x

Marko Mäkelä marko.makela at hut.fi
Tue Jan 30 18:28:34 CET 2007


On Sun, Jan 28, 2007 at 05:50:46PM +0100, Udo Richter wrote:
> Hi list,
> 
> I've finished a third version of the shutdown rewrite. Again there are 
> two patches available, one for VDR 1.5.0, and one with slight changes 
> for 1.4.x.
> 
> http://www.udo-richter.de/vdr/patches.html#shutdown
> http://www.udo-richter.de/vdr/patches.en.html#shutdown
> 
> 
> - Shutdown command called with /dev/null as stdin

Thank you, this fixes the bug that I reported.

> - Added #define PATCH_SHUTDOWN_REWRITE to detect the patch
>   Use #if VDRVERSNUM >= 105xx || defined(PATCH_SHUTDOWN_REWRITE) after
>   final integration into VDR.

Thank you.  I adapted my patches to the subtitles and softdevice plugins
and made them available at
<http://www.iki.fi/~msmakela/software/vdr/#shutdown>.

I have two more feature requests.

First, and more important: Can you please suspend the playback of
recordings when Shutdown.IsUserInactive() holds?  Here is the relevant
hunk from my vdr-suspend patch:

diff -pu vdr-1.4.0/dvbplayer.c vdr-1.4.0-suspend/dvbplayer.c
--- vdr-1.4.0/dvbplayer.c	2006-04-17 15:45:48.000000000 +0300
+++ vdr-1.4.0-suspend/dvbplayer.c	2006-05-01 21:42:34.000000000
+0300
@@ -393,7 +393,7 @@ void cDvbPlayer::Action(void)
 
            // Read the next frame from the file:
 
-           if (playMode != pmStill && playMode != pmPause) {
+           if (!Setup.Suspend && playMode != pmStill && playMode !=
pmPause) {
               if (!readFrame && (replayFile || readIndex >= 0)) {
                  if (!nonBlockingFileReader->Reading()) {
                     if (playMode == pmFast || (playMode == pmSlow &&
playDir == pdBackward)) {

Without this fix and with my patched softdevice plugin, if
Shutdown.IsUserInactive() starts to hold while playing back a recording,
VDR will fast-forward to the end of the recording (supplying data to
softdevice as fast as it can read from the file system).  This problem
exists also with the suspend function of the softdevice plugin.
Alternatively, could you suggest how to fix this in softdevice?

Second request: Consider modifying cDevice::Action() so that
non-recording tuners will not be read during user inactivity.
The kernel would then be able to turn off unnecessary tuners.
Actually, it'd be nice to turn off any unneeded tuners, also
during interactive use (multi-tuner setups, or watching recordings).

During the time when playback is suspended, cDevice::Action() will read
live stream from the tuner and supply it only to cRecording threads. It
would be better to turn off the tuner completely if no recordings are in
progress.

> - i18n strings:

Here are my suggested Finnish translations, and some comments and questions.

>   "VDR will shut down later. Press power to force."

"VDR sammuu myöhemmin. Pakota painamalla virtanappia."

>   "VDR will shut down in %s minutes"

"VDR sammuu %s minuutin kuluttua."

Why %s instead of a numeric format such as %ld?

>   "Replaying - shut down anyway?"

"Sammutetaanko kesken toiston?"

For some reason, vdr won't ask this every time when playing back a
recording.

>   "Cutting - shut down anyway?"

"Sammutetaanko kesken leikkauksen?"

If this is not confirmed, will it shut down after finishing the cutting,
like it worked before your patch?

>   "Plugin activity in %ld minutes, shut down anyway?"

"Liitännäinen toimii %ld minuutin päästä, sammutetaanko?"

Better: "Plugin %s activity" ("liitännäinen %s")
where %s is the name of the first plugin to run.

Best regards,

	Marko



More information about the vdr mailing list