summaryrefslogtreecommitdiff
path: root/dvbapi.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-08-26 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-08-26 18:00:00 +0200
commitae8fe25312b6b0ec18fd0c6c2a275f334ada02db (patch)
tree5ab0a9157534b6118ae61ee895c5d8c003a32d04 /dvbapi.c
parent371bf0665eda455c67926999f52b4850cd8529e4 (diff)
downloadvdr-patch-lnbsharing-ae8fe25312b6b0ec18fd0c6c2a275f334ada02db.tar.gz
vdr-patch-lnbsharing-ae8fe25312b6b0ec18fd0c6c2a275f334ada02db.tar.bz2
Version 0.93vdr-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. - Fixed a bug in handling repeating timers that record over midnight (the calculation of matching timers has been completely rewritten). - Timers that are currently recording are now marked with '#' in the "Timers" menu. - Timers are now sorted in the "Timers" menu, showing the sequence in which they will be recording. This can be disabled in the "Setup" menu. Note that the "Mark" button doesn't work if timers are displayed sorted.
Diffstat (limited to 'dvbapi.c')
-rw-r--r--dvbapi.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/dvbapi.c b/dvbapi.c
index 6ff39b3..51434e1 100644
--- a/dvbapi.c
+++ b/dvbapi.c
@@ -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;