summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2011-04-03 12:49:53 (GMT)
committerJochen Dolze <vdr@dolze.de>2011-04-03 12:49:53 (GMT)
commit0b6cc044f9f44af88d8f115204cdae0b7dddd23c (patch)
tree27b6e650529f2ad06db6caad6fb18e2017d82a57
parent6adc2d76929fb8549689080c3510d3ff926ef4d2 (diff)
downloadvdr-plugin-markad-0b6cc044f9f44af88d8f115204cdae0b7dddd23c.tar.gz
vdr-plugin-markad-0b6cc044f9f44af88d8f115204cdae0b7dddd23c.tar.bz2
Fixed another bug in handling ts files ("demux error")v0.1.2
Limited logo extraction to 1000 frames Added more finnish logos Added czech translation
-rw-r--r--HISTORY7
-rw-r--r--command/logos/Jim-A16_9-P0.pgmbin0 -> 19219 bytes
-rw-r--r--command/logos/MTV3_Juniori-A16_9-P0.pgmbin0 -> 19219 bytes
-rw-r--r--command/logos/The_Voice_TV_Viisi-A16_9-P0.pgmbin0 -> 19219 bytes
-rw-r--r--command/logos/The_Voice_TV_Viisi-A4_3-P0.pgmbin0 -> 19219 bytes
-rw-r--r--command/logos/YLE_TV1-A16_9-P0.pgmbin0 -> 19219 bytes
-rw-r--r--command/logos/YLE_TV2-A16_9-P0.pgmbin0 -> 19219 bytes
-rw-r--r--command/logos/YLE_TV2-A4_3-P0.pgmbin0 -> 19219 bytes
-rw-r--r--command/markad-standalone.cpp55
-rw-r--r--command/markad-standalone.h1
-rw-r--r--command/po/cs_CZ.po23
-rw-r--r--plugin/po/fi_FI.po105
-rw-r--r--version.h2
13 files changed, 172 insertions, 21 deletions
diff --git a/HISTORY b/HISTORY
index 3d15a5a..973dd51 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,5 +1,12 @@
VDR Plugin 'markad' Revision History
----------------------------------
+2010-04-03: Version 0.1.2
+
+- Fixed another bug in handling ts files ("demux error")
+- Limited logo extraction to 1000 frames
+- Added more finnish logos
+- Added czech translation
+
2011-03-20: Version 0.1.1
- Fixed bug in handling ts files ("demux error")
diff --git a/command/logos/Jim-A16_9-P0.pgm b/command/logos/Jim-A16_9-P0.pgm
new file mode 100644
index 0000000..550ee45
--- /dev/null
+++ b/command/logos/Jim-A16_9-P0.pgm
Binary files differ
diff --git a/command/logos/MTV3_Juniori-A16_9-P0.pgm b/command/logos/MTV3_Juniori-A16_9-P0.pgm
new file mode 100644
index 0000000..182e565
--- /dev/null
+++ b/command/logos/MTV3_Juniori-A16_9-P0.pgm
Binary files differ
diff --git a/command/logos/The_Voice_TV_Viisi-A16_9-P0.pgm b/command/logos/The_Voice_TV_Viisi-A16_9-P0.pgm
new file mode 100644
index 0000000..6e74a85
--- /dev/null
+++ b/command/logos/The_Voice_TV_Viisi-A16_9-P0.pgm
Binary files differ
diff --git a/command/logos/The_Voice_TV_Viisi-A4_3-P0.pgm b/command/logos/The_Voice_TV_Viisi-A4_3-P0.pgm
new file mode 100644
index 0000000..5efc1bb
--- /dev/null
+++ b/command/logos/The_Voice_TV_Viisi-A4_3-P0.pgm
Binary files differ
diff --git a/command/logos/YLE_TV1-A16_9-P0.pgm b/command/logos/YLE_TV1-A16_9-P0.pgm
new file mode 100644
index 0000000..063d7b3
--- /dev/null
+++ b/command/logos/YLE_TV1-A16_9-P0.pgm
Binary files differ
diff --git a/command/logos/YLE_TV2-A16_9-P0.pgm b/command/logos/YLE_TV2-A16_9-P0.pgm
new file mode 100644
index 0000000..0445bd8
--- /dev/null
+++ b/command/logos/YLE_TV2-A16_9-P0.pgm
Binary files differ
diff --git a/command/logos/YLE_TV2-A4_3-P0.pgm b/command/logos/YLE_TV2-A4_3-P0.pgm
new file mode 100644
index 0000000..cefeb1e
--- /dev/null
+++ b/command/logos/YLE_TV2-A4_3-P0.pgm
Binary files differ
diff --git a/command/markad-standalone.cpp b/command/markad-standalone.cpp
index c2dc261..1ec9b7a 100644
--- a/command/markad-standalone.cpp
+++ b/command/markad-standalone.cpp
@@ -361,10 +361,35 @@ void cMarkAdStandalone::CheckStart()
return;
}
+void cMarkAdStandalone::CheckLogoMarks()
+{
+ clMark *mark=marks.GetFirst();
+ while (mark)
+ {
+ if ((mark->type==MT_LOGOSTOP) && mark->Next() && mark->Next()->type==MT_LOGOSTART)
+ {
+ int MARKDIFF=(int) (macontext.Video.Info.FramesPerSecond*30);
+ if (abs(mark->Next()->position-mark->position)<=MARKDIFF)
+ {
+ double distance=(mark->Next()->position-mark->position)/macontext.Video.Info.FramesPerSecond;
+ isyslog("mark distance too short (%.1fs), deleting %i,%i",distance,
+ mark->position,mark->Next()->position);
+ clMark *tmp=mark;
+ mark=mark->Next()->Next();
+ marks.Del(tmp->Next());
+ marks.Del(tmp);
+ continue;
+ }
+ }
+ mark=mark->Next();
+ }
+}
+
void cMarkAdStandalone::AddMark(MarkAdMark *Mark)
{
if (!Mark) return;
if (!Mark->Type) return;
+ if ((macontext.Config) && (macontext.Config->logoExtraction!=-1)) return;
if (gotendmark) return;
char *comment=NULL;
@@ -439,7 +464,7 @@ void cMarkAdStandalone::AddMark(MarkAdMark *Mark)
if (comment) isyslog("%s",comment);
- if ((Mark->Type & 0x0F)==MT_STOP)
+ if (((Mark->Type & 0x0F)==MT_STOP) && (!iStart) && (Mark->Position<abs(iStop)))
{
clMark *prev=marks.GetPrev(Mark->Position,(Mark->Type & 0xF0)|MT_START);
if (prev)
@@ -458,7 +483,7 @@ void cMarkAdStandalone::AddMark(MarkAdMark *Mark)
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) && (!macontext.Video.Options.WeakMarksOk)) inBroadCast=false;
+ if (!macontext.Video.Options.WeakMarksOk) inBroadCast=false;
marks.Del(prev);
if (comment) free(comment);
return;
@@ -469,24 +494,6 @@ void cMarkAdStandalone::AddMark(MarkAdMark *Mark)
clMark *prev=marks.GetLast();
if (prev)
{
- if ((Mark->Type==MT_LOGOSTART) && (!iStart) && (Mark->Position<abs(iStop)))
- {
- 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) && (!macontext.Video.Options.WeakMarksOk)) inBroadCast=false;
- marks.Del(prev);
- if (comment) free(comment);
- return;
- }
- }
- }
-
if ((prev->type & 0x0F)==(Mark->Type & 0x0F))
{
int MARKDIFF=(int) (macontext.Video.Info.FramesPerSecond*30);
@@ -968,6 +975,13 @@ bool cMarkAdStandalone::ProcessFile(int Number)
marks.WriteIndex(directory,isTS,demux->Offset(),macontext.Video.Info.Pict_Type,Number);
}
framecnt++;
+ if ((macontext.Config->logoExtraction!=-1) && (framecnt>=1000))
+ {
+ isyslog("finished logo extraction");
+ abort=true;
+ if (f!=-1) close(f);
+ return true;
+ }
if (macontext.Video.Info.Pict_Type==MA_I_TYPE)
{
@@ -1100,6 +1114,7 @@ void cMarkAdStandalone::ProcessFile()
if (!abort)
{
+ CheckLogoMarks();
if (iStop>0) CheckStop(); // no stopmark till now?
if ((inBroadCast) && (!gotendmark) && (lastiframe))
{
diff --git a/command/markad-standalone.h b/command/markad-standalone.h
index b87422e..cacbd0d 100644
--- a/command/markad-standalone.h
+++ b/command/markad-standalone.h
@@ -236,6 +236,7 @@ unsigned Descriptor_Length:
bool CheckPATPMT(off_t Offset=0);
bool CheckTS();
bool CheckLogo();
+ void CheckLogoMarks();
bool LoadInfo();
bool SaveInfo();
bool SetFileUID(char *File);
diff --git a/command/po/cs_CZ.po b/command/po/cs_CZ.po
new file mode 100644
index 0000000..be08408
--- /dev/null
+++ b/command/po/cs_CZ.po
@@ -0,0 +1,23 @@
+# This file is distributed under the same license as the markad package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: markad\n"
+"Report-Msgid-Bugs-To: <see README>\n"
+"POT-Creation-Date: 2010-05-27 15:32+0200\n"
+"PO-Revision-Date: 2011-03-01 20:30+0100\n"
+"Last-Translator: jiri dobry <jdobry@centrum.cz>\n"
+"Language-Team: <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "starting markad for"
+msgstr "start hledání reklamy pro"
+
+msgid "markad aborted for"
+msgstr "vyhledávání reklamy zrušeno pro"
+
+msgid "markad finished for"
+msgstr "vyhledávání reklamy skončilo pro"
+
diff --git a/plugin/po/fi_FI.po b/plugin/po/fi_FI.po
new file mode 100644
index 0000000..f9e1eb9
--- /dev/null
+++ b/plugin/po/fi_FI.po
@@ -0,0 +1,105 @@
+# This file is distributed under the same license as the markad package.
+# Rolf Ahrenberg, 2011
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: vdr\n"
+"Report-Msgid-Bugs-To: <see README>\n"
+"POT-Creation-Date: 2011-03-21 22:32+0100\n"
+"PO-Revision-Date: 2011-02-27 02:27+0200\n"
+"Last-Translator: Rolf Ahrenberg\n"
+"Language-Team: Finnish <vdr@linuxtv.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: fi\n"
+
+msgid "markad still running"
+msgstr "Mainosten merkintä yhä aktiivinen"
+
+msgid "markad status"
+msgstr "Mainosten merkintä"
+
+msgid "running"
+msgstr "aktiivinen"
+
+msgid "sleeping"
+msgstr "nukkumassa"
+
+msgid "inactive"
+msgstr "ei aktiivinen"
+
+msgid "zombie"
+msgstr "zombie"
+
+msgid "stopped"
+msgstr "pysäytetty"
+
+msgid "unknown"
+msgstr "tuntematon"
+
+msgid "Recording\t Status"
+msgstr "Tallenne\t Status"
+
+msgid "no running markad found"
+msgstr "ei aktiivisia tehtäviä"
+
+msgid "Pause"
+msgstr "Pysäytä"
+
+msgid "Continue"
+msgstr "Jatka"
+
+msgid "after"
+msgstr "jälkeen"
+
+msgid "during"
+msgstr "aikana"
+
+msgid "execution"
+msgstr "Suorita tehtävä tallennuksen"
+
+msgid " during another recording"
+msgstr " toisen tallennuksen aikana"
+
+msgid " while replaying"
+msgstr " tallenteen toiston aikana"
+
+msgid "scan only channels with logo"
+msgstr "Käytä vain logollisilla kanavilla"
+
+msgid "ignore timer margins"
+msgstr "Älä huomioi ajastinmarginaaleja"
+
+msgid "detect overlaps"
+msgstr "Tunnista päällekkäisyydet"
+
+msgid "repair index, if broken"
+msgstr "Luo rikkinäinen index-tiedosto uudestaan"
+
+msgid "correct info file"
+msgstr "Korjaa info-tiedosto"
+
+msgid "OSD message"
+msgstr "Käytä kuvaruutuviestejä"
+
+msgid "verbose logging"
+msgstr "Käytä laajennettua lokikirjoitusta"
+
+msgid "log to recording directory"
+msgstr "Kirjoita lokitiedosto tallennehakemistoon"
+
+msgid "hide mainmenu entry"
+msgstr "Piilota valita päävalikosta"
+
+msgid "show list"
+msgstr "Näytä lista"
+
+msgid "list"
+msgstr "Lista"
+
+msgid "back"
+msgstr "Takaisin"
+
+msgid "Mark advertisements"
+msgstr "Merkitse mainokset automaattisesti"
diff --git a/version.h b/version.h
index 9968b8c..e032a89 100644
--- a/version.h
+++ b/version.h
@@ -8,6 +8,6 @@
#ifndef __version_h_
#define __version_h_
-static const char *VERSION = "0.1.2pre";
+static const char *VERSION = "0.1.2";
#endif