[vdr-plugin-markad] 01/07: Imported Upstream version 0.1.4+git20160709

Tobias Grimm tiber-guest at moszumanska.debian.org
Sat Jul 9 18:42:21 UTC 2016


This is an automated email from the git hooks/post-receive script.

tiber-guest pushed a commit to branch master
in repository vdr-plugin-markad.

commit d7ec9afd7b15ae4fa5d574eb63bca80921cc8bb9
Author: Tobias Grimm <git at e-tobi.net>
Date:   Sat Jul 9 20:29:28 2016 +0200

    Imported Upstream version 0.1.4+git20160709
---
 command/decoder.cpp                                |   2 ++
 command/global.h                                   |   4 +++
 command/logos/Comedy_Central_VIVA-A16_9-P0.pgm     | Bin 0 -> 9714 bytes
 command/logos/Disney_Channel-A16_9-P0.pgm          | Bin 20180 -> 9618 bytes
 command/logos/Disney_Channel_HD-A4_3-P0.pgm        |   6 ++--
 command/logos/Fox_Serie-A16_9-P0.pgm               | Bin 19219 -> 7818 bytes
 ...l_HD-A4_3-P0.pgm => NICKELODEON_HD-A4_3-P0.pgm} |   4 +--
 command/markad-standalone.cpp                      |  36 ++++++++++++++++++---
 command/video.cpp                                  |   4 ++-
 9 files changed, 45 insertions(+), 11 deletions(-)

diff --git a/command/decoder.cpp b/command/decoder.cpp
index cbd8055..a75f08f 100644
--- a/command/decoder.cpp
+++ b/command/decoder.cpp
@@ -102,6 +102,7 @@ fail:
 }
 #endif
 
+#if LIBAVCODEC_VERSION_INT < ((55<<16)+(18<<8)+102)
 #ifndef AV_CODEC_ID_H264
 #define AV_CODEC_ID_H264 CODEC_ID_H264
 #endif
@@ -114,6 +115,7 @@ fail:
 #ifndef AV_CODEC_ID_NONE
 #define AV_CODEC_ID_NONE CODEC_ID_NONE
 #endif
+#endif
 
 cMarkAdDecoder::cMarkAdDecoder(bool useH264, int Threads)
 {
diff --git a/command/global.h b/command/global.h
index 116fc4d..22cee6a 100644
--- a/command/global.h
+++ b/command/global.h
@@ -166,6 +166,10 @@ typedef struct MarkAdContext
 
     struct Audio
     {
+        struct Options
+        {
+            bool IgnoreDolbyDetection;
+        } Options;
         struct Info
         {
             int Channels; // number of audio channels
diff --git a/command/logos/Comedy_Central_VIVA-A16_9-P0.pgm b/command/logos/Comedy_Central_VIVA-A16_9-P0.pgm
new file mode 100644
index 0000000..2b8afa7
Binary files /dev/null and b/command/logos/Comedy_Central_VIVA-A16_9-P0.pgm differ
diff --git a/command/logos/Disney_Channel-A16_9-P0.pgm b/command/logos/Disney_Channel-A16_9-P0.pgm
index a97ae87..c4b56c5 100644
Binary files a/command/logos/Disney_Channel-A16_9-P0.pgm and b/command/logos/Disney_Channel-A16_9-P0.pgm differ
diff --git a/command/logos/Disney_Channel_HD-A4_3-P0.pgm b/command/logos/Disney_Channel_HD-A4_3-P0.pgm
index 55b70c1..0a0d58e 100644
--- a/command/logos/Disney_Channel_HD-A4_3-P0.pgm
+++ b/command/logos/Disney_Channel_HD-A4_3-P0.pgm
@@ -1,5 +1,5 @@
 P5
-#C0
-314 207
+#D0
+229 141
 255
-������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ [...]
\ No newline at end of file
+������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ [...]
\ No newline at end of file
diff --git a/command/logos/Fox_Serie-A16_9-P0.pgm b/command/logos/Fox_Serie-A16_9-P0.pgm
index e3b528b..4690518 100644
Binary files a/command/logos/Fox_Serie-A16_9-P0.pgm and b/command/logos/Fox_Serie-A16_9-P0.pgm differ
diff --git a/command/logos/Disney_Channel_HD-A4_3-P0.pgm b/command/logos/NICKELODEON_HD-A4_3-P0.pgm
similarity index 59%
copy from command/logos/Disney_Channel_HD-A4_3-P0.pgm
copy to command/logos/NICKELODEON_HD-A4_3-P0.pgm
index 55b70c1..66ca15f 100644
--- a/command/logos/Disney_Channel_HD-A4_3-P0.pgm
+++ b/command/logos/NICKELODEON_HD-A4_3-P0.pgm
@@ -1,5 +1,5 @@
 P5
 #C0
-314 207
+316 149
 255
-������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ [...]
\ No newline at end of file
+������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ [...]
\ No newline at end of file
diff --git a/command/markad-standalone.cpp b/command/markad-standalone.cpp
index 4ca71cd..498c6df 100644
--- a/command/markad-standalone.cpp
+++ b/command/markad-standalone.cpp
@@ -239,7 +239,8 @@ void cMarkAdStandalone::CalculateCheckPositions(int startframe)
     iStart=-startframe;
     iStop=-(startframe+len_in_frames);
     iStopA=-(startframe+len_in_framesA);
-    chkSTART=-iStart+delta;
+    chkSTART=-iStart+(1.1*delta);
+    dsyslog("chkSTART set to %i",chkSTART);
     chkSTOP=-iStop+(3*delta);
 }
 
@@ -321,7 +322,7 @@ void cMarkAdStandalone::CheckStart()
 
     macontext.Info.Channels=macontext.Audio.Info.Channels;
     if (macontext.Config->DecodeAudio) {
-        if (macontext.Info.Channels==6)
+        if ((macontext.Info.Channels==6) && (macontext.Audio.Options.IgnoreDolbyDetection==false))
         {
             isyslog("DolbyDigital5.1 audio detected. logo/border/aspect detection disabled");
             bDecodeVideo=false;
@@ -336,7 +337,7 @@ void cMarkAdStandalone::CheckStart()
         {
             if (macontext.Info.DPid.Num)
             {
-                if (macontext.Info.Channels)
+                if ((macontext.Info.Channels) && (macontext.Audio.Options.IgnoreDolbyDetection==false))
                     isyslog("broadcast with %i audio channels, disabling AC3 decoding",macontext.Info.Channels);
                 macontext.Info.DPid.Num=0;
                 demux->DisableDPid();
@@ -371,6 +372,11 @@ void cMarkAdStandalone::CheckStart()
                 (macontext.Video.Info.AspectRatio.Den==3))
         {
             bDecodeVideo=false;
+            if (macontext.Info.Channels==6) {
+                macontext.Video.Options.IgnoreAspectRatio=false;
+                macontext.Info.DPid.Num=0;
+                demux->DisableDPid();
+            }
             macontext.Video.Options.IgnoreLogoDetection=true;
             marks.Del(MT_CHANNELSTART);
             marks.Del(MT_CHANNELSTOP);
@@ -518,6 +524,25 @@ void cMarkAdStandalone::AddMark(MarkAdMark *Mark)
 
     if (comment) isyslog("%s",comment);
 
+    if ((Mark->Type==MT_LOGOSTART) && (!iStart) && (Mark->Position<abs(iStop)))
+    {
+        clMark *prev=marks.GetPrev(Mark->Position,MT_LOGOSTOP);
+        if (prev)
+        {
+            int MARKDIFF=(int) (macontext.Video.Info.FramesPerSecond*10);
+            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 (!macontext.Video.Options.WeakMarksOk) inBroadCast=false;
+                marks.Del(prev);
+                if (comment) free(comment);
+                return;
+            }
+        }
+    }    
+    
     if (((Mark->Type & 0x0F)==MT_STOP) && (!iStart) && (Mark->Position<abs(iStop)))
     {
         clMark *prev=marks.GetPrev(Mark->Position,(Mark->Type & 0xF0)|MT_START);
@@ -526,7 +551,7 @@ void cMarkAdStandalone::AddMark(MarkAdMark *Mark)
             int MARKDIFF;
             if ((Mark->Type & 0xF0)==MT_LOGOCHANGE)
             {
-                MARKDIFF=(int) (macontext.Video.Info.FramesPerSecond*240);
+                MARKDIFF=(int) (macontext.Video.Info.FramesPerSecond*180);
             }
             else
             {
@@ -647,7 +672,7 @@ void cMarkAdStandalone::CheckIndexGrowing()
                     if (time(NULL)>(startTime+(time_t) length))
                     {
                         // "old" recording
-                        dsyslog("assuming old recording, now>startTime+length");
+                        tsyslog("assuming old recording, now>startTime+length");
                         return;
                     }
                     else
@@ -673,6 +698,7 @@ void cMarkAdStandalone::CheckIndexGrowing()
                     errno=0;
                     unsigned int ret=sleep(sleeptime); // now we sleep and hopefully the index will grow
                     if ((errno) && (ret)) {
+                        if (abort) return;
                         esyslog("got errno %i while waiting for new data",errno);
                         if (errno!=EINTR) return;
                     }
diff --git a/command/video.cpp b/command/video.cpp
index 1cfbd37..b828c0c 100644
--- a/command/video.cpp
+++ b/command/video.cpp
@@ -84,11 +84,13 @@ int cMarkAdLogo::Load(const char *directory, char *file, int plane)
     }
 
     int width,height;
-    if (fscanf(pFile, "P5\n#C%1i %4i\n%3d %3d\n255\n#", &area.corner,&area.mpixel[plane],&width,&height)!=4)
+    char c;
+    if (fscanf(pFile, "P5\n#%1c%1i %4i\n%3d %3d\n255\n#", &c,&area.corner,&area.mpixel[plane],&width,&height)!=5)
     {
         fclose(pFile);
         return -2;
     }
+    if (c=='D') macontext->Audio.Options.IgnoreDolbyDetection=true;
 
     if (height==255)
     {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vdr-dvb/vdr-plugin-markad.git



More information about the pkg-vdr-dvb-changes mailing list