mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	VDR developer version 1.7.39 is now available at
       ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.39.tar.bz2
A 'diff' against the previous version is available at
       ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.38-1.7.39.diff
MD5 checksums:
3f0681f4aa6bd8deffc8208c40d34d2d  vdr-1.7.39.tar.bz2
1c13a683694c6c3c52444c1689477876  vdr-1.7.38-1.7.39.diff
WARNING:
========
This is a developer version. Even though I use it in my productive
environment. I strongly recommend that you only use it under controlled
conditions and for testing and debugging.
Approaching version 2.0.0:
==========================
If all goes well, there will be just one more developer version after
this one, and then it's going to be version 2.0.0.
From the HISTORY file:
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
- Updated the Polish OSD texts (thanks to Marek Nazarko).
- Modified handling user inactivity in the shutdown handler to avoid a problem in case
  the system time is changed after VDR has been started (thanks to Udo Richter, reported
  by Sören Moch).
- Updated the Czech OSD texts (thanks to Ales Jurik).
- Changed the template for PLGCFG to $(CONFDIR)/plugins.mk (thanks to Ville Skyttä).
- Updated the Swedish OSD texts (thanks to Richard Lithvall).
- Now clearing device bondings for devices that don't provide DVB-S in the Setup/LNB
  menu (reported by Juergen Lock).
- Fixed a possible deadlock in handling the tuners of bonded devices (thanks to
  Juergen Lock).
- Improved working around the broken driver values for SNR in case of a "TT-budget
  S2-3200" receiving DVB-S2.
- The demos in the "osddemo" plugin can now also be ended with the "Back" key.
- Fixed flashing OSD in "high level OSD" mode of the TT S2-6400 in case a menu is open
  while subtitles are being displayed.
- Fixed stuttering or asynchronous audio after changing the audio track. This is done
  by doing a "jump" to the current position, which clears all buffers. However, this
  only works with TS recordings. With PES recordings it causes a segfault - haven't
  been able to figure out why.
- Added a manual page for 'svdrpsend' (thanks to Tobias Grimm).
- Fixed immediately disappearing subtitle track menu in "high level OSD" mode of the
  TT S2-6400 when selecting "No subtitles".
- Updated the French OSD texts (thanks to Bernard Jaulin).
- Updated the Dutch OSD texts (thanks to Carel Willemse).
- Removed all "fuzzy" translations from the files ar.po, hu_HU.po and sr_SR.po, because
  more often than not they are just wrong.
- Now calling DeviceClear() in cTransfer::Receive() if the output device blocks, instead
  of not retrying for 10 seconds (reported by Andreas Mair, with help from Oliver Endriss).
- Updated the Spanish OSD texts (thanks to Luca Olivetti).
- Updated the Hungarian language texts (thanks to István Füley).
- Changed the calls to Skins.QueueMessage() in vdr.c that are related to reporting the
  status of the editing process back to Skins.Message() in order to have them appear
  immediately.
- When sorting recordings by name, folders are now always at the top of the list.
- Updated the Russian OSD texts (thanks to Oleg Roitburd).
		
	
		
			
				
	
	
		
			116 lines
		
	
	
		
			5.2 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			116 lines
		
	
	
		
			5.2 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
/*
 | 
						|
 * shutdown.h: Handling of shutdown and inactivity
 | 
						|
 *
 | 
						|
 * See the main source file 'vdr.c' for copyright information and
 | 
						|
 * how to reach the author.
 | 
						|
 *
 | 
						|
 * Original version written by Udo Richter <udo_richter@gmx.de>.
 | 
						|
 *
 | 
						|
 * $Id: shutdown.h 2.1 2013/02/18 10:35:27 kls Exp $
 | 
						|
 */
 | 
						|
 | 
						|
#ifndef __SHUTDOWN_H
 | 
						|
#define __SHUTDOWN_H
 | 
						|
 | 
						|
#include <time.h>
 | 
						|
 | 
						|
class cCountdown {
 | 
						|
private:
 | 
						|
  time_t timeout;      ///< 5-minute countdown timer
 | 
						|
  int counter;         ///< last shown time in 10s units
 | 
						|
  bool timedOut;       ///< countdown did run down to 0 and was not canceled
 | 
						|
  const char *message; ///< message to display, %s is placeholder for time
 | 
						|
public:
 | 
						|
  cCountdown(void);
 | 
						|
  void Start(const char *Message, int Seconds);
 | 
						|
       ///< Start the 5 minute shutdown warning countdown.
 | 
						|
  void Cancel(void);
 | 
						|
       ///< Cancel the 5 minute shutdown warning countdown.
 | 
						|
  bool Done(void);
 | 
						|
       ///< Check if countdown timer has run out without canceling.
 | 
						|
  operator bool(void) const { return timeout != 0; }
 | 
						|
       ///< Check if countdown is running.
 | 
						|
  bool Update(void);
 | 
						|
       ///< Update status display of the countdown.
 | 
						|
       ///< Returns true on actual update.
 | 
						|
  };
 | 
						|
 | 
						|
class cShutdownHandler {
 | 
						|
private:
 | 
						|
  time_t activeTimeout;
 | 
						|
       ///< Time when VDR will become non-interactive. 0 means never, 1 means unknown time ago.
 | 
						|
  time_t retry;
 | 
						|
       ///< Time for retrying the shutdown.
 | 
						|
  char *shutdownCommand;
 | 
						|
       ///< Command for shutting down VDR.
 | 
						|
  int exitCode;
 | 
						|
       ///< Exit code, if VDR exit was requested, or -1 if not requested.
 | 
						|
  bool emergencyExitRequested;
 | 
						|
       ///< The requested exit is an emergency exit.
 | 
						|
public:
 | 
						|
  cCountdown countdown;
 | 
						|
  cShutdownHandler(void);
 | 
						|
  ~cShutdownHandler();
 | 
						|
  void Exit(int ExitCode) { exitCode = ExitCode; }
 | 
						|
       ///< Set VDR exit code and initiate end of VDR main loop.
 | 
						|
       ///< This will exit VDR without any confirmation.
 | 
						|
  bool DoExit(void) { return exitCode >= 0; }
 | 
						|
       ///< Check if an exit code was set, and VDR should exit.
 | 
						|
  int GetExitCode(void) { return exitCode >= 0 ? exitCode : 0; }
 | 
						|
       ///< Get the currently set exit code of VDR.
 | 
						|
  bool EmergencyExitRequested(void) { return emergencyExitRequested; }
 | 
						|
       ///< Returns true if an emergency exit was requested.
 | 
						|
  void RequestEmergencyExit(void);
 | 
						|
       ///< Requests an emergency exit of the VDR main loop.
 | 
						|
  void CheckManualStart(int ManualStart);
 | 
						|
       ///< Check whether the next timer is in ManualStart time window.
 | 
						|
       ///< If yes, assume non-interactive use.
 | 
						|
  void SetShutdownCommand(const char *ShutdownCommand);
 | 
						|
       ///< Set the command string for shutdown command.
 | 
						|
  void CallShutdownCommand(time_t WakeupTime, int Channel, const char *File, bool UserShutdown);
 | 
						|
       ///< Call the shutdown command with the given parameters.
 | 
						|
  bool IsUserInactive(time_t AtTime = 0) { return activeTimeout && activeTimeout <= (AtTime ? AtTime : time(NULL)); }
 | 
						|
       ///< Check whether VDR is in interactive mode or non-interactive mode (waiting for shutdown).
 | 
						|
       ///< AtTime checks whether VDR will probably be inactive at that time.
 | 
						|
  time_t GetUserInactiveTime(void) { return activeTimeout; }
 | 
						|
       ///< Time when user will become non-inactive, or 0 if never, 1 if a long time ago
 | 
						|
  void SetUserInactiveTimeout(int Seconds = -1, bool Force = false);
 | 
						|
       ///< Set the time in the future when VDR will switch into non-interactive mode or power down.
 | 
						|
       ///< Seconds >= 0 means that many seconds in the future.
 | 
						|
       ///< Seconds = -1 means Setup.MinUserInactivity in the future.
 | 
						|
       ///< Seconds = -2 means never.
 | 
						|
       ///< Seconds = -3 means a long, unknown time ago.
 | 
						|
       ///< Setup.MinUserInactivity = 0 will overrule this, unless Force = true is given.
 | 
						|
       ///< If Setup.MinUserInactivity = 0 and Force = false, Seconds is ignored and VDR will
 | 
						|
       ///< stay interactive forever (like Seconds = -2).
 | 
						|
  void SetUserInactive(void) { SetUserInactiveTimeout(0, true); }
 | 
						|
       ///< Set VDR manually into non-interactive mode from now on.
 | 
						|
  bool Retry(time_t AtTime = 0) { return retry <= (AtTime ? AtTime : time(NULL)); }
 | 
						|
       ///< Check whether its time to re-try the shutdown.
 | 
						|
       ///< AtTime checks whether VDR will probably be inactive at that time.
 | 
						|
  time_t GetRetry(void) { return retry; }
 | 
						|
       ///< Time when shutdown retry block ends.
 | 
						|
  void SetRetry(int Seconds) { retry = time(NULL) + Seconds; }
 | 
						|
       ///< Set shutdown retry so that VDR will not try to automatically shut down
 | 
						|
       ///< within Seconds.
 | 
						|
  bool ConfirmShutdown(bool Ask);
 | 
						|
       ///< Check for background activity that blocks shutdown.
 | 
						|
       ///< Returns immediately and without user interaction if Ask = false.
 | 
						|
       ///< Asks for confirmation if Ask = true.
 | 
						|
       ///< Returns true if ready for shutdown.
 | 
						|
  bool ConfirmRestart(bool Ask);
 | 
						|
       ///< Check for background activity that blocks restart.
 | 
						|
       ///< Returns immediately and without user interaction if Ask = false.
 | 
						|
       ///< Asks for confirmation if Ask = true.
 | 
						|
       ///< Returns true if ready for restart.
 | 
						|
  bool DoShutdown(bool Force);
 | 
						|
       ///< Call the shutdown script with data of the next pending timer.
 | 
						|
       ///< Fails if Force = false and a timer is running or within MinEventTimeout.
 | 
						|
       ///< Always calls shutdown on Force = true.
 | 
						|
       ///< Returns true on success.
 | 
						|
  };
 | 
						|
 | 
						|
extern cShutdownHandler ShutdownHandler;
 | 
						|
 | 
						|
#endif
 |