From a04233bf29bc24389ad08d387bf22a3d84d946a5 Mon Sep 17 00:00:00 2001 From: Jochen Dolze Date: Sat, 19 Feb 2011 19:09:10 +0100 Subject: Added missing includes (closes #570) Added code to detect small logo gaps (#567) Added description for --logleve and --nopid (closes #556) Added spanish logos (closes #553 and #566) --- command/markad-standalone.cpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'command/markad-standalone.cpp') diff --git a/command/markad-standalone.cpp b/command/markad-standalone.cpp index 2672e65..abf820b 100644 --- a/command/markad-standalone.cpp +++ b/command/markad-standalone.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include "markad-standalone.h" @@ -198,7 +199,7 @@ void cMarkAdStandalone::CalculateCheckPositions(int startframe) void cMarkAdStandalone::CheckStop() { dsyslog("checking stop"); - int delta=(chkSTOP-iStop)+macontext.Video.Info.FramesPerSecond*(MAXRANGE+60); + int delta=macontext.Video.Info.FramesPerSecond*MAXRANGE; clMark *end=marks.GetAround(delta,iStop,MT_STOP,0x0F); if (end) @@ -453,6 +454,23 @@ void cMarkAdStandalone::AddMark(MarkAdMark *Mark) clMark *prev=marks.GetLast(); if (prev) { + if ((Mark->Type==MT_LOGOSTART) && (!iStart)) + { + if (prev->type==MT_LOGOSTOP) + { + int MARKDIFF=(int) (macontext.Video.Info.FramesPerSecond*30); + if ((Mark->Position-prev->position)Position-prev->position)/macontext.Video.Info.FramesPerSecond; + isyslog("mark distance too short (%.1fs), deleting %i,%i",distance, + prev->position,Mark->Position); + if ((prev->type & 0x0F)==MT_START) inBroadCast=false; + marks.Del(prev); + return; + } + } + } + if ((prev->type & 0x0F)==(Mark->Type & 0x0F)) { int MARKDIFF=(int) (macontext.Video.Info.FramesPerSecond*30); @@ -2175,8 +2193,13 @@ int usage(int svdrpport) " (default is the number of cpus)\n" "-V --version\n" " print version-info and exit\n" + " --loglevel=\n" + " sets loglevel to the specified value\n" + " 1=error 2=info 3=debug 4=trace\n" " --markfile=\n" " set a different markfile-name\n" + " --nopid\n" + " disables creation of markad.pid file in recdir\n" " --online[=1|2] (default is 1)\n" " start markad immediately when called with \"before\" as cmd\n" " if online is 1, markad starts online for live-recordings\n" -- cgit v1.2.3