[RFC] Shutdown rewrite for 1.5.x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 10, 2007 at 02:28:24PM +0100, Udo Richter wrote:
> Hi list,
> 
> I've finished a second version of the shutdown rewrite. This time, 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

I had a short look at this patch:
http://www.udo-richter.de/vdr/files/vdr-1.4.5-shutdown-rewrite-0.2.diff

A minor cosmetic thing: the '#' of pre-processor directives should always
be located at the first column of the line.  You can add spaces after
the '#' if you want to indent the directives.  This is probably not a
problem, if VDR is only compiled with GCC.  At least the compiler on
SGI IRIX (r.i.p.) would choke on such code.

A more important suggestion: Could you please add a notification method
to status.h for notifying plugins whether VDR is currently in
interactive mode?  This would be useful for at least these three
plugins: softdevice, subtitles, and relay (my own plugin for controlling
a solid-state relay that powers the display on or off).  Here are the
relevant chunks from my suspend patch
<http://www.iki.fi/~msmakela/software/vdr/#suspend>, which is to my
knowledge included in some VDR distributions:

diff -pu vdr-1.4.0/status.h vdr-1.4.0-suspend/status.h
--- vdr-1.4.0/status.h	2005-12-31 17:15:25.000000000 +0200
+++ vdr-1.4.0-suspend/status.h	2006-05-01 21:42:34.000000000 +0300
@@ -44,6 +44,9 @@ protected:
   virtual void SetAudioChannel(int AudioChannel) {}
                // The audio channel has been set to the given value.
                // 0=stereo, 1=left, 2=right, -1=no information
                // available.
+  virtual void SetSuspend(bool Suspend) {}
+               // Suspend or resume audio/video playback.
+               // true=suspend, false=resume.
   virtual void OsdClear(void) {}
                // The OSD has been cleared.
   virtual void OsdTitle(const char *Title) {}
@@ -77,6 +80,7 @@ public:
   static void MsgSetVolume(int Volume, bool Absolute);
   static void MsgSetAudioTrack(int Index, const char * const *Tracks);
   static void MsgSetAudioChannel(int AudioChannel);
+  static void MsgSetSuspend(bool Suspend);
   static void MsgOsdClear(void);
   static void MsgOsdTitle(const char *Title);
   static void MsgOsdStatusMessage(const char *Message);

I'd suggest a method SetInteractive(bool Interactive).  When VDR is
in non-interactive mode, the display would be powered off and the
software decoding of video would be suspended.  For full-featured
cards, the suspendoutput plugin could perhaps be adapted:
http://users.tkk.fi/~phintuka/vdr/vdr-suspendoutput/

If you implemented the method, it would make my vdr-suspend patch
unnecessary.  I could then try your patch and adapt the three
plugins I use (relay, softdevice, and subtitles, in that order).

	Marko


[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux