diff options
author | Jochen Dolze <vdr@dolze.de> | 2011-02-19 19:09:10 +0100 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2011-02-19 19:09:10 +0100 |
commit | a04233bf29bc24389ad08d387bf22a3d84d946a5 (patch) | |
tree | e8d190ea374e92e3f01099b8a7aaad4a9416778c /command/markad-standalone.cpp | |
parent | 1da9e63c101c81aed8e30f996570a0bccf5385bf (diff) | |
download | vdr-plugin-markad-a04233bf29bc24389ad08d387bf22a3d84d946a5.tar.gz vdr-plugin-markad-a04233bf29bc24389ad08d387bf22a3d84d946a5.tar.bz2 |
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)
Diffstat (limited to 'command/markad-standalone.cpp')
-rw-r--r-- | command/markad-standalone.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
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 <mntent.h> #include <utime.h> #include <math.h> +#include <limits.h> #include <errno.h> #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)<MARKDIFF) + { + double distance=(Mark->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=<level>\n" + " sets loglevel to the specified value\n" + " <level> 1=error 2=info 3=debug 4=trace\n" " --markfile=<markfilename>\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" |