From f52393ce3d48203bdf1a340bd4db12a3dc8a20a3 Mon Sep 17 00:00:00 2001 From: horchi Date: Thu, 4 Oct 2018 18:51:40 +0200 Subject: 2018-10-04: Version 0.0.6\n Added support of softhdcuvid plugin\n\n --- HISTORY.h | 7 +++++-- Makefile.since-1.7.35 | 5 +++-- po/de_DE.po | 8 ++++---- seduthread.c | 30 ++++++++++++++++++++++-------- 4 files changed, 34 insertions(+), 16 deletions(-) diff --git a/HISTORY.h b/HISTORY.h index 0d122ea..550decb 100644 --- a/HISTORY.h +++ b/HISTORY.h @@ -7,8 +7,8 @@ * */ -#define _VERSION "0.0.5" -#define VERSION_DATE "24.09.2018" +#define _VERSION "0.0.6" +#define VERSION_DATE "04.10.2018" #ifdef GIT_REV # define VERSION _VERSION "-GIT" GIT_REV @@ -19,6 +19,9 @@ /* * ------------------------------------ +2018-10-04: Version 0.0.6 + Added support of softhdcuvid plugin + 2018-09-24: Version 0.0.5 Auto device detection configurable diff --git a/Makefile.since-1.7.35 b/Makefile.since-1.7.35 index b025e5e..70a6085 100644 --- a/Makefile.since-1.7.35 +++ b/Makefile.since-1.7.35 @@ -2,7 +2,8 @@ # Makefile for a Video Disk Recorder plugin # -PLUGIN = seduatmo +PLUGIN = seduatmo +HISTFILE = "HISTORY.h" ### The version number of this plugin (taken from the main source file): @@ -12,7 +13,7 @@ LASTHIST = $(shell grep '^20[0-3][0-9]' $(HISTFILE) | head -1) LASTCOMMENT = $(subst |,\n,$(shell sed -n '/$(LASTHIST)/,/^ *$$/p' $(HISTFILE) | tr '\n' '|')) LASTTAG = $(shell git describe --tags --abbrev=0) BRANCH = $(shell git rev-parse --abbrev-ref HEAD) -GIT_REV = $(shell git describe --always 2>/dev/null) +GIT_REV = $(shell git describe --always 2>/dev/null) ### The directory environment: diff --git a/po/de_DE.po b/po/de_DE.po index 494ae04..ee4f706 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -1,16 +1,16 @@ # VDR plugin language source file. # Copyright (C) 2012 ckone santos # This file is distributed under the same license as the VDR package. -# Joerg Wendel +# Joerg Wendel # msgid "" msgstr "" "Project-Id-Version: vdr-seduatmo 0.0.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-11-29 12:31+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"POT-Creation-Date: 2018-10-04 18:06+0200\n" +"PO-Revision-Date: 2017-02-14 21:40+0200\n" "Last-Translator: ckone santos\n" -"Language-Team: LANGUAGE \n" +"Language-Team: LANGUAGE \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff --git a/seduthread.c b/seduthread.c index e558345..93a8054 100644 --- a/seduthread.c +++ b/seduthread.c @@ -66,6 +66,10 @@ void cSeduThread::Action() tell(0, "atmo Thread started (pid=%d)", getpid()); + // wait for softhddevice started (assume no retry action below needed) + + sleep(5); + loopActive = true; pixAverage = new PixQueue[cfg.ledCount]; @@ -75,8 +79,9 @@ void cSeduThread::Action() { if (!sedu.isOpen()) { - if (last > time(0)-30) + if (last > time(0)-10) { + // we are here on sedu interface trouble and on grab-plugin interface trouble! waitCondition.TimedWait(mutex, 1000); // wait time in ms continue; } @@ -142,18 +147,27 @@ void cSeduThread::Action() int cSeduThread::grabImage() { + static cPlugin* softHdPlugin = 0; + + if (!softHdPlugin) + { + softHdPlugin = cPluginManager::GetPlugin("softhddevice"); + + if (!softHdPlugin) + softHdPlugin = cPluginManager::GetPlugin("softhdcuvid"); + + int softHdGrabService = (softHdPlugin && softHdPlugin->Service(ATMO1_GRAB_SERVICE, 0)); + + if (!softHdGrabService) + return error("Can't find grab service neither at softhddevice nor at softhdcuvid " + "- aborting grab, retrying in 10 seconds!"); + } + SoftHDDevice_AtmoGrabService_v1_1_t req; free(image); image = 0; - cPlugin* softHdPlugin = cPluginManager::GetPlugin("softhddevice"); - int softHdGrabService = (softHdPlugin && softHdPlugin->Service(ATMO1_GRAB_SERVICE, 0)); - - if (!softHdGrabService) - return error("Can't find softhddevice %s, aborting grab, retrying in 10 seconds!", - softHdPlugin ? "service" : "plugin"); - // grab image at sofhddevice req.width = cfg.grabWidth; -- cgit v1.2.3