mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Version 1.2.3 (not officially released)
- Fixed the TS to PES repacker so that it works with MPEG1 streams (thanks to Andreas Kool). - Fixed keeping track of the current channel number when moving channels in the "Channels" menu (thanks to Mirko Günther for reporting this one). - Made the plugin library directory configurable via Make.config (thanks to Ludwig Nussel). - Fixed scaling SPU bitmaps in Letterbox mode when playing NTSC material. In order to do this, the cDevice was given a new member function GetVideoSystem(). - Fixed two warnings when compiling with gcc 3.3.1 (thanks to Alfred Zastrow for reporting this). - Made crc32() a static function in libdtv/libsi/si_parser.c to avoid a name clash when using other libraries that also implement a function by that name (thanks to Reinhard Nissl for reporting this one). - Fixed staying off the end of an ongoing recording while replaying in time shift mode (thanks to Rainer Zocholl for reporting this one). - VDR now stops with exit status 2 if one of the configuration files can't be read correctly at program startup (suggested by Rainer Zocholl). - Fixed a crash when starting "Pause live video" twice within the same minute on the same channel. - Fixed freezing replay if a timer starts while in Transfer Mode from the device used by the timer, and the timer needs a different transponder (thanks to Richard Robson for reporting this one). - Fixed toggling channels with the '0' key (thanks to Mirko Günther for reporting this one). - Made the "Zap timeout" (the time until a channel counts as "previous" for switching with '0') a setup variable, available in "Setup/Miscellaneous" (suggested by Helmut Auer). - Removing deleted recordings faster than normal when cutting, to avoid running out of disk space (thanks to Manfred Schmidt-Voigt for reporting this one).
This commit is contained in:
		
							
								
								
									
										23
									
								
								CONTRIBUTORS
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								CONTRIBUTORS
									
									
									
									
									
								
							@@ -315,6 +315,10 @@ Rainer Zocholl <vdrcontrib@zocki.toppoint.de>
 | 
			
		||||
 for suggesting a confirmation prompt when the user presses the "Power" button
 | 
			
		||||
 and there is an upcoming timer event
 | 
			
		||||
 for reporting a bug in skipping the next hit of a repeating timer
 | 
			
		||||
 for reporting a problem with staying off the end of an ongoing recording while
 | 
			
		||||
 replaying in time shift mode
 | 
			
		||||
 for suggesting that VDR should stop if one of the configuration files can't be
 | 
			
		||||
 read correctly at program startup
 | 
			
		||||
 | 
			
		||||
Oleg Assovski <assen@bitcom.msk.ru>
 | 
			
		||||
 for adding EPG scanning for another 4 days
 | 
			
		||||
@@ -328,6 +332,9 @@ Bernd Schweikert <bernd.schweikert@dit-gmbh.de>
 | 
			
		||||
Mirko G<>nther <mi.guenther@ib-helms.de>
 | 
			
		||||
 for suggesting the -m command line option
 | 
			
		||||
 for suggesting the SVDRP command VOLU
 | 
			
		||||
 for reporting a bug in keeping track of the current channel number when moving
 | 
			
		||||
 channels in the "Channels" menu
 | 
			
		||||
 for reporting a bug in toggling channels with the '0' key
 | 
			
		||||
 | 
			
		||||
Achim Lange <Achim_Lange@t-online.de>
 | 
			
		||||
 for replacing 'killproc' with 'killall' in 'runvdr' to make it work on Debian
 | 
			
		||||
@@ -450,6 +457,7 @@ J
 | 
			
		||||
 | 
			
		||||
Helmut Auer <vdr@helmutauer.de>
 | 
			
		||||
 for reporting a superfluous error message in cLockFile
 | 
			
		||||
 for suggesting to make the "Zap timeout" a setup variable
 | 
			
		||||
 | 
			
		||||
Jeremy Hall <jhall@UU.NET>
 | 
			
		||||
 for fixing an incomplete initialization of the filter parameters in eit.c
 | 
			
		||||
@@ -550,6 +558,7 @@ R
 | 
			
		||||
 | 
			
		||||
Andreas Kool <akool@akool.de>
 | 
			
		||||
 for his help in keeping 'channels.conf.cable' up to date
 | 
			
		||||
 for fixing the TS to PES repacker so that it works with MPEG1 streams
 | 
			
		||||
 | 
			
		||||
Guy Roussin <guy.roussin@teledetection.fr>
 | 
			
		||||
 for suggesting not to display channel group delimiters without text
 | 
			
		||||
@@ -637,6 +646,7 @@ Ludwig Nussel <ludwig.nussel@web.de>
 | 
			
		||||
 for fixing handling repeat function with LIRC
 | 
			
		||||
 for reporting a problem with the LIRC remote control trying to learn keys even if it
 | 
			
		||||
 couldn't connect to the LIRC daemon
 | 
			
		||||
 for making the plugin library directory configurable via Make.config
 | 
			
		||||
 | 
			
		||||
Thomas Koch <tom@harhar.net>
 | 
			
		||||
 for his support in keeping the Premiere World channels up to date in 'channels.conf'
 | 
			
		||||
@@ -689,6 +699,7 @@ Juri Haberland <juri@koschikode.com>
 | 
			
		||||
Alfred Zastrow <vdr@zastrow4u.de>
 | 
			
		||||
 for suggesting to implement separate PausePriority and PauseLifetime parameters for
 | 
			
		||||
 the recordings created when pausing live video
 | 
			
		||||
 for reporting two warnings when compiling with gcc 3.3.1
 | 
			
		||||
 | 
			
		||||
Matthias Raus <matthias-raus@web.de>
 | 
			
		||||
 for reporting a problem with starting the editing process if no marks have been set
 | 
			
		||||
@@ -744,3 +755,15 @@ Kenneth Aafl
 | 
			
		||||
Ernst F<>rst <ernstfuerst@swissonline.ch>
 | 
			
		||||
 for reporting a crash in case a VFAT file system is used without compiling VDR
 | 
			
		||||
 with VFAT=1
 | 
			
		||||
 | 
			
		||||
Reinhard Nissl <rnissl@gmx.de>
 | 
			
		||||
 for reporting a name clash because of function crc32() in libdtv/libsi/si_parser.c
 | 
			
		||||
 when using other libraries that also implement a function by that name
 | 
			
		||||
 | 
			
		||||
Richard Robson <richard_robson@beeb.net>
 | 
			
		||||
 for reporting freezing replay if a timer starts while in Transfer Mode from the
 | 
			
		||||
 device used by the timer, and the timer needs a different transponder
 | 
			
		||||
 | 
			
		||||
Manfred Schmidt-Voigt <manfred.schmidt-voigt@mannitec.de>
 | 
			
		||||
 for reporting a problem with runnign out of disk space while cutting in case
 | 
			
		||||
 there are still deleted recordings to remove
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										32
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								HISTORY
									
									
									
									
									
								
							@@ -2282,3 +2282,35 @@ Video Disk Recorder Revision History
 | 
			
		||||
- Now the program uses the values of VIDEODIR and PLUGINDIR defined in Makefile
 | 
			
		||||
  or Makefile.config as defaults (thanks to Steffen Barszus).
 | 
			
		||||
- Added the usual menu timeout to the CAM menus.
 | 
			
		||||
 | 
			
		||||
2003-08-17: Version 1.2.3
 | 
			
		||||
 | 
			
		||||
- Fixed the TS to PES repacker so that it works with MPEG1 streams (thanks to
 | 
			
		||||
  Andreas Kool).
 | 
			
		||||
- Fixed keeping track of the current channel number when moving channels in
 | 
			
		||||
  the "Channels" menu (thanks to Mirko G<>nther for reporting this one).
 | 
			
		||||
- Made the plugin library directory configurable via Make.config (thanks to
 | 
			
		||||
  Ludwig Nussel).
 | 
			
		||||
- Fixed scaling SPU bitmaps in Letterbox mode when playing NTSC material.
 | 
			
		||||
  In order to do this, the cDevice was given a new member function GetVideoSystem().
 | 
			
		||||
- Fixed two warnings when compiling with gcc 3.3.1 (thanks to Alfred Zastrow for
 | 
			
		||||
  reporting this).
 | 
			
		||||
- Made crc32() a static function in libdtv/libsi/si_parser.c to avoid a name clash
 | 
			
		||||
  when using other libraries that also implement a function by that name (thanks
 | 
			
		||||
  to Reinhard Nissl for reporting this one).
 | 
			
		||||
- Fixed staying off the end of an ongoing recording while replaying in time shift
 | 
			
		||||
  mode (thanks to Rainer Zocholl for reporting this one).
 | 
			
		||||
- VDR now stops with exit status 2 if one of the configuration files can't be
 | 
			
		||||
  read correctly at program startup (suggested by Rainer Zocholl).
 | 
			
		||||
- Fixed a crash when starting "Pause live video" twice within the same minute on
 | 
			
		||||
  the same channel.
 | 
			
		||||
- Fixed freezing replay if a timer starts while in Transfer Mode from the device
 | 
			
		||||
  used by the timer, and the timer needs a different transponder (thanks to
 | 
			
		||||
  Richard Robson for reporting this one).
 | 
			
		||||
- Fixed toggling channels with the '0' key (thanks to Mirko G<>nther for reporting
 | 
			
		||||
  this one).
 | 
			
		||||
- Made the "Zap timeout" (the time until a channel counts as "previous" for
 | 
			
		||||
  switching with '0') a setup variable, available in "Setup/Miscellaneous"
 | 
			
		||||
  (suggested by Helmut Auer).
 | 
			
		||||
- Removing deleted recordings faster than normal when cutting, to avoid running
 | 
			
		||||
  out of disk space (thanks to Manfred Schmidt-Voigt for reporting this one).
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								MANUAL
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								MANUAL
									
									
									
									
									
								
							@@ -635,6 +635,9 @@ Version 1.2
 | 
			
		||||
                         connection after which the connection is automatically
 | 
			
		||||
                         closed. Default is 300, a value of 0 means no timeout.
 | 
			
		||||
 | 
			
		||||
  Zap Timeout = 3        The time (in seconds) until a channel counts as "previous"
 | 
			
		||||
                         for switching with '0'
 | 
			
		||||
 | 
			
		||||
* Executing system commands
 | 
			
		||||
 | 
			
		||||
  The "VDR" menu option "Commands" allows you to execute any system commands
 | 
			
		||||
 
 | 
			
		||||
@@ -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.2 2003/08/02 14:25:53 kls Exp $
 | 
			
		||||
# $Id: Make.config.template 1.3 2003/08/09 11:03:25 kls Exp $
 | 
			
		||||
 | 
			
		||||
### The C compiler and options:
 | 
			
		||||
 | 
			
		||||
@@ -23,4 +23,5 @@ MANDIR   = /usr/local/man
 | 
			
		||||
BINDIR   = /usr/local/bin
 | 
			
		||||
 | 
			
		||||
PLUGINDIR= ./PLUGINS
 | 
			
		||||
PLUGINLIBDIR= $(PLUGINDIR)/lib
 | 
			
		||||
VIDEODIR = /video
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										7
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								Makefile
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
# See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
# how to reach the author.
 | 
			
		||||
#
 | 
			
		||||
# $Id: Makefile 1.57 2003/08/02 14:27:21 kls Exp $
 | 
			
		||||
# $Id: Makefile 1.58 2003/08/09 11:09:45 kls Exp $
 | 
			
		||||
 | 
			
		||||
.DELETE_ON_ERROR:
 | 
			
		||||
 | 
			
		||||
@@ -20,6 +20,7 @@ MANDIR   = /usr/local/man
 | 
			
		||||
BINDIR   = /usr/local/bin
 | 
			
		||||
 | 
			
		||||
PLUGINDIR= ./PLUGINS
 | 
			
		||||
PLUGINLIBDIR= $(PLUGINDIR)/lib
 | 
			
		||||
 | 
			
		||||
VIDEODIR = /video
 | 
			
		||||
 | 
			
		||||
@@ -50,7 +51,7 @@ DEFINES += -DREMOTE_$(REMOTE)
 | 
			
		||||
DEFINES += -D_GNU_SOURCE
 | 
			
		||||
 | 
			
		||||
DEFINES += -DVIDEODIR=\"$(VIDEODIR)\"
 | 
			
		||||
DEFINES += -DPLUGINDIR=\"$(PLUGINDIR)/lib\"
 | 
			
		||||
DEFINES += -DPLUGINDIR=\"$(PLUGINLIBDIR)\"
 | 
			
		||||
 | 
			
		||||
ifdef DEBUG_OSD
 | 
			
		||||
DEFINES += -DDEBUG_OSD
 | 
			
		||||
@@ -115,7 +116,7 @@ plugins: include-dir
 | 
			
		||||
 | 
			
		||||
plugins-clean:
 | 
			
		||||
	@for i in `ls $(PLUGINDIR)/src | grep -v '[^a-z0-9]'`; do $(MAKE) -C "$(PLUGINDIR)/src/$$i" clean; done
 | 
			
		||||
	@-rm -f $(PLUGINDIR)/lib/*
 | 
			
		||||
	@-rm -f $(PLUGINLIBDIR)/*
 | 
			
		||||
 | 
			
		||||
# Install the files:
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: channels.c 1.12 2003/04/26 09:57:48 kls Exp $
 | 
			
		||||
 * $Id: channels.c 1.13 2003/08/16 09:12:26 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "channels.h"
 | 
			
		||||
@@ -390,9 +390,9 @@ bool cChannel::Save(FILE *f)
 | 
			
		||||
 | 
			
		||||
cChannels Channels;
 | 
			
		||||
 | 
			
		||||
bool cChannels::Load(const char *FileName, bool AllowComments)
 | 
			
		||||
bool cChannels::Load(const char *FileName, bool AllowComments, bool MustExist)
 | 
			
		||||
{
 | 
			
		||||
  if (cConfig<cChannel>::Load(FileName, AllowComments)) {
 | 
			
		||||
  if (cConfig<cChannel>::Load(FileName, AllowComments, MustExist)) {
 | 
			
		||||
     ReNumber();
 | 
			
		||||
     return true;
 | 
			
		||||
     }
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: channels.h 1.7 2003/04/26 09:15:40 kls Exp $
 | 
			
		||||
 * $Id: channels.h 1.8 2003/08/16 09:12:15 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __CHANNELS_H
 | 
			
		||||
@@ -130,7 +130,7 @@ protected:
 | 
			
		||||
  int maxNumber;
 | 
			
		||||
public:
 | 
			
		||||
  cChannels(void) { maxNumber = 0; }
 | 
			
		||||
  virtual bool Load(const char *FileName, bool AllowComments = false);
 | 
			
		||||
  virtual bool Load(const char *FileName, bool AllowComments = false, bool MustExist = false);
 | 
			
		||||
  int GetNextGroup(int Idx);   // Get next channel group
 | 
			
		||||
  int GetPrevGroup(int Idx);   // Get previous channel group
 | 
			
		||||
  int GetNextNormal(int Idx);  // Get next normal channel (not group)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								config.c
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								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.114 2003/05/11 13:50:02 kls Exp $
 | 
			
		||||
 * $Id: config.c 1.115 2003/08/17 08:47:41 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "config.h"
 | 
			
		||||
@@ -262,6 +262,7 @@ cSetup::cSetup(void)
 | 
			
		||||
  EPGScanTimeout = 5;
 | 
			
		||||
  EPGBugfixLevel = 2;
 | 
			
		||||
  SVDRPTimeout = 300;
 | 
			
		||||
  ZapTimeout = 3;
 | 
			
		||||
  SortTimers = 1;
 | 
			
		||||
  PrimaryLimit = 0;
 | 
			
		||||
  DefaultPriority = 50;
 | 
			
		||||
@@ -413,6 +414,7 @@ bool cSetup::Parse(const char *Name, const char *Value)
 | 
			
		||||
  else if (!strcasecmp(Name, "EPGScanTimeout"))      EPGScanTimeout     = atoi(Value);
 | 
			
		||||
  else if (!strcasecmp(Name, "EPGBugfixLevel"))      EPGBugfixLevel     = atoi(Value);
 | 
			
		||||
  else if (!strcasecmp(Name, "SVDRPTimeout"))        SVDRPTimeout       = atoi(Value);
 | 
			
		||||
  else if (!strcasecmp(Name, "ZapTimeout"))          ZapTimeout         = atoi(Value);
 | 
			
		||||
  else if (!strcasecmp(Name, "SortTimers"))          SortTimers         = atoi(Value);
 | 
			
		||||
  else if (!strcasecmp(Name, "PrimaryLimit"))        PrimaryLimit       = atoi(Value);
 | 
			
		||||
  else if (!strcasecmp(Name, "DefaultPriority"))     DefaultPriority    = atoi(Value);
 | 
			
		||||
@@ -462,6 +464,7 @@ bool cSetup::Save(void)
 | 
			
		||||
  Store("EPGScanTimeout",     EPGScanTimeout);
 | 
			
		||||
  Store("EPGBugfixLevel",     EPGBugfixLevel);
 | 
			
		||||
  Store("SVDRPTimeout",       SVDRPTimeout);
 | 
			
		||||
  Store("ZapTimeout",         ZapTimeout);
 | 
			
		||||
  Store("SortTimers",         SortTimers);
 | 
			
		||||
  Store("PrimaryLimit",       PrimaryLimit);
 | 
			
		||||
  Store("DefaultPriority",    DefaultPriority);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										17
									
								
								config.h
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								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.165 2003/06/12 20:37:14 kls Exp $
 | 
			
		||||
 * $Id: config.h 1.168 2003/08/17 08:46:34 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __CONFIG_H
 | 
			
		||||
@@ -19,8 +19,8 @@
 | 
			
		||||
#include "device.h"
 | 
			
		||||
#include "tools.h"
 | 
			
		||||
 | 
			
		||||
#define VDRVERSION  "1.2.2"
 | 
			
		||||
#define VDRVERSNUM   10202  // Version * 10000 + Major * 100 + Minor
 | 
			
		||||
#define VDRVERSION  "1.2.3"
 | 
			
		||||
#define VDRVERSNUM   10203  // Version * 10000 + Major * 100 + Minor
 | 
			
		||||
 | 
			
		||||
#define MAXPRIORITY 99
 | 
			
		||||
#define MAXLIFETIME 99
 | 
			
		||||
@@ -87,7 +87,7 @@ public:
 | 
			
		||||
  cConfig(void) { fileName = NULL; }
 | 
			
		||||
  virtual ~cConfig() { free(fileName); }
 | 
			
		||||
  const char *FileName(void) { return fileName; }
 | 
			
		||||
  bool Load(const char *FileName = NULL, bool AllowComments = false)
 | 
			
		||||
  bool Load(const char *FileName = NULL, bool AllowComments = false, bool MustExist = false)
 | 
			
		||||
  {
 | 
			
		||||
    Clear();
 | 
			
		||||
    if (FileName) {
 | 
			
		||||
@@ -95,7 +95,7 @@ public:
 | 
			
		||||
       fileName = strdup(FileName);
 | 
			
		||||
       allowComments = AllowComments;
 | 
			
		||||
       }
 | 
			
		||||
    bool result = false;
 | 
			
		||||
    bool result = !MustExist;
 | 
			
		||||
    if (fileName && access(fileName, F_OK) == 0) {
 | 
			
		||||
       isyslog("loading %s", fileName);
 | 
			
		||||
       FILE *f = fopen(fileName, "r");
 | 
			
		||||
@@ -125,9 +125,13 @@ public:
 | 
			
		||||
                }
 | 
			
		||||
          fclose(f);
 | 
			
		||||
          }
 | 
			
		||||
       else
 | 
			
		||||
       else {
 | 
			
		||||
          LOG_ERROR_STR(fileName);
 | 
			
		||||
          result = false;
 | 
			
		||||
          }
 | 
			
		||||
       }
 | 
			
		||||
    if (!result)
 | 
			
		||||
       fprintf(stderr, "vdr: error while reading '%s'\n", fileName);
 | 
			
		||||
    return result;
 | 
			
		||||
  }
 | 
			
		||||
  bool Save(void)
 | 
			
		||||
@@ -215,6 +219,7 @@ public:
 | 
			
		||||
  int EPGScanTimeout;
 | 
			
		||||
  int EPGBugfixLevel;
 | 
			
		||||
  int SVDRPTimeout;
 | 
			
		||||
  int ZapTimeout;
 | 
			
		||||
  int SortTimers;
 | 
			
		||||
  int PrimaryLimit;
 | 
			
		||||
  int DefaultPriority, DefaultLifetime;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								cutter.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								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.4 2003/05/24 11:59:33 kls Exp $
 | 
			
		||||
 * $Id: cutter.c 1.5 2003/08/17 09:04:04 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "cutter.h"
 | 
			
		||||
@@ -86,7 +86,7 @@ void cCuttingThread::Action(void)
 | 
			
		||||
 | 
			
		||||
           // Make sure there is enough disk space:
 | 
			
		||||
 | 
			
		||||
           AssertFreeDiskSpace();
 | 
			
		||||
           AssertFreeDiskSpace(-1);
 | 
			
		||||
 | 
			
		||||
           // Read one frame:
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										7
									
								
								device.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								device.c
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: device.c 1.46 2003/08/02 11:44:28 kls Exp $
 | 
			
		||||
 * $Id: device.c 1.47 2003/08/15 12:34:36 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "device.h"
 | 
			
		||||
@@ -216,6 +216,11 @@ void cDevice::SetVideoFormat(bool VideoFormat16_9)
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
eVideoSystem cDevice::GetVideoSystem(void)
 | 
			
		||||
{
 | 
			
		||||
  return vsPAL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//#define PRINTPIDS(s) { char b[500]; char *q = b; q += sprintf(q, "%d %s ", CardIndex(), s); for (int i = 0; i < MAXPIDHANDLES; i++) q += sprintf(q, " %s%4d %d", i == ptOther ? "* " : "", pidHandles[i].pid, pidHandles[i].used); dsyslog(b); }
 | 
			
		||||
#define PRINTPIDS(s)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								device.h
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								device.h
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: device.h 1.33 2003/05/11 08:50:04 kls Exp $
 | 
			
		||||
 * $Id: device.h 1.34 2003/08/15 13:05:50 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __DEVICE_H
 | 
			
		||||
@@ -45,6 +45,10 @@ enum ePlayMode { pmNone,           // audio/video from decoder
 | 
			
		||||
                 // KNOWN TO YOUR PLAYER.
 | 
			
		||||
               };
 | 
			
		||||
 | 
			
		||||
enum eVideoSystem { vsPAL,
 | 
			
		||||
                    vsNTSC
 | 
			
		||||
                  };
 | 
			
		||||
 | 
			
		||||
class cOsdBase;
 | 
			
		||||
class cChannel;
 | 
			
		||||
class cPlayer;
 | 
			
		||||
@@ -248,6 +252,9 @@ public:
 | 
			
		||||
  virtual void SetVideoFormat(bool VideoFormat16_9);
 | 
			
		||||
         ///< Sets the output video format to either 16:9 or 4:3 (only useful
 | 
			
		||||
         ///< if this device has an MPEG decoder).
 | 
			
		||||
  virtual eVideoSystem GetVideoSystem(void);
 | 
			
		||||
         ///< Returns the video system of the currently displayed material
 | 
			
		||||
         ///< (default is PAL).
 | 
			
		||||
 | 
			
		||||
// Audio facilities
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										15
									
								
								dvbdevice.c
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								dvbdevice.c
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: dvbdevice.c 1.60 2003/05/24 13:23:51 kls Exp $
 | 
			
		||||
 * $Id: dvbdevice.c 1.61 2003/08/15 13:03:41 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "dvbdevice.h"
 | 
			
		||||
@@ -525,6 +525,19 @@ void cDvbDevice::SetVideoFormat(bool VideoFormat16_9)
 | 
			
		||||
     CHECK(ioctl(fd_video, VIDEO_SET_FORMAT, VideoFormat16_9 ? VIDEO_FORMAT_16_9 : VIDEO_FORMAT_4_3));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
eVideoSystem cDvbDevice::GetVideoSystem(void)
 | 
			
		||||
{
 | 
			
		||||
  eVideoSystem VideoSytem = vsPAL;
 | 
			
		||||
  video_size_t vs;
 | 
			
		||||
  if (ioctl(fd_video, VIDEO_GET_SIZE, &vs) == 0) {
 | 
			
		||||
     if (vs.h == 480 || vs.h == 240)
 | 
			
		||||
        VideoSytem = vsNTSC;
 | 
			
		||||
     }
 | 
			
		||||
  else
 | 
			
		||||
     LOG_ERROR;
 | 
			
		||||
  return VideoSytem;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//                            ptAudio        ptVideo        ptPcr        ptTeletext        ptDolby        ptOther
 | 
			
		||||
dmx_pes_type_t PesTypes[] = { DMX_PES_AUDIO, DMX_PES_VIDEO, DMX_PES_PCR, DMX_PES_TELETEXT, DMX_PES_OTHER, DMX_PES_OTHER };
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: dvbdevice.h 1.21 2003/05/02 12:21:51 kls Exp $
 | 
			
		||||
 * $Id: dvbdevice.h 1.22 2003/08/15 12:34:55 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __DVBDEVICE_H
 | 
			
		||||
@@ -80,6 +80,7 @@ public:
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
  virtual void SetVideoFormat(bool VideoFormat16_9);
 | 
			
		||||
  virtual eVideoSystem GetVideoSystem(void);
 | 
			
		||||
 | 
			
		||||
// Audio facilities
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								dvbspu.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								dvbspu.c
									
									
									
									
									
								
							@@ -8,7 +8,7 @@
 | 
			
		||||
 *
 | 
			
		||||
 * parts of this file are derived from the OMS program.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: dvbspu.c 1.3 2002/10/26 10:46:49 kls Exp $
 | 
			
		||||
 * $Id: dvbspu.c 1.4 2003/08/15 13:04:39 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
@@ -301,8 +301,10 @@ void cDvbSpuDecoder::clearHighlight(void)
 | 
			
		||||
 | 
			
		||||
int cDvbSpuDecoder::ScaleYcoord(int value)
 | 
			
		||||
{
 | 
			
		||||
    if (scaleMode == eSpuLetterBox)
 | 
			
		||||
        return lround((value * 3.0) / 4.0 + 72.0);
 | 
			
		||||
    if (scaleMode == eSpuLetterBox) {
 | 
			
		||||
        int offset = cDevice::PrimaryDevice()->GetVideoSystem() == vsPAL ? 72 : 60;
 | 
			
		||||
        return lround((value * 3.0) / 4.0) + offset;
 | 
			
		||||
        }
 | 
			
		||||
    else
 | 
			
		||||
        return value;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										19
									
								
								i18n.c
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								i18n.c
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: i18n.c 1.129 2003/07/13 15:03:07 kls Exp $
 | 
			
		||||
 * $Id: i18n.c 1.130 2003/08/17 08:53:24 kls Exp $
 | 
			
		||||
 *
 | 
			
		||||
 * Translations provided by:
 | 
			
		||||
 *
 | 
			
		||||
@@ -2663,6 +2663,23 @@ const tI18nPhrase Phrases[] = {
 | 
			
		||||
    "SVDRP Timeout (s)",
 | 
			
		||||
    "SVDRP Timeout (s)",
 | 
			
		||||
  },
 | 
			
		||||
  { "Setup.Miscellaneous$Zap timeout (s)",
 | 
			
		||||
    "Zap Timeout (s)",
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
  },
 | 
			
		||||
  // The days of the week:
 | 
			
		||||
  { "MTWTFSS",
 | 
			
		||||
    "MDMDFSS",
 | 
			
		||||
 
 | 
			
		||||
@@ -1226,7 +1226,6 @@ void siParseDescriptors (struct LIST *, u_char *, int, u_char);
 | 
			
		||||
void siParseDescriptor (struct LIST *, u_char *);
 | 
			
		||||
char *siGetDescriptorText (u_char *, int);
 | 
			
		||||
char *siGetDescriptorName (u_char *, int);
 | 
			
		||||
u_long crc32 (char *data, int len);
 | 
			
		||||
 | 
			
		||||
/* si_debug_services.c */
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -36,7 +36,7 @@
 | 
			
		||||
#include "libsi.h"
 | 
			
		||||
#include "si_tables.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static u_long crc32 (char *data, int len);
 | 
			
		||||
 | 
			
		||||
struct LIST *siParsePAT (u_char *Buffer) 
 | 
			
		||||
{
 | 
			
		||||
@@ -1240,7 +1240,7 @@ char *siGetDescriptorTextHandler (u_char *Buffer, int Length, int type)
 | 
			
		||||
         if (*Buffer == 0) break;
 | 
			
		||||
 | 
			
		||||
         if ((*Buffer >= ' ' && *Buffer <= '~') || (*Buffer == '\n') ||
 | 
			
		||||
             (*Buffer >= 0xa0 && *Buffer <= 0xff)) *tmp++ = *Buffer;
 | 
			
		||||
             (*Buffer >= 0xa0)) *tmp++ = *Buffer;
 | 
			
		||||
         if (*Buffer == 0x8A) *tmp++ = '\n';
 | 
			
		||||
         if ((*Buffer == 0x86 || *Buffer == 0x87) && !(GDT_NAME_DESCRIPTOR & type)) *tmp++ = ' ';
 | 
			
		||||
         Buffer++;
 | 
			
		||||
@@ -1323,7 +1323,7 @@ static u_long crc_table[256] = {
 | 
			
		||||
	0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668,
 | 
			
		||||
	0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4};
 | 
			
		||||
 | 
			
		||||
u_long crc32 (char *data, int len)
 | 
			
		||||
static u_long crc32 (char *data, int len)
 | 
			
		||||
{
 | 
			
		||||
	register int i;
 | 
			
		||||
	u_long crc = 0xffffffff;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										14
									
								
								menu.c
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								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.264 2003/08/03 09:38:37 kls Exp $
 | 
			
		||||
 * $Id: menu.c 1.268 2003/08/17 08:52:07 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "menu.h"
 | 
			
		||||
@@ -763,6 +763,8 @@ eOSState cMenuChannels::Delete(void)
 | 
			
		||||
 | 
			
		||||
void cMenuChannels::Move(int From, int To)
 | 
			
		||||
{
 | 
			
		||||
  int CurrentChannelNr = cDevice::CurrentChannel();
 | 
			
		||||
  cChannel *CurrentChannel = Channels.GetByNumber(CurrentChannelNr);
 | 
			
		||||
  cChannel *FromChannel = GetChannel(From);
 | 
			
		||||
  cChannel *ToChannel = GetChannel(To);
 | 
			
		||||
  if (FromChannel && ToChannel) {
 | 
			
		||||
@@ -772,6 +774,8 @@ void cMenuChannels::Move(int From, int To)
 | 
			
		||||
     cOsdMenu::Move(From, To);
 | 
			
		||||
     Propagate();
 | 
			
		||||
     isyslog("channel %d moved to %d", FromNumber, ToNumber);
 | 
			
		||||
     if (CurrentChannel && CurrentChannel->Number() != CurrentChannelNr)
 | 
			
		||||
        Channels.SwitchTo(CurrentChannel->Number());
 | 
			
		||||
     }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -2252,6 +2256,7 @@ cMenuSetupMisc::cMenuSetupMisc(void)
 | 
			
		||||
  Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Min. event timeout (min)"),   &data.MinEventTimeout));
 | 
			
		||||
  Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Min. user inactivity (min)"), &data.MinUserInactivity));
 | 
			
		||||
  Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$SVDRP timeout (s)"),          &data.SVDRPTimeout));
 | 
			
		||||
  Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Zap timeout (s)"),            &data.ZapTimeout));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// --- cMenuSetupPluginItem --------------------------------------------------
 | 
			
		||||
@@ -2997,6 +3002,8 @@ cRecordControl::cRecordControl(cDevice *Device, cTimer *Timer, bool Pause)
 | 
			
		||||
     else {
 | 
			
		||||
        Timers.Del(timer);
 | 
			
		||||
        Timers.Save();
 | 
			
		||||
        if (!cReplayControl::LastReplayed()) // an instant recording, maybe from cRecordControls::PauseLiveVideo()
 | 
			
		||||
           cReplayControl::SetRecording(fileName, Recording.Name());
 | 
			
		||||
        }
 | 
			
		||||
     timer = NULL;
 | 
			
		||||
     return;
 | 
			
		||||
@@ -3093,8 +3100,11 @@ bool cRecordControls::Start(cTimer *Timer, bool Pause)
 | 
			
		||||
     int Priority = Timer ? Timer->Priority() : Pause ? Setup.PausePriority : Setup.DefaultPriority;
 | 
			
		||||
     cDevice *device = cDevice::GetDevice(channel, Priority, &NeedsDetachReceivers);
 | 
			
		||||
     if (device) {
 | 
			
		||||
        if (NeedsDetachReceivers)
 | 
			
		||||
        if (NeedsDetachReceivers) {
 | 
			
		||||
           Stop(device);
 | 
			
		||||
           if (device == cDevice::ActualDevice())
 | 
			
		||||
              cControl::Shutdown(); // in case this device was used for Transfer Mode
 | 
			
		||||
           }
 | 
			
		||||
        if (!device->SwitchChannel(channel, false)) {
 | 
			
		||||
           cThread::EmergencyExit(true);
 | 
			
		||||
           return false;
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: osdbase.c 1.8 2003/03/23 15:53:29 kls Exp $
 | 
			
		||||
 * $Id: osdbase.c 1.9 2003/08/15 13:47:51 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "osdbase.h"
 | 
			
		||||
@@ -215,7 +215,7 @@ void cBitmap::SetBitmap(int x, int y, const cBitmap &Bitmap)
 | 
			
		||||
     Take(Bitmap, &Indexes);
 | 
			
		||||
     for (int ix = 0; ix < Bitmap.width; ix++) {
 | 
			
		||||
         for (int iy = 0; iy < Bitmap.height; iy++)
 | 
			
		||||
             SetIndex(x + ix, y + iy, Indexes[Bitmap.bitmap[Bitmap.width * iy + ix]]);
 | 
			
		||||
             SetIndex(x + ix, y + iy, Indexes[int(Bitmap.bitmap[Bitmap.width * iy + ix])]);
 | 
			
		||||
         }
 | 
			
		||||
     }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: recording.c 1.80 2003/05/30 13:23:54 kls Exp $
 | 
			
		||||
 * $Id: recording.c 1.82 2003/08/17 09:10:46 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "recording.h"
 | 
			
		||||
@@ -95,7 +95,8 @@ void AssertFreeDiskSpace(int Priority)
 | 
			
		||||
  // a file, or mark a file for removal ("delete" it), so that
 | 
			
		||||
  // it will get removed during the next call.
 | 
			
		||||
  static time_t LastFreeDiskCheck = 0;
 | 
			
		||||
  if (time(NULL) - LastFreeDiskCheck > DISKCHECKDELTA) {
 | 
			
		||||
  int Factor = (Priority == -1) ? 10 : 1;
 | 
			
		||||
  if (time(NULL) - LastFreeDiskCheck > DISKCHECKDELTA / Factor) {
 | 
			
		||||
     if (!VideoFileSpaceAvailable(MINDISKSPACE)) {
 | 
			
		||||
        // Make sure only one instance of VDR does this:
 | 
			
		||||
        cLockFile LockFile(VideoDirectory);
 | 
			
		||||
@@ -113,7 +114,7 @@ void AssertFreeDiskSpace(int Priority)
 | 
			
		||||
                 r = Recordings.Next(r);
 | 
			
		||||
                 }
 | 
			
		||||
           if (r0 && r0->Remove()) {
 | 
			
		||||
              LastFreeDiskCheck += REMOVELATENCY;
 | 
			
		||||
              LastFreeDiskCheck += REMOVELATENCY / Factor;
 | 
			
		||||
              return;
 | 
			
		||||
              }
 | 
			
		||||
           }
 | 
			
		||||
@@ -770,7 +771,7 @@ void cRecordingUserCommand::InvokeCommand(const char *State, const char *Recordi
 | 
			
		||||
#define INDEXFILESUFFIX     "/index.vdr"
 | 
			
		||||
 | 
			
		||||
// The number of frames to stay off the end in case of time shift:
 | 
			
		||||
#define INDEXSAFETYLIMIT 100 // frames
 | 
			
		||||
#define INDEXSAFETYLIMIT 150 // frames
 | 
			
		||||
 | 
			
		||||
// The maximum time to wait before giving up while catching up on an index file:
 | 
			
		||||
#define MAXINDEXCATCHUP   8 // seconds
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: recording.h 1.25 2002/10/19 15:48:52 kls Exp $
 | 
			
		||||
 * $Id: recording.h 1.26 2003/08/17 09:03:46 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __RECORDING_H
 | 
			
		||||
@@ -17,6 +17,8 @@
 | 
			
		||||
 | 
			
		||||
void RemoveDeletedRecordings(void);
 | 
			
		||||
void AssertFreeDiskSpace(int Priority = 0);
 | 
			
		||||
     ///< The special Priority value -1 means that we shall get rid of any
 | 
			
		||||
     ///< deleted recordings faster than normal (because we're cutting).
 | 
			
		||||
 | 
			
		||||
class cResumeFile {
 | 
			
		||||
private:
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								remux.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								remux.c
									
									
									
									
									
								
							@@ -8,7 +8,7 @@
 | 
			
		||||
 * the Linux DVB driver's 'tuxplayer' example and were rewritten to suit
 | 
			
		||||
 * VDR's needs.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: remux.c 1.15 2003/04/26 15:07:41 kls Exp $
 | 
			
		||||
 * $Id: remux.c 1.16 2003/08/06 14:44:03 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/* The calling interface of the 'cRemux::Process()' function is defined
 | 
			
		||||
@@ -321,7 +321,6 @@ void cTS2PES::instant_repack(const uint8_t *Buf, int Count)
 | 
			
		||||
                     if ((flag1 & 0xC0) == 0x80 )
 | 
			
		||||
                        mpeg = 2;
 | 
			
		||||
                     else {
 | 
			
		||||
                        esyslog("ERROR: error in data stream!");
 | 
			
		||||
                        hlength = 0;
 | 
			
		||||
                        which = 0;
 | 
			
		||||
                        mpeg = 1;
 | 
			
		||||
@@ -361,6 +360,9 @@ void cTS2PES::instant_repack(const uint8_t *Buf, int Count)
 | 
			
		||||
               write_ipack(&hlength, 1);
 | 
			
		||||
               }
 | 
			
		||||
 | 
			
		||||
            if (mpeg == 1 && found == 7)
 | 
			
		||||
               write_ipack(&flag1, 1);
 | 
			
		||||
 | 
			
		||||
            if (mpeg == 2 && (flag2 & PTS_ONLY) && found < 14) {
 | 
			
		||||
               while (c < Count && found < 14) {
 | 
			
		||||
                     write_ipack(Buf + c, 1);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										43
									
								
								vdr.c
									
									
									
									
									
								
							
							
						
						
									
										43
									
								
								vdr.c
									
									
									
									
									
								
							@@ -22,7 +22,7 @@
 | 
			
		||||
 *
 | 
			
		||||
 * The project's page is at http://www.cadsoft.de/vdr
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: vdr.c 1.162 2003/08/02 14:01:32 kls Exp $
 | 
			
		||||
 * $Id: vdr.c 1.165 2003/08/17 08:50:25 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <getopt.h>
 | 
			
		||||
@@ -57,7 +57,6 @@
 | 
			
		||||
#define ACTIVITYTIMEOUT 60 // seconds before starting housekeeping
 | 
			
		||||
#define SHUTDOWNWAIT   300 // seconds to wait in user prompt before automatic shutdown
 | 
			
		||||
#define MANUALSTART    600 // seconds the next timer must be in the future to assume manual start
 | 
			
		||||
#define ZAPTIMEOUT       3 // seconds until a channel counts as "previous" for switching with '0'
 | 
			
		||||
 | 
			
		||||
static int Interrupted = 0;
 | 
			
		||||
 | 
			
		||||
@@ -341,17 +340,19 @@ int main(int argc, char *argv[])
 | 
			
		||||
 | 
			
		||||
  cPlugin::SetConfigDirectory(ConfigDirectory);
 | 
			
		||||
 | 
			
		||||
  Setup.Load(AddDirectory(ConfigDirectory, "setup.conf"));
 | 
			
		||||
  Sources.Load(AddDirectory(ConfigDirectory, "sources.conf"), true);
 | 
			
		||||
  Diseqcs.Load(AddDirectory(ConfigDirectory, "diseqc.conf"), true);
 | 
			
		||||
  Channels.Load(AddDirectory(ConfigDirectory, "channels.conf"));
 | 
			
		||||
  Timers.Load(AddDirectory(ConfigDirectory, "timers.conf"));
 | 
			
		||||
  Commands.Load(AddDirectory(ConfigDirectory, "commands.conf"), true);
 | 
			
		||||
  RecordingCommands.Load(AddDirectory(ConfigDirectory, "reccmds.conf"), true);
 | 
			
		||||
  SVDRPhosts.Load(AddDirectory(ConfigDirectory, "svdrphosts.conf"), true);
 | 
			
		||||
  CaDefinitions.Load(AddDirectory(ConfigDirectory, "ca.conf"), true);
 | 
			
		||||
  Keys.Load(AddDirectory(ConfigDirectory, "remote.conf"));
 | 
			
		||||
  KeyMacros.Load(AddDirectory(ConfigDirectory, "keymacros.conf"), true);
 | 
			
		||||
  if (!(Setup.Load(AddDirectory(ConfigDirectory, "setup.conf")) &&
 | 
			
		||||
        Sources.Load(AddDirectory(ConfigDirectory, "sources.conf"), true, true) &&
 | 
			
		||||
        Diseqcs.Load(AddDirectory(ConfigDirectory, "diseqc.conf"), true, true) &&
 | 
			
		||||
        Channels.Load(AddDirectory(ConfigDirectory, "channels.conf"), false, true) &&
 | 
			
		||||
        Timers.Load(AddDirectory(ConfigDirectory, "timers.conf")) &&
 | 
			
		||||
        Commands.Load(AddDirectory(ConfigDirectory, "commands.conf"), true) &&
 | 
			
		||||
        RecordingCommands.Load(AddDirectory(ConfigDirectory, "reccmds.conf"), true) &&
 | 
			
		||||
        SVDRPhosts.Load(AddDirectory(ConfigDirectory, "svdrphosts.conf"), true) &&
 | 
			
		||||
        CaDefinitions.Load(AddDirectory(ConfigDirectory, "ca.conf"), true) &&
 | 
			
		||||
        Keys.Load(AddDirectory(ConfigDirectory, "remote.conf")) &&
 | 
			
		||||
        KeyMacros.Load(AddDirectory(ConfigDirectory, "keymacros.conf"), true)
 | 
			
		||||
        ))
 | 
			
		||||
     return 2;
 | 
			
		||||
 | 
			
		||||
  // DVB interfaces:
 | 
			
		||||
 | 
			
		||||
@@ -455,8 +456,8 @@ int main(int argc, char *argv[])
 | 
			
		||||
  cOsdObject *Temp = NULL;
 | 
			
		||||
  int LastChannel = -1;
 | 
			
		||||
  int LastTimerChannel = -1;
 | 
			
		||||
  int PreviousChannel = cDevice::CurrentChannel();
 | 
			
		||||
  int LastLastChannel = PreviousChannel;
 | 
			
		||||
  int PreviousChannel[2] = { 1, 1 };
 | 
			
		||||
  int PreviousChannelIndex = 0;
 | 
			
		||||
  time_t LastChannelChanged = time(NULL);
 | 
			
		||||
  time_t LastActivity = 0;
 | 
			
		||||
  int MaxLatencyTime = 0;
 | 
			
		||||
@@ -498,10 +499,8 @@ int main(int argc, char *argv[])
 | 
			
		||||
           LastChannel = cDevice::CurrentChannel();
 | 
			
		||||
           LastChannelChanged = time(NULL);
 | 
			
		||||
           }
 | 
			
		||||
        if (LastLastChannel != LastChannel && time(NULL) - LastChannelChanged >= ZAPTIMEOUT) {
 | 
			
		||||
           PreviousChannel = LastLastChannel;
 | 
			
		||||
           LastLastChannel = LastChannel;
 | 
			
		||||
           }
 | 
			
		||||
        if (time(NULL) - LastChannelChanged >= Setup.ZapTimeout && LastChannel != PreviousChannel[0] && LastChannel != PreviousChannel[1])
 | 
			
		||||
           PreviousChannel[PreviousChannelIndex ^= 1] = LastChannel;
 | 
			
		||||
        // Timers and Recordings:
 | 
			
		||||
        if (!Timers.BeingEdited()) {
 | 
			
		||||
           time_t Now = time(NULL); // must do both following calls with the exact same time!
 | 
			
		||||
@@ -680,9 +679,9 @@ int main(int argc, char *argv[])
 | 
			
		||||
           switch (key) {
 | 
			
		||||
             // Toggle channels:
 | 
			
		||||
             case k0: {
 | 
			
		||||
                  int CurrentChannel = cDevice::CurrentChannel();
 | 
			
		||||
                  Channels.SwitchTo(PreviousChannel);
 | 
			
		||||
                  PreviousChannel = CurrentChannel;
 | 
			
		||||
                  if (PreviousChannel[PreviousChannelIndex ^ 1] == LastChannel || LastChannel != PreviousChannel[0] && LastChannel != PreviousChannel[1])
 | 
			
		||||
                     PreviousChannelIndex ^= 1;
 | 
			
		||||
                  Channels.SwitchTo(PreviousChannel[PreviousChannelIndex ^= 1]);
 | 
			
		||||
                  break;
 | 
			
		||||
                  }
 | 
			
		||||
             // Direct Channel Select:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user