summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2011-02-09 21:33:37 +0100
committerJochen Dolze <vdr@dolze.de>2011-02-09 21:33:37 +0100
commit71a9b82061cc4420da2357ae99ecc701d7a6eedd (patch)
tree593d9ff7fc169e20cca0788cdaf8ca8e019325da
parent44d861cb39b59700ea5b8bd79da088d0d5400a23 (diff)
downloadvdr-plugin-markad-71a9b82061cc4420da2357ae99ecc701d7a6eedd.tar.gz
vdr-plugin-markad-71a9b82061cc4420da2357ae99ecc701d7a6eedd.tar.bz2
Completed end mark detection
New option -I for correcting info file Better texts for options
-rw-r--r--command/global.h48
-rw-r--r--command/markad-standalone.cpp184
-rw-r--r--command/markad-standalone.h18
-rw-r--r--command/video.cpp15
-rw-r--r--command/video.h2
-rw-r--r--plugin/markad.cpp3
-rw-r--r--plugin/po/de_DE.po15
-rw-r--r--plugin/po/it_IT.po13
-rw-r--r--plugin/setup.cpp7
-rw-r--r--plugin/setup.h2
-rw-r--r--plugin/status.cpp3
11 files changed, 180 insertions, 130 deletions
diff --git a/command/global.h b/command/global.h
index d55633f..540d927 100644
--- a/command/global.h
+++ b/command/global.h
@@ -22,36 +22,35 @@ typedef unsigned char uchar;
#define MA_SP_TYPE 6
#define MA_BI_TYPE 7
-#define MT_UNCERTAIN 0
-#define MT_START 1
-#define MT_STOP 2
+#define MT_START 1
+#define MT_STOP 2
-#define MT_COMMON 0x10
-#define MT_COMMONSTART 0x11
-#define MT_COMMONSTOP 0x12
+#define MT_ASSUMED 0x10
+#define MT_ASSUMEDSTART 0x11
+#define MT_ASSUMEDSTOP 0x12
-#define MT_ASSUMED 0x20
-#define MT_ASSUMEDSTART 0x21
-#define MT_ASSUMEDSTOP 0x22
+#define MT_LOGOCHANGE 0x20
+#define MT_LOGOSTART 0x21
+#define MT_LOGOSTOP 0x22
-#define MT_LOGOCHANGE 0x30
-#define MT_LOGOSTART 0x31
-#define MT_LOGOSTOP 0x32
+#define MT_HBORDERCHANGE 0x30
+#define MT_HBORDERSTART 0x31
+#define MT_HBORDERSTOP 0x32
-#define MT_BORDERCHANGE 0x40
-#define MT_BORDERSTART 0x41
-#define MT_BORDERSTOP 0x42
+#define MT_VBORDERCHANGE 0x40
+#define MT_VBORDERSTART 0x41
+#define MT_VBORDERSTOP 0x42
-#define MT_ASPECTCHANGE 0x50
-#define MT_ASPECTSTART 0x51
-#define MT_ASPECTSTOP 0x52
+#define MT_ASPECTCHANGE 0x50
+#define MT_ASPECTSTART 0x51
+#define MT_ASPECTSTOP 0x52
-#define MT_CHANNELCHANGE 0x60
-#define MT_CHANNELSTART 0x61
-#define MT_CHANNELSTOP 0x62
+#define MT_CHANNELCHANGE 0x60
+#define MT_CHANNELSTART 0x61
+#define MT_CHANNELSTOP 0x62
-#define MT_MOVED 0xE0
-#define MT_ALL 0xFF
+#define MT_MOVED 0xE0
+#define MT_ALL 0xFF
typedef struct config
{
@@ -76,6 +75,7 @@ typedef struct config
bool Before;
bool GenIndex;
bool AC3Always;
+ bool SaveInfo;
} MarkAdConfig;
typedef struct MarkAdPos
@@ -98,8 +98,6 @@ typedef struct MarkAdMark
int ChannelsAfter;
MarkAdAspectRatio AspectRatioBefore;
MarkAdAspectRatio AspectRatioAfter;
- bool VerticalBorders;
- bool Assumed;
} MarkAdMark;
typedef struct MarkAdMarks
diff --git a/command/markad-standalone.cpp b/command/markad-standalone.cpp
index f7abde9..35c2f18 100644
--- a/command/markad-standalone.cpp
+++ b/command/markad-standalone.cpp
@@ -180,15 +180,43 @@ int cOSDMessage::Send(const char *format, ...)
return 0;
}
-void cMarkAdStandalone::CalculateCheckPositions(int startframe, int delta)
+void cMarkAdStandalone::CalculateCheckPositions(int startframe)
{
if (!length) return;
if (!startframe) return;
if (!macontext.Video.Info.FramesPerSecond) return;
+ int delta=macontext.Video.Info.FramesPerSecond*MAXRANGE;
+ int len_in_frames=macontext.Video.Info.FramesPerSecond*length;
+
iStart=-startframe;
- chkLEFT=startframe+delta+macontext.Video.Info.FramesPerSecond;
- chkRIGHT=startframe+(length*macontext.Video.Info.FramesPerSecond);
+ iStop=-(startframe+len_in_frames);
+ chkSTART=-iStart+delta;
+ chkSTOP=-iStop+delta;
+}
+
+void cMarkAdStandalone::CheckStop()
+{
+ dsyslog("checking stop");
+ clMark *end=marks.GetAround(iStop,MT_STOP,0x0F);
+
+ if (end)
+ {
+ marks.DelTill(end->position,false);
+ isyslog("using mark on position %i as stop mark",end->position);
+ }
+ else
+ {
+ //fallback, shouldn't be reached
+ MarkAdMark mark;
+ memset(&mark,0,sizeof(mark));
+ mark.Position=iStart;
+ mark.Type=MT_ASSUMEDSTOP;
+ AddMark(&mark);
+ marks.DelTill(iStop,false);
+ }
+ iStop=0;
+ gotendmark=true;
}
void cMarkAdStandalone::CheckStart()
@@ -239,7 +267,8 @@ void cMarkAdStandalone::CheckStart()
{
if (macontext.Info.DPid.Num)
{
- isyslog("broadcast with DolbyDigital2.0%s",macontext.Config->AC3Always ?
+ isyslog("broadcast with %i audio channels%s",macontext.Info.Channels,
+ macontext.Config->AC3Always ?
"" : ", disabling AC3 decoding");
if (!macontext.Config->AC3Always)
@@ -285,8 +314,10 @@ void cMarkAdStandalone::CheckStart()
{
marks.Del(MT_LOGOSTART);
marks.Del(MT_LOGOSTOP);
- marks.Del(MT_BORDERSTART);
- marks.Del(MT_BORDERSTOP);
+ marks.Del(MT_HBORDERSTART);
+ marks.Del(MT_HBORDERSTOP);
+ marks.Del(MT_VBORDERSTART);
+ marks.Del(MT_VBORDERSTOP);
}
if (!begin)
@@ -296,7 +327,7 @@ void cMarkAdStandalone::CheckStart()
if (begin)
{
marks.DelTill(begin->position);
- CalculateCheckPositions(begin->position,0);
+ CalculateCheckPositions(begin->position);
isyslog("using mark on position %i as start mark",begin->position);
}
else
@@ -308,7 +339,7 @@ void cMarkAdStandalone::CheckStart()
mark.Type=MT_ASSUMEDSTART;
AddMark(&mark);
marks.DelTill(iStart);
- CalculateCheckPositions(iStart,0);
+ CalculateCheckPositions(iStart);
}
iStart=0;
return;
@@ -325,20 +356,29 @@ void cMarkAdStandalone::AddMark(MarkAdMark *Mark)
case MT_ASSUMEDSTART:
if (asprintf(&comment,"assuming start (%i)",Mark->Position)==-1) comment=NULL;
break;
+ case MT_ASSUMEDSTOP:
+ if (asprintf(&comment,"assuming stop (%i)",Mark->Position)==-1) comment=NULL;
+ break;
case MT_LOGOSTART:
if (asprintf(&comment,"detected logo start (%i)*",Mark->Position)==-1) comment=NULL;
break;
case MT_LOGOSTOP:
if (asprintf(&comment,"detected logo stop (%i)",Mark->Position)==-1) comment=NULL;
break;
- case MT_BORDERSTART:
- if (asprintf(&comment,"detected start of %s borders (%i)*",
- Mark->VerticalBorders ? "vert." : "horiz.",
+ case MT_HBORDERSTART:
+ if (asprintf(&comment,"detected start of horiz. borders (%i)*",
+ Mark->Position)==-1) comment=NULL;
+ break;
+ case MT_HBORDERSTOP:
+ if (asprintf(&comment,"detected stop of horiz. borders (%i)",
Mark->Position)==-1) comment=NULL;
break;
- case MT_BORDERSTOP:
- if (asprintf(&comment,"detected stop of %s borders (%i)",
- Mark->VerticalBorders ? "vert." : "horiz.",
+ case MT_VBORDERSTART:
+ if (asprintf(&comment,"detected start of vert. borders (%i)*",
+ Mark->Position)==-1) comment=NULL;
+ break;
+ case MT_VBORDERSTOP:
+ if (asprintf(&comment,"detected stop of vert. borders (%i)",
Mark->Position)==-1) comment=NULL;
break;
case MT_ASPECTSTART:
@@ -866,8 +906,7 @@ bool cMarkAdStandalone::ProcessFile(int Number)
if (!framecnt)
{
- CalculateCheckPositions(tStart*macontext.Video.Info.FramesPerSecond,
- macontext.Video.Info.FramesPerSecond*MAXRANGE);
+ CalculateCheckPositions(tStart*macontext.Video.Info.FramesPerSecond);
}
if (macontext.Config->GenIndex)
@@ -879,13 +918,15 @@ bool cMarkAdStandalone::ProcessFile(int Number)
if (macontext.Video.Info.Pict_Type==MA_I_TYPE)
{
lastiframe=iframe;
- if (iStart<0)
+ if ((iStart<0) && (lastiframe>-iStart)) iStart=lastiframe;
+ if ((iStop<0) && (lastiframe>-iStop)) iStop=lastiframe;
+ if (iStart>0)
{
- if (lastiframe>-iStart) iStart=lastiframe;
+ if ((inBroadCast) && (lastiframe>chkSTART)) CheckStart();
}
- if (iStart>0)
+ if (iStop>0)
{
- if ((inBroadCast) && (lastiframe>chkLEFT)) CheckStart();
+ if (lastiframe>chkSTOP) CheckStop();
}
iframe=framecnt-1;
dRes=true;
@@ -970,8 +1011,7 @@ bool cMarkAdStandalone::Reset(bool FirstPass)
memset(&pkt,0,sizeof(pkt));
- chkLEFT=INT_MAX;
- chkRIGHT=INT_MIN;
+ chkSTART=chkSTOP=INT_MAX;
if (FirstPass)
{
@@ -1008,10 +1048,10 @@ void cMarkAdStandalone::ProcessFile()
{
if (lastiframe)
{
- if ((inBroadCast) && (!gotendmark) && (!tStart))
+ if ((inBroadCast) && (!gotendmark))
{
MarkAdMark tempmark;
- tempmark.Type=MT_COMMONSTOP;
+ tempmark.Type=MT_ASSUMEDSTOP;
tempmark.Position=lastiframe;
AddMark(&tempmark);
}
@@ -1076,7 +1116,7 @@ void cMarkAdStandalone::Process()
}
}
}
- //SaveInfo();
+ if (macontext.Config->SaveInfo) SaveInfo();
}
else
{
@@ -1101,11 +1141,9 @@ bool cMarkAdStandalone::SetFileUID(char *File)
return true;
}
-#if 0
bool cMarkAdStandalone::SaveInfo()
{
- if ((!setVideo43) && (!setVideo169) && (!setAudio20) && (!setAudio51) && (!setVideo43LB)) return true;
-
+ isyslog("writing info file");
char *src,*dst;
if (asprintf(&src,"%s/info%s",directory,isTS ? "" : ".vdr")==-1) return false;
@@ -1117,7 +1155,6 @@ bool cMarkAdStandalone::SaveInfo()
FILE *r,*w;
r=fopen(src,"r");
-
w=fopen(dst,"w+");
if ((!r) || (!w))
@@ -1131,12 +1168,6 @@ bool cMarkAdStandalone::SaveInfo()
char *lline=NULL;
size_t length=0;
- bool setVideo43LB_done=false;
- bool setVideo43_done=false;
- bool setVideo169_done=false;
- bool setAudio20_done=false;
- bool setAudio51_done=false;
-
char lang[4]="";
int component_type_add=0;
@@ -1176,27 +1207,19 @@ bool cMarkAdStandalone::SaveInfo()
case 5:
if (stream==stream_content)
{
- if ( (((type==1) || (type==5)) && (setVideo169)) ||
- (((type==3) || (type==7)) && ((setVideo43) || (setVideo43LB))))
+ if ((macontext.Info.AspectRatio.Num==4) && (macontext.Info.AspectRatio.Den==3))
{
- if (setVideo43)
- {
- if (fprintf(w,"X %i %02i %s 4:3\n",stream_content,
- component_type_43+component_type_add,lang)<=0) err=true;
- setVideo43_done=true;
- }
- if (setVideo43LB)
- {
- if (fprintf(w,"X %i %02i %s 4:3 LetterBox\n",stream_content,
- component_type_43+component_type_add,lang)<=0) err=true;
- setVideo43LB_done=true;
- }
- if (setVideo169)
- {
- if (fprintf(w,"X %i %02i %s 16:9\n",stream_content,
- component_type_169+component_type_add,lang)<=0) err=true;
- setVideo169_done=true;
- }
+ if (fprintf(w,"X %i %02i %s 4:3\n",stream_content,
+ component_type_43+component_type_add,lang)<=0) err=true;
+ macontext.Info.AspectRatio.Num=0;
+ macontext.Info.AspectRatio.Den=0;
+ }
+ else if ((macontext.Info.AspectRatio.Num==16) && (macontext.Info.AspectRatio.Den==9))
+ {
+ if (fprintf(w,"X %i %02i %s 16:9\n",stream_content,
+ component_type_169+component_type_add,lang)<=0) err=true;
+ macontext.Info.AspectRatio.Num=0;
+ macontext.Info.AspectRatio.Den=0;
}
else
{
@@ -1205,22 +1228,22 @@ bool cMarkAdStandalone::SaveInfo()
}
break;
case 2:
- if ((type==5) && ((setAudio51) || (setAudio20)))
+ if (type==5)
{
- if (setAudio51)
+ if (macontext.Info.Channels==6)
{
if (fprintf(w,"X 2 05 %s Dolby Digital 5.1\n",lang)<=0) err=true;
- setAudio51_done=true;
+ macontext.Info.Channels=0;
}
- if (setAudio20)
+ else if (macontext.Info.Channels==2)
{
if (fprintf(w,"X 2 05 %s Dolby Digital 2.0\n",lang)<=0) err=true;
- setAudio20_done=true;
+ macontext.Info.Channels=0;
+ }
+ else
+ {
+ if (fprintf(w,"%s",line)<=0) err=true;
}
- }
- else
- {
- if (fprintf(w,"%s",line)<=0) err=true;
}
break;
default:
@@ -1255,28 +1278,23 @@ bool cMarkAdStandalone::SaveInfo()
if (stream_content)
{
- if ((setVideo43LB) && (!setVideo43LB_done) && (!err))
- {
- if (fprintf(w,"X %i %02i %s 4:3 LetterBox\n",stream_content,
- component_type_43+component_type_add,lang)<=0) err=true;
- }
- if ((setVideo43) && (!setVideo43_done) && (!err))
+ if ((macontext.Info.AspectRatio.Num==4) && (macontext.Info.AspectRatio.Den==3) && (!err))
{
if (fprintf(w,"X %i %02i %s 4:3\n",stream_content,
component_type_43+component_type_add,lang)<=0) err=true;
}
- if ((setVideo169) && (!setVideo169_done) && (!err))
+ if ((macontext.Info.AspectRatio.Num==16) && (macontext.Info.AspectRatio.Den==9) && (!err))
{
if (fprintf(w,"X %i %02i %s 16:9\n",stream_content,
component_type_169+component_type_add,lang)<=0) err=true;
}
}
- if ((setAudio20) && (!setAudio20_done) && (!err))
+ if ((macontext.Info.Channels==2) && (!err))
{
if (fprintf(w,"X 2 05 %s Dolby Digital 2.0\n",lang)<=0) err=true;
}
- if ((setAudio51) && (!setAudio51_done) && (!err))
+ if ((macontext.Info.Channels==6) && (!err))
{
if (fprintf(w,"X 2 05 %s Dolby Digital 5.1\n",lang)<=0) err=true;
}
@@ -1315,7 +1333,6 @@ bool cMarkAdStandalone::SaveInfo()
free(dst);
return (err==false);
}
-#endif
time_t cMarkAdStandalone::GetBroadcastStart(time_t start, int fd)
{
@@ -1891,7 +1908,7 @@ cMarkAdStandalone::cMarkAdStandalone(const char *Directory, const MarkAdConfig *
bDecodeVideo=config->DecodeVideo;
bDecodeAudio=config->DecodeAudio;
- tStart=iStart=0;
+ tStart=iStart=iStop=0;
if ((config->ignoreInfo & IGNORE_VIDEOINFO)==IGNORE_VIDEOINFO)
{
@@ -2000,7 +2017,7 @@ cMarkAdStandalone::cMarkAdStandalone(const char *Directory, const MarkAdConfig *
esyslog("failed loading info - logo %s%sdisabled",
(config->logoExtraction!=-1) ? "extraction" : "detection",
bIgnoreTimerInfo ? " " : " and pre-/post-timer ");
- tStart=iStart=0;
+ tStart=iStart=iStop=0;
}
}
@@ -2069,15 +2086,14 @@ cMarkAdStandalone::cMarkAdStandalone(const char *Directory, const MarkAdConfig *
audio = new cMarkAdAudio(&macontext);
streaminfo = new cMarkAdStreamInfo;
if (macontext.Info.ChannelName)
- dsyslog("channel %s",macontext.Info.ChannelName);
+ isyslog("channel %s",macontext.Info.ChannelName);
}
framecnt=0;
framecnt2=0;
lastiframe=0;
iframe=0;
- chkLEFT=INT_MAX;
- chkRIGHT=INT_MIN;
+ chkSTART=chkSTOP=INT_MAX;
gettimeofday(&tv1,&tz);
}
@@ -2181,6 +2197,8 @@ int usage(int svdrpport)
" make a backup of existing marks\n"
"-G --genindex\n"
" regenerate broken index file\n"
+ "-I --saveinfo\n"
+ " correct information in info file\n"
"-L --extractlogo=<direction>[,width[,height]]\n"
" extracts logo to /tmp as pgm files (must be renamed)\n"
" <direction> 0 = top left, 1 = top right\n"
@@ -2296,6 +2314,7 @@ int main(int argc, char *argv[])
// set defaults
config.DecodeVideo=true;
config.DecodeAudio=true;
+ config.SaveInfo=false;
config.logoExtraction=-1;
config.logoWidth=-1;
config.logoHeight=-1;
@@ -2350,6 +2369,7 @@ int main(int argc, char *argv[])
{"backupmarks", 0, 0, 'B'},
{"scenechangedetection", 0, 0, 'C'},
{"genindex",0, 0, 'G'},
+ {"saveinfo",0, 0, 'I'},
{"extractlogo", 1, 0, 'L'},
{"OSD",0,0,'O' },
{"log2rec",0,0,'R'},
@@ -2360,7 +2380,7 @@ int main(int argc, char *argv[])
{0, 0, 0, 0}
};
- c = getopt_long (argc, argv, "abcd:i:jl:nop:r:s:vBCGL:ORST:V",
+ c = getopt_long (argc, argv, "abcd:i:jl:nop:r:s:vBCGIL:ORST:V",
long_options, &option_index);
if (c == -1)
break;
@@ -2489,6 +2509,10 @@ int main(int argc, char *argv[])
config.GenIndex=true;
break;
+ case 'I':
+ config.SaveInfo=true;
+ break;
+
case 'L':
// --extractlogo
str=optarg;
diff --git a/command/markad-standalone.h b/command/markad-standalone.h
index 50e3b6a..960f7ee 100644
--- a/command/markad-standalone.h
+++ b/command/markad-standalone.h
@@ -24,7 +24,7 @@
#define DELTATIME 20000 /* equals to 222ms (base is 90kHz PTS) */
-#define MAXRANGE 420 /* range to search for start/stop marks in seconds */
+#define MAXRANGE 120 /* range to search for start/stop marks in seconds */
class cOSDMessage
{
@@ -207,7 +207,14 @@ unsigned Descriptor_Length:
time_t startTime; // starttime of broadcast
int length; // length of broadcast in seconds
int tStart; // pretimer in seconds
- int iStart; // pretimer in frames
+ int iStart; // pretimer in frames (negative if unset)
+ int iStop; // endposition in frames (negative if unset)
+
+ void CheckStop();
+ void CheckStart();
+ void CalculateCheckPositions(int startframe);
+ int chkSTART;
+ int chkSTOP;
int skipped; // skipped bytes in whole file
bool inBroadCast; // are we in a broadcast (or ad)?
@@ -219,11 +226,6 @@ unsigned Descriptor_Length:
bool setVideo169; // set video to 16:9 in info
#endif
- void CheckStart();
- void CalculateCheckPositions(int startframe, int delta);
- int chkLEFT;
- int chkRIGHT;
-
time_t GetBroadcastStart(time_t start, int fd);
void CheckIndexGrowing();
char *indexFile;
@@ -242,7 +244,7 @@ unsigned Descriptor_Length:
bool CheckPATPMT(off_t Offset=0);
bool CheckTS();
bool LoadInfo();
- //bool SaveInfo();
+ bool SaveInfo();
bool SetFileUID(char *File);
bool RegenerateIndex();
bool ProcessFile2ndPass(clMark **Mark1, clMark **Mark2, int Number, off_t Offset, int Frame, int Frames);
diff --git a/command/video.cpp b/command/video.cpp
index 6f7081b..5c86838 100644
--- a/command/video.cpp
+++ b/command/video.cpp
@@ -792,7 +792,7 @@ void cMarkAdVideo::resetmarks()
}
bool cMarkAdVideo::addmark(int type, int position, MarkAdAspectRatio *before,
- MarkAdAspectRatio *after, bool verticalborders)
+ MarkAdAspectRatio *after)
{
if (marks.Count>marks.maxCount) return false;
if (before)
@@ -805,7 +805,6 @@ bool cMarkAdVideo::addmark(int type, int position, MarkAdAspectRatio *before,
marks.Number[marks.Count].AspectRatioAfter.Num=after->Num;
marks.Number[marks.Count].AspectRatioAfter.Den=after->Den;
}
- marks.Number[marks.Count].VerticalBorders=verticalborders;
marks.Number[marks.Count].Position=position;
marks.Number[marks.Count].Type=type;
marks.Count++;
@@ -863,17 +862,17 @@ MarkAdMarks *cMarkAdVideo::Process(int FrameNumber, int FrameNumberNext)
}
}
- int borderframenumber;
- int hret=hborder->Process(FrameNumber,&borderframenumber);
+ int hborderframenumber;
+ int hret=hborder->Process(FrameNumber,&hborderframenumber);
- if ((hret>0) && (borderframenumber))
+ if ((hret>0) && (hborderframenumber))
{
- addmark(MT_BORDERSTART,borderframenumber);
+ addmark(MT_HBORDERSTART,hborderframenumber);
}
- if ((hret<0) && (borderframenumber))
+ if ((hret<0) && (hborderframenumber))
{
- addmark(MT_BORDERSTOP,borderframenumber);
+ addmark(MT_HBORDERSTOP,hborderframenumber);
}
if (!macontext->Video.Options.IgnoreAspectRatio)
diff --git a/command/video.h b/command/video.h
index 447d3ec..ae39f20 100644
--- a/command/video.h
+++ b/command/video.h
@@ -167,7 +167,7 @@ private:
void resetmarks();
bool addmark(int type, int position, MarkAdAspectRatio *before=NULL,
- MarkAdAspectRatio *after=NULL, bool verticalborders=false );
+ MarkAdAspectRatio *after=NULL);
bool aspectratiochange(MarkAdAspectRatio &a, MarkAdAspectRatio &b, bool &start);
int framelast;
diff --git a/plugin/markad.cpp b/plugin/markad.cpp
index 3e20207..2818588 100644
--- a/plugin/markad.cpp
+++ b/plugin/markad.cpp
@@ -40,6 +40,8 @@ cPluginMarkAd::cPluginMarkAd(void)
setup.IOPrioClass=1;
setup.Log2Rec=false;
setup.LogoOnly=true;
+ setup.AC3Always=false;
+ setup.SaveInfo=false;
}
cPluginMarkAd::~cPluginMarkAd()
@@ -194,6 +196,7 @@ bool cPluginMarkAd::SetupParse(const char *Name, const char *Value)
else if (!strcasecmp(Name,"AC3Always")) setup.AC3Always=atoi(Value);
else if (!strcasecmp(Name,"Log2Rec")) setup.Log2Rec=atoi(Value);
else if (!strcasecmp(Name,"LogoOnly")) setup.LogoOnly=atoi(Value);
+ else if (!strcasecmp(Name,"SaveInfo")) setup.SaveInfo=atoi(Value);
else return false;
return true;
}
diff --git a/plugin/po/de_DE.po b/plugin/po/de_DE.po
index d7bc92d..58e77f6 100644
--- a/plugin/po/de_DE.po
+++ b/plugin/po/de_DE.po
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2010-12-31 16:41+0100\n"
+"POT-Creation-Date: 2011-02-09 21:30+0100\n"
"PO-Revision-Date: 2009-08-27 14:18+0200\n"
"Last-Translator: Jochen Dolze <vdr@dolze.de>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -78,8 +78,14 @@ msgstr "nur Kanäle mit Logo scannen"
msgid "hdd access priority"
msgstr "HDD-Zugriffspriorität"
-msgid "examine AC3 always"
-msgstr "AC3 immer untersuchen"
+msgid "examine AC3"
+msgstr "AC3 untersuchen"
+
+msgid "when needed"
+msgstr "wenn nötig"
+
+msgid "always"
+msgstr "immer"
msgid "ignore timer margins"
msgstr "Timer Vor-/Nachlauf ignorieren"
@@ -90,6 +96,9 @@ msgstr "erkenne Überlappungen"
msgid "repair index, if broken"
msgstr "kaputte Indexdatei reparieren"
+msgid "correct info file"
+msgstr "Infodatei korrigieren"
+
msgid "OSD message"
msgstr "OSD Meldung"
diff --git a/plugin/po/it_IT.po b/plugin/po/it_IT.po
index 8cef04e..e41a277 100644
--- a/plugin/po/it_IT.po
+++ b/plugin/po/it_IT.po
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2010-12-31 16:41+0100\n"
+"POT-Creation-Date: 2011-02-09 21:30+0100\n"
"PO-Revision-Date: 2010-08-09 20:05+0100\n"
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -81,7 +81,13 @@ msgstr ""
msgid "hdd access priority"
msgstr ""
-msgid "examine AC3 always"
+msgid "examine AC3"
+msgstr ""
+
+msgid "when needed"
+msgstr ""
+
+msgid "always"
msgstr ""
msgid "ignore timer margins"
@@ -93,6 +99,9 @@ msgstr ""
msgid "repair index, if broken"
msgstr "Ripara indice, se errato"
+msgid "correct info file"
+msgstr ""
+
msgid "OSD message"
msgstr "Messaggio OSD"
diff --git a/plugin/setup.cpp b/plugin/setup.cpp
index f67b4c6..feb1e70 100644
--- a/plugin/setup.cpp
+++ b/plugin/setup.cpp
@@ -25,6 +25,7 @@ cSetupMarkAd::cSetupMarkAd(struct setup *Setup)
ac3always=setup->AC3Always;
log2rec=setup->Log2Rec;
logoonly=setup->LogoOnly;
+ saveinfo=setup->SaveInfo;
processTexts[0]=tr("after");
processTexts[1]=tr("during");
@@ -53,11 +54,11 @@ void cSetupMarkAd::write(void)
Add(new cMenuEditBoolItem(tr("scan only channels with logo"),&logoonly),true);
lpos=Current();
Add(new cMenuEditStraItem(tr("hdd access priority"),&ioprioclass,3,ioprioTexts));
- Add(new cMenuEditBoolItem(tr("examine AC3 always"),&ac3always));
+ Add(new cMenuEditBoolItem(tr("examine AC3"),&ac3always,tr("when needed"),tr("always")));
Add(new cMenuEditBoolItem(tr("ignore timer margins"),&nomargins));
Add(new cMenuEditBoolItem(tr("detect overlaps"),&secondpass));
- Add(new cOsdItem("",osUnknown,false));
Add(new cMenuEditBoolItem(tr("repair index, if broken"),&genindex));
+ Add(new cMenuEditBoolItem(tr("correct info file"),&saveinfo));
Add(new cMenuEditBoolItem(tr("OSD message"),&osdmsg));
Add(new cMenuEditBoolItem(tr("backup marks"),&backupmarks));
Add(new cMenuEditBoolItem(tr("verbose logging"),&verbose));
@@ -129,6 +130,7 @@ void cSetupMarkAd::Store(void)
SetupStore("AC3Always",ac3always);
SetupStore("Log2Rec",log2rec);
SetupStore("LogoOnly",logoonly);
+ SetupStore("SaveInfo",saveinfo);
setup->ProcessDuring=(bool) processduring;
setup->whileRecording=(bool) whilerecording;
@@ -144,6 +146,7 @@ void cSetupMarkAd::Store(void)
setup->AC3Always=ac3always;
setup->Log2Rec=log2rec;
setup->LogoOnly=logoonly;
+ setup->SaveInfo=saveinfo;
}
#define CHNUMWIDTH (numdigits(Channels.MaxNumber())+1)
diff --git a/plugin/setup.h b/plugin/setup.h
index 0080dfc..c5bf0e2 100644
--- a/plugin/setup.h
+++ b/plugin/setup.h
@@ -22,6 +22,7 @@ struct setup
bool NoMargins;
bool SecondPass;
bool AC3Always;
+ bool SaveInfo;
bool HideMainMenuEntry;
bool Log2Rec;
bool LogoOnly;
@@ -49,6 +50,7 @@ private:
int ac3always;
int log2rec;
int logoonly;
+ int saveinfo;
void write(void);
int lpos;
protected:
diff --git a/plugin/status.cpp b/plugin/status.cpp
index 21be601..1ff6092 100644
--- a/plugin/status.cpp
+++ b/plugin/status.cpp
@@ -71,10 +71,11 @@ bool cStatusMarkAd::Start(const char *FileName, const char *Name, const bool Dir
{
if ((Direct) && (Get(FileName)!=-1)) return false;
- cString cmd = cString::sprintf("\"%s\"/markad %s%s%s%s%s%s%s%s -r %i -l \"%s\" %s \"%s\"",
+ cString cmd = cString::sprintf("\"%s\"/markad %s%s%s%s%s%s%s%s%s -r %i -l \"%s\" %s \"%s\"",
bindir,
setup->Verbose ? " -v " : "",
setup->BackupMarks ? " -B " : "",
+ setup->SaveInfo ? " -I " : "",
setup->GenIndex ? " -G " : "",
setup->OSDMessage ? " -O " : "",
setup->NoMargins ? " -i 4 " : "",