diff options
author | Jochen Dolze <vdr@dolze.de> | 2011-01-01 16:01:45 +0100 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2011-01-01 16:01:45 +0100 |
commit | 703a0f198a0756c0532ac4ec9a884d99a058c904 (patch) | |
tree | a539ada4c01e9224768c371a34a920617d3e5ce3 /command/markad-standalone.cpp | |
parent | faccdbdac791a6d5277485f75a69f2c9264b4f7a (diff) | |
download | vdr-plugin-markad-703a0f198a0756c0532ac4ec9a884d99a058c904.tar.gz vdr-plugin-markad-703a0f198a0756c0532ac4ec9a884d99a058c904.tar.bz2 |
Changed detection of short audio channel changes
Diffstat (limited to 'command/markad-standalone.cpp')
-rw-r--r-- | command/markad-standalone.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/command/markad-standalone.cpp b/command/markad-standalone.cpp index 409afc6..20fc530 100644 --- a/command/markad-standalone.cpp +++ b/command/markad-standalone.cpp @@ -578,13 +578,6 @@ void cMarkAdStandalone::AddMark(MarkAdMark *Mark) bool loggedAlready=false; - clMark *old=marks.Get(Mark->Position); - if ((old) && (((old->type & 0xF0)==MT_ASPECTCHANGE) || ((old->type & 0xF0)==MT_CHANNELCHANGE))) - { - // Aspect- / Channelchange wins over Logo/Border - return; - } - if (Mark->Type==MT_ASPECTSTOP) { // check if last mark is an stop mark in short distance @@ -618,12 +611,12 @@ void cMarkAdStandalone::AddMark(MarkAdMark *Mark) } } - if (Mark->Type==MT_CHANNELSTOP) + if (Mark->Type==MT_CHANNELSTART) { - clMark *prev=marks.GetPrev(Mark->Position,MT_CHANNELSTART); + clMark *prev=marks.GetPrev(Mark->Position,MT_CHANNELSTOP); if (prev) { - int MARKDIFF=(int) (macontext.Video.Info.FramesPerSecond*240); + int MARKDIFF=(int) macontext.Video.Info.FramesPerSecond; if ((Mark->Position-prev->position)<MARKDIFF) { if (Mark->Comment) isyslog("%s",Mark->Comment); @@ -636,6 +629,13 @@ void cMarkAdStandalone::AddMark(MarkAdMark *Mark) } } + clMark *old=marks.Get(Mark->Position); + if ((old) && (((old->type & 0xF0)==MT_ASPECTCHANGE) || ((old->type & 0xF0)==MT_CHANNELCHANGE))) + { + // Aspect- / Channelchange wins over Logo/Border + return; + } + if (Mark->Type==MT_LOGOSTOP) { // check if last mark is an audiochannel stop @@ -1879,8 +1879,11 @@ time_t cMarkAdStandalone::GetBroadcastStart(time_t start, int fd) // (and hope info.vdr has not changed after the start of the recording) if (fstat(fd,&statbuf)!=-1) { - isyslog("getting broadcast start from info mtime"); - if (fabs(difftime(start,statbuf.st_mtime))<1800) return (time_t) statbuf.st_mtime; + if (fabs(difftime(start,statbuf.st_mtime))<1800) + { + isyslog("getting broadcast start from info mtime"); + return (time_t) statbuf.st_mtime; + } } // fallback to the directory -> worst starttime we can use! |