diff options
| author | Jochen Dolze <vdr@dolze.de> | 2010-06-08 19:29:38 +0200 |
|---|---|---|
| committer | Jochen Dolze <vdr@dolze.de> | 2010-06-08 19:29:38 +0200 |
| commit | bef61eb0094f10d9bc453dcd6b13750d2a53c6bb (patch) | |
| tree | 3bbbaf9fe38035953083ea4e42cb1ae456030db8 /plugin | |
| parent | 5623eda874dd036387c7a9a99da805825a669567 (diff) | |
| download | vdr-plugin-markad-bef61eb0094f10d9bc453dcd6b13750d2a53c6bb.tar.gz vdr-plugin-markad-bef61eb0094f10d9bc453dcd6b13750d2a53c6bb.tar.bz2 | |
Got rid of --tstart/--tstop
Reworked logomark handling
Added rewriting of info/info.vdr (not yet complete)
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/status.cpp | 47 | ||||
| -rw-r--r-- | plugin/status.h | 4 |
2 files changed, 6 insertions, 45 deletions
diff --git a/plugin/status.cpp b/plugin/status.cpp index aa0b085..9fd800e 100644 --- a/plugin/status.cpp +++ b/plugin/status.cpp @@ -5,6 +5,8 @@ * */ +#include <signal.h> + #include "status.h" cStatusMarkAd::cStatusMarkAd(const char *BinDir, const char *LogoDir, struct setup *Setup) @@ -65,34 +67,16 @@ void cStatusMarkAd::Replaying(const cControl *UNUSED(Control), const char *UNUSE } } -bool cStatusMarkAd::Start(const char *FileName, const char *Name, const bool Direct, - const int tStart, const int tStop) +bool cStatusMarkAd::Start(const char *FileName, const char *Name, const bool Direct) { if ((Direct) && (Get(FileName)!=-1)) return false; - char sstart[20]=""; - char sstop[20]=""; - - if (tStart>0) - { - snprintf(sstart,sizeof(sstart)," --tstart %i ",tStart); - sstart[19]=0; - } - - if (tStop>0) - { - snprintf(sstop,sizeof(sstop)," --tstop %i ",tStop); - sstop[19]=0; - } - - cString cmd = cString::sprintf("\"%s\"/markad %s%s%s%s%s%s%s -l \"%s\" %s \"%s\"",bindir, + cString cmd = cString::sprintf("\"%s\"/markad %s%s%s%s%s -l \"%s\" %s \"%s\"",bindir, setup->Verbose ? " -v " : "", setup->BackupMarks ? " -B " : "", setup->GenIndex ? " -G " : "", setup->OSDMessage ? " -O " : "", setup->NoMargins ? " -i 4 " : "", - (tStart>0) ? sstart : "", - (tStop>0) ? sstop : "", logodir,Direct ? "-O after" : "--online=2 before", FileName); dsyslog("markad: executing %s",*cmd); if (SystemExec(cmd)!=-1) @@ -139,31 +123,10 @@ void cStatusMarkAd::Recording(const cDevice *UNUSED(Device), const char *Name, if (!bindir) return; // we cannot operate without bindir if (!logodir) return; // we dont want to operate without logodir - int tstart=0; - int tstop=0; - if ((Name) && (!setup->NoMargins) && (!strchr(Name,'@'))) - { - for (cTimer *Timer = Timers.First(); Timer; Timer=Timers.Next(Timer)) - { - if (Timer->Recording() && (!strcmp(Timer->File(),Name))) - { - if (Timer->Event()) - { - if (Timer->Event()->StartTime()>time(NULL)) - { - tstart=Timer->Event()->StartTime()-Timer->StartTime(); - } - tstop=Timer->StopTime()-Timer->Event()->EndTime(); - } - break; - } - } - } - if (On) { // Start markad with recording - Start(FileName,Name,false,tstart,tstop); + Start(FileName,Name,false); } else { diff --git a/plugin/status.h b/plugin/status.h index 8ce9b45..909547f 100644 --- a/plugin/status.h +++ b/plugin/status.h @@ -7,7 +7,6 @@ #ifndef __status_h_ #define __status_h_ -#include <signal.h> #include <vdr/status.h> #include "setup.h" @@ -55,8 +54,7 @@ public: actpos=0; } bool GetNextActive(struct recs **RecEntry); - bool Start(const char *FileName, const char *Name, const bool Direct=false, - const int tStart=0, const int tStop=0); + bool Start(const char *FileName, const char *Name, const bool Direct=false); }; #endif |
