From 8db42dd2871104b2fd6595d73c4e33cf0352f5df Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Fri, 15 Jan 2016 16:19:43 +0100 Subject: [PATCH] Adapt neutrino-mp for CST hardware part #1 - Fix compile for cst hardware - Code tested on kronos and apollo hardware, is ok - On Nevis hardware will be compiled, but not working (no frontend found, segfault) Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/403d02ec2b5e5a86190adddae607894c254c6a86 Author: Michael Liebmann Date: 2016-01-15 (Fri, 15 Jan 2016) Origin message was: ------------------ Adapt neutrino-mp for CST hardware part #1 - Fix compile for cst hardware - Code tested on kronos and apollo hardware, is ok - On Nevis hardware will be compiled, but not working (no frontend found, segfault) ------------------ This commit was generated by Migit --- configure.ac | 4 ++-- lib/libcoolstream2/cs_frontpanel.h | 4 ++++ lib/libdvbsub/dvbsubtitle.cpp | 4 ++++ src/driver/Makefile.am | 11 +++++------ src/driver/framebuffer.h | 4 +++- src/driver/pictureviewer/pv_config.h | 5 +++++ src/driver/stacktrace.h | 8 ++++++++ src/gui/movieplayer.cpp | 7 +++++-- src/neutrino.cpp | 4 ++++ src/system/httptool.cpp | 4 ++++ src/system/mtdutils/mkfs.jffs2.cpp | 4 ++++ src/system/setting_helpers.cpp | 4 ++++ 12 files changed, 52 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 04113f7e3..e15bb28a0 100644 --- a/configure.ac +++ b/configure.ac @@ -262,10 +262,10 @@ if test "$BOXTYPE" = "coolstream"; then if test -e ${srcdir}/lib/libcoolstream/nevis_ir.h; then AC_DEFINE(HAVE_COOLSTREAM_NEVIS_IR_H,1,[Define to 1 if you have the header file.]) fi -HWLIB_CFLAGS='-I$(top_srcdir)/lib/libcoolstream' +HWLIB_CFLAGS='-I$(top_srcdir)/lib/libcoolstream -I$(top_srcdir)/src/zapit/include/private' if test "$BOXMODEL" = "apollo"; then -HWLIB_CFLAGS='-I$(top_srcdir)/lib/libcoolstream2 -I$(top_srcdir)/src/zapit/include/private' +HWLIB_CFLAGS='-I$(top_srcdir)/lib/libcoolstream2' if test -e ${srcdir}/lib/libcoolstream2/cs_ir_generic.h; then AC_DEFINE(HAVE_COOLSTREAM_CS_IR_GENERIC_H,1,[Define to 1 if you have the header file.]) fi diff --git a/lib/libcoolstream2/cs_frontpanel.h b/lib/libcoolstream2/cs_frontpanel.h index e6ca97137..df44af486 100644 --- a/lib/libcoolstream2/cs_frontpanel.h +++ b/lib/libcoolstream2/cs_frontpanel.h @@ -120,7 +120,11 @@ typedef struct { unsigned short xres, yres; unsigned int segment_count; fp_display_text_type_t text_support; +#ifdef __cplusplus bool number_support; +#else + int number_support; +#endif } fp_display_caps_t; #define IOC_FP_SET_BRIGHT _IOW(0xDE, 1, unsigned char) /* set the display brighness in 16 steps between 0 to 15 */ diff --git a/lib/libdvbsub/dvbsubtitle.cpp b/lib/libdvbsub/dvbsubtitle.cpp index 7cbfb0caa..a3c8966ee 100644 --- a/lib/libdvbsub/dvbsubtitle.cpp +++ b/lib/libdvbsub/dvbsubtitle.cpp @@ -11,6 +11,10 @@ * dvbsubtitle for HD1 ported by Coolstream LTD */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include "dvbsubtitle.h" extern "C" { diff --git a/src/driver/Makefile.am b/src/driver/Makefile.am index 997d99e1b..48fc03e23 100644 --- a/src/driver/Makefile.am +++ b/src/driver/Makefile.am @@ -17,10 +17,6 @@ AM_CPPFLAGS = \ @AVFORMAT_CFLAGS@ \ @HWLIB_CFLAGS@ -AM_CPPFLAGS += \ - @AVFORMAT_CFLAGS@ \ - @HWLIB_CFLAGS@ - noinst_LIBRARIES = libneutrino_driver.a libneutrino_driver_netfile.a libneutrino_driver_a_SOURCES = \ @@ -31,10 +27,8 @@ libneutrino_driver_a_SOURCES = \ colorgradient.cpp \ fade.cpp \ fb_window.cpp \ - fbaccel.cpp \ file.cpp \ fontrenderer.cpp \ - framebuffer_ng.cpp \ genpsi.cpp \ moviecut.cpp \ neutrinofonts.cpp \ @@ -51,7 +45,12 @@ libneutrino_driver_a_SOURCES = \ if BOXTYPE_COOL libneutrino_driver_a_SOURCES += \ + framebuffer.cpp \ vfd.cpp +else +libneutrino_driver_a_SOURCES += \ + fbaccel.cpp \ + framebuffer_ng.cpp endif if BOXTYPE_TRIPLE diff --git a/src/driver/framebuffer.h b/src/driver/framebuffer.h index ffb9efb16..1e892f7b6 100644 --- a/src/driver/framebuffer.h +++ b/src/driver/framebuffer.h @@ -21,8 +21,9 @@ Boston, MA 02110-1301, USA. */ +#if !HAVE_COOL_HARDWARE #include "framebuffer_ng.h" -#if 0 +#else #ifndef __framebuffer__ #define __framebuffer__ @@ -325,6 +326,7 @@ class CFrameBuffer : public sigc::trackable void fbNoCheck(bool noCheck) { fb_no_check = noCheck; } void doPaintMuteIcon(bool mode) { do_paint_mute_icon = mode; } void blit(void) {} + void mark(int, int, int, int) {} sigc::signal OnAfterSetPallette; }; diff --git a/src/driver/pictureviewer/pv_config.h b/src/driver/pictureviewer/pv_config.h index 39009f012..7c7a98d6b 100644 --- a/src/driver/pictureviewer/pv_config.h +++ b/src/driver/pictureviewer/pv_config.h @@ -1,3 +1,8 @@ + +#ifdef HAVE_CONFIG_H +#include +#endif + #define FBV_SUPPORT_PNG #define FBV_SUPPORT_BMP #define FBV_SUPPORT_JPEG diff --git a/src/driver/stacktrace.h b/src/driver/stacktrace.h index 49a5e5c0a..2db7ef096 100644 --- a/src/driver/stacktrace.h +++ b/src/driver/stacktrace.h @@ -4,6 +4,8 @@ #ifndef _STACKTRACE_H_ #define _STACKTRACE_H_ +#ifdef HAVE_BACKTRACE + #include #include #include @@ -89,5 +91,11 @@ static inline void print_stacktrace(FILE *out = stderr, unsigned int max_frames free(funcname); free(symbollist); } +#else + +static inline void print_stacktrace(FILE*, unsigned int) {}; +static inline void print_stacktrace() {}; + +#endif #endif // _STACKTRACE_H_ diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 405eeade3..7c2b344ce 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -2227,8 +2227,11 @@ bool CMoviePlayerGui::mountIso(CFile *file) } return false; } - -void CMoviePlayerGui::makeScreenShot(bool autoshot, bool /*forcover*/) +void CMoviePlayerGui::makeScreenShot(bool autoshot, bool +#ifdef SCREENSHOT + forcover +#endif + ) { if (autoshot && (autoshot_done || !g_settings.auto_cover)) return; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 22809b8d0..f35e44fbe 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -3590,6 +3590,10 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode) printf("[neutrino] This is the end. exiting with code %d\n", retcode); Cleanup(); +#if HAVE_COOL_HARDWARE + FILE *f = fopen("/tmp/.shutdown", "w"); + fclose(f); +#endif #ifdef __sh__ /* the sh4 gcc seems to dislike someting about openthreads... */ _exit(retcode); diff --git a/src/system/httptool.cpp b/src/system/httptool.cpp index 8f89db96f..7fdeb5993 100644 --- a/src/system/httptool.cpp +++ b/src/system/httptool.cpp @@ -18,6 +18,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include diff --git a/src/system/mtdutils/mkfs.jffs2.cpp b/src/system/mtdutils/mkfs.jffs2.cpp index 762e44f32..d8e1bbaf9 100644 --- a/src/system/mtdutils/mkfs.jffs2.cpp +++ b/src/system/mtdutils/mkfs.jffs2.cpp @@ -68,6 +68,10 @@ #include +#ifdef HAVE_CONFIG_H +#include +#endif + #include "rbtree.h" #include #include diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index bc1f8b52f..e86d778ce 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -29,6 +29,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include "configure_network.h" #include