From faccdbdac791a6d5277485f75a69f2c9264b4f7a Mon Sep 17 00:00:00 2001 From: Jochen Dolze Date: Fri, 31 Dec 2010 16:47:19 +0100 Subject: Added new plugin option 'scan channel with logos only' Abort markad if timer gets deleted by user (reported by Mase) New logo DAS-VIERTE --- command/logos/DAS_VIERTE-A16_9-P0.pgm | Bin 0 -> 15644 bytes command/markad-standalone.cpp | 31 ++++++++++++++++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 command/logos/DAS_VIERTE-A16_9-P0.pgm (limited to 'command') diff --git a/command/logos/DAS_VIERTE-A16_9-P0.pgm b/command/logos/DAS_VIERTE-A16_9-P0.pgm new file mode 100644 index 0000000..ed9e214 Binary files /dev/null and b/command/logos/DAS_VIERTE-A16_9-P0.pgm differ diff --git a/command/markad-standalone.cpp b/command/markad-standalone.cpp index 73524d1..409afc6 100644 --- a/command/markad-standalone.cpp +++ b/command/markad-standalone.cpp @@ -356,14 +356,6 @@ void cMarkAdStandalone::CheckStartStop(int frame, bool checkend) int MARKDIFF=length/6; if (MARKDIFF>MAXRANGE) MARKDIFF=MAXRANGE; MARKDIFF=(int) (MARKDIFF*macontext.Video.Info.FramesPerSecond); -#if 0 - clMark *before_iStart=marks.GetPrev(iStart,MT_START,0xF); - if (before_iStart) - { - int tmpdiff=abs(iStart-before_iStart->position); - if (tmpdiffType==MT_CHANNELSTOP) + { + clMark *prev=marks.GetPrev(Mark->Position,MT_CHANNELSTART); + if (prev) + { + int MARKDIFF=(int) (macontext.Video.Info.FramesPerSecond*240); + if ((Mark->Position-prev->position)Comment) isyslog("%s",Mark->Comment); + double distance=(Mark->Position-prev->position)/macontext.Video.Info.FramesPerSecond; + isyslog("channel distance too short (%.1fs), deleting (%i,%i)",distance, + prev->position,Mark->Position); + marks.Del(prev); + return; + } + } + } + if (Mark->Type==MT_LOGOSTOP) { // check if last mark is an audiochannel stop @@ -839,6 +849,7 @@ bool cMarkAdStandalone::CheckIndexGrowing() #define WAITTIME 15 if (!indexFile) return false; + if (macontext.Config->logoExtraction!=-1) return false; if (sleepcnt>=2) return false; // we already slept too much bool notenough=true; @@ -1596,7 +1607,8 @@ void cMarkAdStandalone::Process() else { // this shouldn't be reached - esyslog("ALERT: stopping before end of broadcast"); + if (!macontext.Config->logoExtraction!=-1) + esyslog("ALERT: stopping before end of broadcast"); } } } @@ -1926,6 +1938,7 @@ bool cMarkAdStandalone::LoadInfo() { if (macontext.Info.ChannelName[i]==' ') macontext.Info.ChannelName[i]='_'; if (macontext.Info.ChannelName[i]=='.') macontext.Info.ChannelName[i]='_'; + if (macontext.Info.ChannelName[i]=='/') macontext.Info.ChannelName[i]='_'; } } } -- cgit v1.2.3