From 88a674910a465c7cb7181260087b9d8f396793bc Mon Sep 17 00:00:00 2001 From: gixxpunk Date: Sat, 21 Oct 2017 10:51:15 +0200 Subject: [PATCH 1/3] fix crash on init Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/549422d4310d7b42bf621ac1c4a1ec3e2674e07f Author: gixxpunk Date: 2017-10-21 (Sat, 21 Oct 2017) Origin message was: ------------------ - fix crash on init --- src/neutrino.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 798b5dad9..0710c6bc3 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2586,9 +2586,6 @@ TIMER_START(); SHTDCNT::getInstance()->init(); - hintBox->hide(); - delete hintBox; - //NI lcd4l-support LCD4l = new CLCD4l(); if(g_settings.lcd4l_support) From d08ecc0f438b6c5783e94c513b1f2edf62149c22 Mon Sep 17 00:00:00 2001 From: gixxpunk Date: Sat, 21 Oct 2017 13:47:26 +0200 Subject: [PATCH 2/3] drop unused code Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/af440e996cf0e8539e94e2c4383acdc5aeccca80 Author: gixxpunk Date: 2017-10-21 (Sat, 21 Oct 2017) Origin message was: ------------------ - drop unused code --- src/Makefile.am | 11 --------- src/uncoolinit.cpp | 57 ---------------------------------------------- 2 files changed, 68 deletions(-) delete mode 100644 src/uncoolinit.cpp diff --git a/src/Makefile.am b/src/Makefile.am index f1f2e5eb4..fce0f5263 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -200,15 +200,4 @@ endif if BOXTYPE_COOL bin_PROGRAMS += uncooloff uncooloff_SOURCES = uncooloff.c -# if BOXMODEL_CS_HD2 -# else -# noinst_PROGRAMS = uncoolinit -# uncoolinit_SOURCES = uncoolinit.cpp -# uncoolinit_LDADD = \ -# @AVFORMAT_LIBS@ \ -# @AVCODEC_LIBS@ \ -# @BLURAY_LIBS@ \ -# -lcoolstream-mt -lca-sc -lnxp \ -# -lOpenThreads -lrt -# endif endif diff --git a/src/uncoolinit.cpp b/src/uncoolinit.cpp deleted file mode 100644 index 52a5d4a4e..000000000 --- a/src/uncoolinit.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * (C) 2013 Stefan Seyfried, License: GPL v3+ - * - * uncoolinit -- work around driver initalization bug on - * (at least) Coolstream HD1 "first fifty edition". - * When starting up with 720p, the HDMI output is pink-tinted - * and without sound until switching resolution once. - * - * work around the issue by initializing the videodecoder in - * 1080i mode. - * - * This is really just a workaround for crappy drivers, but - * better than nothing :-) - */ - -#include -#include -#include -#include - -#include -#include -#include - -cVideo *v = NULL; -cDemux *d = NULL; - -int main (int argc, char **argv) -{ - struct timespec s, e; - clock_gettime(CLOCK_MONOTONIC, &s); - printf("\nuncoolinit by seife -- working around crappy drivers since 2009!\n"); - /* initialize everything */ - cs_api_init(); - d = new cDemux(); /* dummy demux for getChannel() and getBuffer() */ - d->Open(DMX_VIDEO_CHANNEL); /* do we really need to open it? */ - - /* this enables output in 1080i mode */ - v = new cVideo(VIDEO_STD_1080I50, d->getChannel(), d->getBuffer()); - - /* should we slow down booting even more by showing a picture? */ - if (argc > 1) { - v->ShowPicture(argv[1]); - if (argc > 2) - sleep(atoi(argv[2])); - v->StopPicture(); - } - - /* clean up after ourselves, or the drivers will be *very* unhappy */ - delete v; - delete d; - cs_api_exit(); - clock_gettime(CLOCK_MONOTONIC, &e); - printf("uncoolinit ends, took %lld ms\n", - (e.tv_sec*1000 + e.tv_nsec/1000000LL) - (s.tv_sec*1000 + s.tv_nsec/1000000LL)); - return 0; -} From c9f06e991266054026a079b467d8b22c8ac9cbf2 Mon Sep 17 00:00:00 2001 From: gixxpunk Date: Sat, 21 Oct 2017 14:39:49 +0200 Subject: [PATCH 3/3] rename uncooloff workaround to something less idiotic Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/d38cc355e004d4eec8077dae94058a865a0cb204 Author: gixxpunk Date: 2017-10-21 (Sat, 21 Oct 2017) Origin message was: ------------------ - rename uncooloff workaround to something less idiotic --- src/Makefile.am | 4 ++-- src/{uncooloff.c => shutdown_helper.c} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/{uncooloff.c => shutdown_helper.c} (95%) diff --git a/src/Makefile.am b/src/Makefile.am index fce0f5263..32f20f8f9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -198,6 +198,6 @@ neutrino_LDADD += \ endif if BOXTYPE_COOL -bin_PROGRAMS += uncooloff -uncooloff_SOURCES = uncooloff.c +bin_PROGRAMS += shutdown_helper +shutdown_helper_SOURCES = shutdown_helper.c endif diff --git a/src/uncooloff.c b/src/shutdown_helper.c similarity index 95% rename from src/uncooloff.c rename to src/shutdown_helper.c index 8441cf1bd..55fb76739 100644 --- a/src/uncooloff.c +++ b/src/shutdown_helper.c @@ -1,5 +1,5 @@ /* - * uncooloff - switch off the box with a possible timer wakeup + * shutdown_helper - switch off the box with a possible timer wakeup * this is needed because the drivers do not implement a proper * hwclock interface :-( *