summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2011-04-16 13:05:31 +0200
committerJochen Dolze <vdr@dolze.de>2011-04-16 13:05:31 +0200
commit55141b21b3b6c937614009f76b8340e42a0f50af (patch)
tree3cb8c5ed45ad30b002f32c0db33b488e53ab83a7
parentafc27021e3c8542f7a966ea732e30212b786b923 (diff)
downloadvdr-plugin-markad-55141b21b3b6c937614009f76b8340e42a0f50af.tar.gz
vdr-plugin-markad-55141b21b3b6c937614009f76b8340e42a0f50af.tar.bz2
Disabling pre-/post timer on live recordings
Prevent overwriting logfiles when two instances start on same recording New logo for Sat1Comedy Changed logo for Puls4 Austria Changed logo for ComedyCentral (still bad)
-rw-r--r--command/logos/NICK_COMEDY-A16_9-P0.pgmbin15244 -> 14019 bytes
-rw-r--r--command/logos/PULS_4_Austria-A16_9-P0.pgmbin12018 -> 14468 bytes
-rw-r--r--command/logos/PULS_4_Austria-A16_9-P2.pgmbin3017 -> 3587 bytes
-rw-r--r--command/logos/Sat_1_Comedy-A16_9-P0.pgmbin0 -> 11718 bytes
-rw-r--r--command/markad-standalone.cpp42
5 files changed, 24 insertions, 18 deletions
diff --git a/command/logos/NICK_COMEDY-A16_9-P0.pgm b/command/logos/NICK_COMEDY-A16_9-P0.pgm
index b20d7a6..36d11cd 100644
--- a/command/logos/NICK_COMEDY-A16_9-P0.pgm
+++ b/command/logos/NICK_COMEDY-A16_9-P0.pgm
Binary files differ
diff --git a/command/logos/PULS_4_Austria-A16_9-P0.pgm b/command/logos/PULS_4_Austria-A16_9-P0.pgm
index bf49c79..e597ea5 100644
--- a/command/logos/PULS_4_Austria-A16_9-P0.pgm
+++ b/command/logos/PULS_4_Austria-A16_9-P0.pgm
Binary files differ
diff --git a/command/logos/PULS_4_Austria-A16_9-P2.pgm b/command/logos/PULS_4_Austria-A16_9-P2.pgm
index 12f4fd0..434345f 100644
--- a/command/logos/PULS_4_Austria-A16_9-P2.pgm
+++ b/command/logos/PULS_4_Austria-A16_9-P2.pgm
Binary files differ
diff --git a/command/logos/Sat_1_Comedy-A16_9-P0.pgm b/command/logos/Sat_1_Comedy-A16_9-P0.pgm
new file mode 100644
index 0000000..38319cb
--- /dev/null
+++ b/command/logos/Sat_1_Comedy-A16_9-P0.pgm
Binary files differ
diff --git a/command/markad-standalone.cpp b/command/markad-standalone.cpp
index 1ec9b7a..4096477 100644
--- a/command/markad-standalone.cpp
+++ b/command/markad-standalone.cpp
@@ -1929,7 +1929,7 @@ bool cMarkAdStandalone::CreatePidfile()
if (stat(procname,&statbuf)!=-1)
{
// found another, running markad
- isyslog("another instance is running on this recording");
+ fprintf(stderr,"another instance is running on %s",directory);
abort=duplicate=true;
}
}
@@ -2020,6 +2020,23 @@ cMarkAdStandalone::cMarkAdStandalone(const char *Directory, const MarkAdConfig *
macontext.Info.DPid.Type=MARKAD_PIDTYPE_AUDIO_AC3;
macontext.Info.APid.Type=MARKAD_PIDTYPE_AUDIO_MP2;
+ if (!config->NoPid)
+ {
+ CreatePidfile();
+ if (abort) return;
+ }
+
+ if (LOG2REC)
+ {
+ char *fbuf;
+ if (asprintf(&fbuf,"%s/markad.log",directory)!=-1)
+ {
+ if (freopen(fbuf,"w+",stdout)) {};
+ SetFileUID(fbuf);
+ free(fbuf);
+ }
+ }
+
isyslog("starting v%s",VERSION);
isyslog("on %s",Directory);
@@ -2041,14 +2058,14 @@ cMarkAdStandalone::cMarkAdStandalone(const char *Directory, const MarkAdConfig *
bDecodeVideo=true;
}
- if (!config->NoPid)
+ if (config->Before) sleep(10);
+
+ if (strstr(directory,"/@"))
{
- CreatePidfile();
- if (abort) return;
+ isyslog("live-recording, disabling pre-/post timer");
+ bIgnoreTimerInfo=true;
}
- if (config->Before) sleep(10);
-
if (!CheckTS()) return;
if (isTS)
@@ -2206,7 +2223,7 @@ cMarkAdStandalone::~cMarkAdStandalone()
etime,framecnt,framecnt2,ftime,ptime);
}
- if (osd)
+ if ((osd) && (!duplicate))
{
if (abort)
{
@@ -2926,17 +2943,6 @@ int main(int argc, char *argv[])
signal(SIGTSTP, signal_handler);
signal(SIGCONT, signal_handler);
- if (LOG2REC)
- {
- char *fbuf;
- if (asprintf(&fbuf,"%s/markad.log",recDir)!=-1)
- {
- if (freopen(fbuf,"w+",stdout)) {};
- if (chown(fbuf,statbuf.st_uid, statbuf.st_gid)) {};
- free(fbuf);
- }
- }
-
cmasta = new cMarkAdStandalone(recDir,&config);
if (!cmasta) return -1;