From bef61eb0094f10d9bc453dcd6b13750d2a53c6bb Mon Sep 17 00:00:00 2001 From: Jochen Dolze Date: Tue, 8 Jun 2010 19:29:38 +0200 Subject: Got rid of --tstart/--tstop Reworked logomark handling Added rewriting of info/info.vdr (not yet complete) --- plugin/status.cpp | 47 +++++------------------------------------------ plugin/status.h | 4 +--- 2 files changed, 6 insertions(+), 45 deletions(-) (limited to 'plugin') 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 + #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 #include #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 -- cgit v1.2.3