mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
New Setup parameter MaxVideoFileSize
This commit is contained in:
parent
14d3933d91
commit
0525d1bb78
2
HISTORY
2
HISTORY
@ -667,3 +667,5 @@ Video Disk Recorder Revision History
|
|||||||
2001-08-25: Version 0.93
|
2001-08-25: Version 0.93
|
||||||
|
|
||||||
- The menus and the channel display now show the current date and time.
|
- 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.
|
||||||
|
5
MANUAL
5
MANUAL
@ -398,6 +398,11 @@ Video Disk Recorder User's Manual
|
|||||||
OSDwidth = 52 The width and height of the OSD .
|
OSDwidth = 52 The width and height of the OSD .
|
||||||
OSDheight = 18 The valid ranges are width=40...56, height=12...21.
|
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
|
* Executing system commands
|
||||||
|
|
||||||
The "Main" menu option "Commands" allows you to execute any system commands
|
The "Main" menu option "Commands" allows you to execute any system commands
|
||||||
|
5
config.c
5
config.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "config.h"
|
||||||
@ -783,6 +783,7 @@ cSetup::cSetup(void)
|
|||||||
ChannelInfoPos = 0;
|
ChannelInfoPos = 0;
|
||||||
OSDwidth = 52;
|
OSDwidth = 52;
|
||||||
OSDheight = 18;
|
OSDheight = 18;
|
||||||
|
MaxVideoFileSize = MAXVIDEOFILESIZE;
|
||||||
CurrentChannel = -1;
|
CurrentChannel = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -814,6 +815,7 @@ bool cSetup::Parse(char *s)
|
|||||||
else if (!strcasecmp(Name, "ChannelInfoPos")) ChannelInfoPos = atoi(Value);
|
else if (!strcasecmp(Name, "ChannelInfoPos")) ChannelInfoPos = atoi(Value);
|
||||||
else if (!strcasecmp(Name, "OSDwidth")) OSDwidth = atoi(Value);
|
else if (!strcasecmp(Name, "OSDwidth")) OSDwidth = atoi(Value);
|
||||||
else if (!strcasecmp(Name, "OSDheight")) OSDheight = 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 if (!strcasecmp(Name, "CurrentChannel")) CurrentChannel = atoi(Value);
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
@ -880,6 +882,7 @@ bool cSetup::Save(const char *FileName)
|
|||||||
fprintf(f, "ChannelInfoPos = %d\n", ChannelInfoPos);
|
fprintf(f, "ChannelInfoPos = %d\n", ChannelInfoPos);
|
||||||
fprintf(f, "OSDwidth = %d\n", OSDwidth);
|
fprintf(f, "OSDwidth = %d\n", OSDwidth);
|
||||||
fprintf(f, "OSDheight = %d\n", OSDheight);
|
fprintf(f, "OSDheight = %d\n", OSDheight);
|
||||||
|
fprintf(f, "MaxVideoFileSize = %d\n", MaxVideoFileSize);
|
||||||
fprintf(f, "CurrentChannel = %d\n", CurrentChannel);
|
fprintf(f, "CurrentChannel = %d\n", CurrentChannel);
|
||||||
f.Close();
|
f.Close();
|
||||||
isyslog(LOG_INFO, "saved setup to %s", FileName);
|
isyslog(LOG_INFO, "saved setup to %s", FileName);
|
||||||
|
3
config.h
3
config.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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
|
#ifndef __CONFIG_H
|
||||||
@ -287,6 +287,7 @@ public:
|
|||||||
int VideoFormat;
|
int VideoFormat;
|
||||||
int ChannelInfoPos;
|
int ChannelInfoPos;
|
||||||
int OSDwidth, OSDheight;
|
int OSDwidth, OSDheight;
|
||||||
|
int MaxVideoFileSize;
|
||||||
int CurrentChannel;
|
int CurrentChannel;
|
||||||
cSetup(void);
|
cSetup(void);
|
||||||
bool Load(const char *FileName);
|
bool Load(const char *FileName);
|
||||||
|
20
dvbapi.c
20
dvbapi.c
@ -7,7 +7,7 @@
|
|||||||
* DVD support initially written by Andreas Schultz <aschultz@warp10.net>
|
* DVD support initially written by Andreas Schultz <aschultz@warp10.net>
|
||||||
* based on dvdplayer-0.5 by Matjaz Thaler <matjaz.thaler@guest.arnes.si>
|
* 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
|
//#define DVDDEBUG 1
|
||||||
@ -50,20 +50,16 @@ extern "C" {
|
|||||||
#define DEV_OST_VIDEO "/dev/ost/video"
|
#define DEV_OST_VIDEO "/dev/ost/video"
|
||||||
#define DEV_OST_AUDIO "/dev/ost/audio"
|
#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:
|
// The size of the array used to buffer video data:
|
||||||
// (must be larger than MINVIDEODATA - see remux.h)
|
// (must be larger than MINVIDEODATA - see remux.h)
|
||||||
#define VIDEOBUFSIZE (1024*1024)
|
#define VIDEOBUFSIZE MEGABYTE(1)
|
||||||
|
|
||||||
// The maximum size of a single frame:
|
// The maximum size of a single frame:
|
||||||
#define MAXFRAMESIZE (192*1024)
|
#define MAXFRAMESIZE KILOBYTE(192)
|
||||||
|
|
||||||
// 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 MAXFILESPERRECORDING 255
|
#define MAXFILESPERRECORDING 255
|
||||||
|
|
||||||
#define MINFREEDISKSPACE (512) // MB
|
#define MINFREEDISKSPACE (512) // MB
|
||||||
@ -517,7 +513,7 @@ bool cRecordBuffer::RunningLowOnDiskSpace(void)
|
|||||||
bool cRecordBuffer::NextFile(void)
|
bool cRecordBuffer::NextFile(void)
|
||||||
{
|
{
|
||||||
if (recordFile >= 0 && pictureType == I_FRAME) { // every file shall start with an I_FRAME
|
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();
|
recordFile = fileName.NextFile();
|
||||||
fileSize = 0;
|
fileSize = 0;
|
||||||
}
|
}
|
||||||
@ -2217,7 +2213,7 @@ void cCuttingBuffer::Action(void)
|
|||||||
// Write one frame:
|
// Write one frame:
|
||||||
|
|
||||||
if (PictureType == I_FRAME) { // every file shall start with an I_FRAME
|
if (PictureType == I_FRAME) { // every file shall start with an I_FRAME
|
||||||
if (FileSize > MAXVIDEOFILESIZE) {
|
if (FileSize > MEGABYTE(Setup.MaxVideoFileSize)) {
|
||||||
toFile = toFileName->NextFile();
|
toFile = toFileName->NextFile();
|
||||||
if (toFile < 0)
|
if (toFile < 0)
|
||||||
break;
|
break;
|
||||||
|
11
dvbapi.h
11
dvbapi.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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
|
#ifndef __DVBAPI_H
|
||||||
@ -42,6 +42,15 @@ typedef struct CRect {
|
|||||||
|
|
||||||
#define FRAMESPERSEC 25
|
#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);
|
const char *IndexToHMSF(int Index, bool WithFrame = false);
|
||||||
// Converts the given index to a string, optionally containing the frame number.
|
// Converts the given index to a string, optionally containing the frame number.
|
||||||
int HMSFToIndex(const char *HMSF);
|
int HMSFToIndex(const char *HMSF);
|
||||||
|
11
i18n.c
11
i18n.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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>
|
* Slovenian translations provided by Miha Setina <mihasetina@softhome.net>
|
||||||
* Italian translations provided by Alberto Carraro <bertocar@tin.it>
|
* Italian translations provided by Alberto Carraro <bertocar@tin.it>
|
||||||
@ -857,6 +857,15 @@ const tPhrase Phrases[] = {
|
|||||||
"Hauteur affichage",
|
"Hauteur affichage",
|
||||||
"", // TODO
|
"", // TODO
|
||||||
},
|
},
|
||||||
|
{ "MaxVideoFileSize",
|
||||||
|
"Max. Video Dateigröße",
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
"", // TODO
|
||||||
|
},
|
||||||
// The days of the week:
|
// The days of the week:
|
||||||
{ "MTWTFSS",
|
{ "MTWTFSS",
|
||||||
"MDMDFSS",
|
"MDMDFSS",
|
||||||
|
3
menu.c
3
menu.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "menu.h"
|
||||||
@ -1713,6 +1713,7 @@ void cMenuSetup::Set(void)
|
|||||||
Add(new cMenuEditBoolItem(tr("ChannelInfoPos"), &data.ChannelInfoPos, tr("bottom"), tr("top")));
|
Add(new cMenuEditBoolItem(tr("ChannelInfoPos"), &data.ChannelInfoPos, tr("bottom"), tr("top")));
|
||||||
Add(new cMenuEditIntItem( tr("OSDwidth"), &data.OSDwidth, MINOSDWIDTH, MAXOSDWIDTH));
|
Add(new cMenuEditIntItem( tr("OSDwidth"), &data.OSDwidth, MINOSDWIDTH, MAXOSDWIDTH));
|
||||||
Add(new cMenuEditIntItem( tr("OSDheight"), &data.OSDheight, MINOSDHEIGHT, MAXOSDHEIGHT));
|
Add(new cMenuEditIntItem( tr("OSDheight"), &data.OSDheight, MINOSDHEIGHT, MAXOSDHEIGHT));
|
||||||
|
Add(new cMenuEditIntItem( tr("MaxVideoFileSize"), &data.MaxVideoFileSize, MINVIDEOFILESIZE, MAXVIDEOFILESIZE));
|
||||||
}
|
}
|
||||||
|
|
||||||
eOSState cMenuSetup::ProcessKey(eKeys Key)
|
eOSState cMenuSetup::ProcessKey(eKeys Key)
|
||||||
|
Loading…
Reference in New Issue
Block a user