diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2001-08-25 13:52:38 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2001-08-25 13:52:38 +0200 |
commit | 0525d1bb780981e63214973b9eb2d60bd84d1dca (patch) | |
tree | 09d763d2333643b6570b9f36450d5e9b22b55035 /dvbapi.c | |
parent | 14d3933d91af23a9d79c083163fe6f0281475001 (diff) | |
download | vdr-0525d1bb780981e63214973b9eb2d60bd84d1dca.tar.gz vdr-0525d1bb780981e63214973b9eb2d60bd84d1dca.tar.bz2 |
New Setup parameter MaxVideoFileSize
Diffstat (limited to 'dvbapi.c')
-rw-r--r-- | dvbapi.c | 22 |
1 files changed, 9 insertions, 13 deletions
@@ -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; |