From patchwork Sat Jan 13 20:28:23 2007 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TWFya28gTcOka2Vsw6Q=?= X-Patchwork-Id: 12427 Received: from emh06.mail.saunalahti.fi ([62.142.5.116]) by www.linuxtv.org with esmtp (Exim 4.50) id 1H5pV8-0001dU-6V for vdr@linuxtv.org; Sat, 13 Jan 2007 21:29:18 +0100 Received: from localhost (a88-115-100-59.elisa-laajakaista.fi [88.115.100.59]) by emh06.mail.saunalahti.fi (Postfix) with ESMTP id 1C2E4E53B9 for ; Sat, 13 Jan 2007 22:28:24 +0200 (EET) Date: Sat, 13 Jan 2007 22:28:23 +0200 From: Marko =?iso-8859-1?B?TeRrZWzk?= To: VDR Mailing List Subject: Re: [vdr] [RFC] Shutdown rewrite for 1.5.x Message-ID: <20070113202823.GB3730@localhost.localdomain> References: <45947EFD.6000206@gmx.de> <45A4E9F8.5070704@gmx.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <45A4E9F8.5070704@gmx.de> User-Agent: Mutt/1.5.13 (2006-08-11) X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jan 2007 20:29:18 -0000 Status: O X-Status: X-Keywords: X-UID: 11661 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 , which is to my knowledge included in some VDR distributions: 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 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.