diff options
| -rw-r--r-- | HISTORY | 2 | ||||
| -rw-r--r-- | MANUAL | 5 | ||||
| -rw-r--r-- | config.c | 5 | ||||
| -rw-r--r-- | config.h | 3 | ||||
| -rw-r--r-- | dvbapi.c | 22 | ||||
| -rw-r--r-- | dvbapi.h | 11 | ||||
| -rw-r--r-- | i18n.c | 11 | ||||
| -rw-r--r-- | menu.c | 3 | 
8 files changed, 44 insertions, 18 deletions
| @@ -667,3 +667,5 @@ Video Disk Recorder Revision History  2001-08-25: Version 0.93  - The menus and the channel display now show the current date and time. +- The new Setup parameter MaxVideoFileSize can be used to customize the +  maximum size of the recorded video files. @@ -398,6 +398,11 @@ Video Disk Recorder User's Manual    OSDwidth  = 52         The width and height of the OSD .    OSDheight = 18         The valid ranges are width=40...56, height=12...21. +  MaxVideoFileSize=2000  The maximum size of a single recorded video file in MB. +                         The valid range is 100...2000. Default is 2000, but +                         you may want to use smaller values if you are planning +                         on archiving a recording to CD. +  * Executing system commands    The "Main" menu option "Commands" allows you to execute any system commands @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: config.c 1.55 2001/08/17 13:02:01 kls Exp $ + * $Id: config.c 1.56 2001/08/25 13:37:37 kls Exp $   */  #include "config.h" @@ -783,6 +783,7 @@ cSetup::cSetup(void)    ChannelInfoPos = 0;    OSDwidth = 52;    OSDheight = 18; +  MaxVideoFileSize = MAXVIDEOFILESIZE;    CurrentChannel = -1;  } @@ -814,6 +815,7 @@ bool cSetup::Parse(char *s)       else if (!strcasecmp(Name, "ChannelInfoPos"))      ChannelInfoPos     = atoi(Value);       else if (!strcasecmp(Name, "OSDwidth"))            OSDwidth           = atoi(Value);       else if (!strcasecmp(Name, "OSDheight"))           OSDheight          = atoi(Value); +     else if (!strcasecmp(Name, "MaxVideoFileSize"))    MaxVideoFileSize   = atoi(Value);       else if (!strcasecmp(Name, "CurrentChannel"))      CurrentChannel     = atoi(Value);       else          return false; @@ -880,6 +882,7 @@ bool cSetup::Save(const char *FileName)          fprintf(f, "ChannelInfoPos     = %d\n", ChannelInfoPos);          fprintf(f, "OSDwidth           = %d\n", OSDwidth);          fprintf(f, "OSDheight          = %d\n", OSDheight); +        fprintf(f, "MaxVideoFileSize   = %d\n", MaxVideoFileSize);          fprintf(f, "CurrentChannel     = %d\n", CurrentChannel);          f.Close();          isyslog(LOG_INFO, "saved setup to %s", FileName); @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: config.h 1.62 2001/08/25 11:50:24 kls Exp $ + * $Id: config.h 1.63 2001/08/25 13:30:54 kls Exp $   */  #ifndef __CONFIG_H @@ -287,6 +287,7 @@ public:    int VideoFormat;    int ChannelInfoPos;    int OSDwidth, OSDheight; +  int MaxVideoFileSize;    int CurrentChannel;    cSetup(void);    bool Load(const char *FileName); @@ -7,7 +7,7 @@   * DVD support initially written by Andreas Schultz <aschultz@warp10.net>   * based on dvdplayer-0.5 by Matjaz Thaler <matjaz.thaler@guest.arnes.si>   * - * $Id: dvbapi.c 1.109 2001/08/19 15:09:48 kls Exp $ + * $Id: dvbapi.c 1.110 2001/08/25 13:52:38 kls Exp $   */  //#define DVDDEBUG        1 @@ -50,20 +50,16 @@ extern "C" {  #define DEV_OST_VIDEO  "/dev/ost/video"  #define DEV_OST_AUDIO  "/dev/ost/audio" +#define KILOBYTE(n) ((n) * 1024) +#define MEGABYTE(n) ((n) * 1024 * 1024) +  // The size of the array used to buffer video data:  // (must be larger than MINVIDEODATA - see remux.h) -#define VIDEOBUFSIZE    (1024*1024) +#define VIDEOBUFSIZE  MEGABYTE(1)  // The maximum size of a single frame: -#define MAXFRAMESIZE (192*1024) - -// The maximum file size is limited by the range that can be covered -// with 'int'. 4GB might be possible (if the range is considered -// 'unsigned'), 2GB should be possible (even if the range is considered -// 'signed'), so let's use 1GB for absolute safety (the actual file size -// may be slightly higher because we stop recording only before the next -// 'I' frame, to have a complete Group Of Pictures): -#define MAXVIDEOFILESIZE (1024*1024*1024) // Byte +#define MAXFRAMESIZE  KILOBYTE(192) +  #define MAXFILESPERRECORDING 255  #define MINFREEDISKSPACE    (512) // MB @@ -517,7 +513,7 @@ bool cRecordBuffer::RunningLowOnDiskSpace(void)  bool cRecordBuffer::NextFile(void)  {    if (recordFile >= 0 && pictureType == I_FRAME) { // every file shall start with an I_FRAME -     if (fileSize > MAXVIDEOFILESIZE || RunningLowOnDiskSpace()) { +     if (fileSize > MEGABYTE(Setup.MaxVideoFileSize) || RunningLowOnDiskSpace()) {          recordFile = fileName.NextFile();          fileSize = 0;          } @@ -2217,7 +2213,7 @@ void cCuttingBuffer::Action(void)             // Write one frame:             if (PictureType == I_FRAME) { // every file shall start with an I_FRAME -              if (FileSize > MAXVIDEOFILESIZE) { +              if (FileSize > MEGABYTE(Setup.MaxVideoFileSize)) {                   toFile = toFileName->NextFile();                   if (toFile < 0)                      break; @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: dvbapi.h 1.46 2001/08/11 12:22:01 kls Exp $ + * $Id: dvbapi.h 1.47 2001/08/25 13:37:00 kls Exp $   */  #ifndef __DVBAPI_H @@ -42,6 +42,15 @@ typedef struct CRect {  #define FRAMESPERSEC 25 +// The maximum file size is limited by the range that can be covered +// with 'int'. 4GB might be possible (if the range is considered +// 'unsigned'), 2GB should be possible (even if the range is considered +// 'signed'), so let's use 2000MB for absolute safety (the actual file size +// may be slightly higher because we stop recording only before the next +// 'I' frame, to have a complete Group Of Pictures): +#define MAXVIDEOFILESIZE 2000 // MB +#define MINVIDEOFILESIZE  100 // MB +  const char *IndexToHMSF(int Index, bool WithFrame = false);        // Converts the given index to a string, optionally containing the frame number.  int HMSFToIndex(const char *HMSF); @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: i18n.c 1.33 2001/08/25 12:27:03 kls Exp $ + * $Id: i18n.c 1.34 2001/08/25 13:41:57 kls Exp $   *   * Slovenian translations provided by Miha Setina <mihasetina@softhome.net>   * Italian   translations provided by Alberto Carraro <bertocar@tin.it> @@ -857,6 +857,15 @@ const tPhrase Phrases[] = {      "Hauteur affichage",      "", // TODO    }, +  { "MaxVideoFileSize", +    "Max. Video Dateigröße", +    "", // TODO +    "", // TODO +    "", // TODO +    "", // TODO +    "", // TODO +    "", // TODO +  },    // The days of the week:    { "MTWTFSS",      "MDMDFSS", @@ -4,7 +4,7 @@   * See the main source file 'vdr.c' for copyright information and   * how to reach the author.   * - * $Id: menu.c 1.106 2001/08/25 13:27:26 kls Exp $ + * $Id: menu.c 1.107 2001/08/25 13:37:27 kls Exp $   */  #include "menu.h" @@ -1713,6 +1713,7 @@ void cMenuSetup::Set(void)    Add(new cMenuEditBoolItem(tr("ChannelInfoPos"),     &data.ChannelInfoPos, tr("bottom"), tr("top")));    Add(new cMenuEditIntItem( tr("OSDwidth"),           &data.OSDwidth, MINOSDWIDTH, MAXOSDWIDTH));    Add(new cMenuEditIntItem( tr("OSDheight"),          &data.OSDheight, MINOSDHEIGHT, MAXOSDHEIGHT)); +  Add(new cMenuEditIntItem( tr("MaxVideoFileSize"),   &data.MaxVideoFileSize, MINVIDEOFILESIZE, MAXVIDEOFILESIZE));  }  eOSState cMenuSetup::ProcessKey(eKeys Key) | 
