From 089f59cc261252498a17a5a1d27c9f25d2d57dac Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Wed, 22 Mar 2017 01:20:58 +0100 Subject: [PATCH 01/15] hd[1|2]/libcoolstream: Update headers for new libcoolstream functions libcoolstream-mt.so version 3.2.0 required Functions: - updateOsdScreenInfo() - GetVideoSystem() - GetVideoSystemFormatName() - fbCopy() - fbFill() - cs_set_extra_debug() Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/9bc2d9b95e22fd23acc55cf090ddd1f99a0c02b0 Author: Michael Liebmann Date: 2017-03-22 (Wed, 22 Mar 2017) Origin message was: ------------------ hd[1|2]/libcoolstream: Update headers for new libcoolstream functions libcoolstream-mt.so version 3.2.0 required Functions: - updateOsdScreenInfo() - GetVideoSystem() - GetVideoSystemFormatName() - fbCopy() - fbFill() - cs_set_extra_debug() ------------------ This commit was generated by Migit --- .../coolstream/hd1/libcoolstream/cs_api.h | 3 ++ .../coolstream/hd1/libcoolstream/helpers_cs.h | 16 ++++++++++ .../coolstream/hd1/libcoolstream/video_cs.h | 29 +++++++++++++++++++ .../coolstream/hd2/libcoolstream/helpers_cs.h | 16 ++++++++++ .../coolstream/hd2/libcoolstream/video_cs.h | 14 +++++++++ 5 files changed, 78 insertions(+) create mode 100644 lib/hardware/coolstream/hd1/libcoolstream/helpers_cs.h create mode 100644 lib/hardware/coolstream/hd2/libcoolstream/helpers_cs.h diff --git a/lib/hardware/coolstream/hd1/libcoolstream/cs_api.h b/lib/hardware/coolstream/hd1/libcoolstream/cs_api.h index 1051c99c0..9a4e77259 100644 --- a/lib/hardware/coolstream/hd1/libcoolstream/cs_api.h +++ b/lib/hardware/coolstream/hd1/libcoolstream/cs_api.h @@ -47,6 +47,9 @@ enum CS_LOG_MODULE { void cs_api_init(void); void cs_api_exit(void); +/* Dummy for compatibility with HD2 */ +#define cs_new_auto_videosystem(); + // Memory helpers void *cs_malloc_uncached(size_t size); void cs_free_uncached(void *ptr); diff --git a/lib/hardware/coolstream/hd1/libcoolstream/helpers_cs.h b/lib/hardware/coolstream/hd1/libcoolstream/helpers_cs.h new file mode 100644 index 000000000..8e7ea0b93 --- /dev/null +++ b/lib/hardware/coolstream/hd1/libcoolstream/helpers_cs.h @@ -0,0 +1,16 @@ +#ifndef __HELPERS_CS_H__ +#define __HELPERS_CS_H__ + +enum { + CS_EXTRA_DEBUG_OFF = 0x00000000, + CS_EXTRA_DEBUG_VIDEO1 = 0x00000001, + CS_EXTRA_DEBUG_ALL = 0xFFFFFFFF +}; + +void cs_set_extra_debug(uint32_t mode); + +const char* __func_ext__f(const char* _func_, int _line_, const char* _file_, bool havePathFile); +#define __func_ext__ __func_ext__f(__PRETTY_FUNCTION__, __LINE__, NULL, true) +#define __func_ext_file__ __func_ext__f(__PRETTY_FUNCTION__, __LINE__, __path_file__, true) + +#endif // __HELPERS_CS_H__ diff --git a/lib/hardware/coolstream/hd1/libcoolstream/video_cs.h b/lib/hardware/coolstream/hd1/libcoolstream/video_cs.h index 47524c1b6..b29677e83 100644 --- a/lib/hardware/coolstream/hd1/libcoolstream/video_cs.h +++ b/lib/hardware/coolstream/hd1/libcoolstream/video_cs.h @@ -9,9 +9,11 @@ #ifndef __VIDEO_CS_H_ #define __VIDEO_CS_H_ +#include #include #include #include +#include #include "cs_types.h" @@ -123,6 +125,18 @@ typedef enum VIDEO_CONTROL_MAX = VIDEO_CONTROL_SHARPNESS } VIDEO_CONTROL; +typedef struct cs_vs_format_t +{ + char format[16]; +} cs_vs_format_struct_t; + +enum { + CS_FBCOPY_BB2FB = 0, + CS_FBCOPY_FB2FB = 1, + CS_FBCOPY_MEM2FB = 2, + CS_FBCOPY_FB2MEM = 3 +}; + class cVideo { private: CS_VIDEO_PDATA *privateData; @@ -155,6 +169,11 @@ private: vfd_icon mode_icon; unsigned int unit; cDemux *demux; + int current_video_system; + bool isReadScreeninfo; + fb_var_screeninfo varScreeninfo; + fb_fix_screeninfo fixScreeninfo; + // int SelectAutoFormat(); void ScalePic(); @@ -163,6 +182,9 @@ public: cVideo(int mode, void * hChannel, void * hBuffer, unsigned int Unit = 0); ~cVideo(void); + /* Important! + Call this function when osd resolution has been changed */ + void updateOsdScreenInfo(); void * GetDRM(void); void * GetTVEnc(); void * GetTVEncSD(); @@ -207,6 +229,11 @@ public: int64_t GetPTS(void); int Flush(void); + /* get video system infos */ + int GetVideoSystem(); + /* when system = -1 then use current video system */ + void GetVideoSystemFormatName(cs_vs_format_t* format, int system = -1); + /* set video_system */ int SetVideoSystem(int video_system, bool remember = true); int SetStreamType(VIDEO_FORMAT type); @@ -234,6 +261,8 @@ public: int StartVBI(unsigned short pid); int StopVBI(void); bool GetScreenImage(unsigned char * &data, int &xres, int &yres, bool get_video = true, bool get_osd = false, bool scale_to_video = false); + int fbCopy(uint32_t *mem_p, int width, int height, int dst_x, int dst_y, int src_x, int src_y, int mode); + int fbFill(int sx, int sy, int width, int height, fb_pixel_t col, int mode=0); void SetDemux(cDemux *Demux); }; diff --git a/lib/hardware/coolstream/hd2/libcoolstream/helpers_cs.h b/lib/hardware/coolstream/hd2/libcoolstream/helpers_cs.h new file mode 100644 index 000000000..8e7ea0b93 --- /dev/null +++ b/lib/hardware/coolstream/hd2/libcoolstream/helpers_cs.h @@ -0,0 +1,16 @@ +#ifndef __HELPERS_CS_H__ +#define __HELPERS_CS_H__ + +enum { + CS_EXTRA_DEBUG_OFF = 0x00000000, + CS_EXTRA_DEBUG_VIDEO1 = 0x00000001, + CS_EXTRA_DEBUG_ALL = 0xFFFFFFFF +}; + +void cs_set_extra_debug(uint32_t mode); + +const char* __func_ext__f(const char* _func_, int _line_, const char* _file_, bool havePathFile); +#define __func_ext__ __func_ext__f(__PRETTY_FUNCTION__, __LINE__, NULL, true) +#define __func_ext_file__ __func_ext__f(__PRETTY_FUNCTION__, __LINE__, __path_file__, true) + +#endif // __HELPERS_CS_H__ diff --git a/lib/hardware/coolstream/hd2/libcoolstream/video_cs.h b/lib/hardware/coolstream/hd2/libcoolstream/video_cs.h index 71f4e6db5..515d4ad3f 100644 --- a/lib/hardware/coolstream/hd2/libcoolstream/video_cs.h +++ b/lib/hardware/coolstream/hd2/libcoolstream/video_cs.h @@ -9,6 +9,7 @@ #ifndef __VIDEO_CS_H_ #define __VIDEO_CS_H_ +#include #include #include @@ -158,6 +159,13 @@ typedef struct cs_vs_format_t char formatSD[16]; } cs_vs_format_struct_t; +enum { + CS_FBCOPY_BB2FB = 0, + CS_FBCOPY_FB2FB = 1, + CS_FBCOPY_MEM2FB = 2, + CS_FBCOPY_FB2MEM = 3 +}; + class cDemux; class cAudio; @@ -206,6 +214,10 @@ public: cVideo(int mode, void * hChannel, void * hBuffer); ~cVideo(void); + /* Important! + Call this function when osd resolution has been changed */ + void updateOsdScreenInfo(); + void * GetVPP(void); void * GetTVEnc(); void * GetTVEncSD(); @@ -282,6 +294,8 @@ public: int StartVBI(unsigned short pid); int StopVBI(void); bool GetScreenImage(unsigned char * &data, int &xres, int &yres, bool get_video = true, bool get_osd = false, bool scale_to_video = false); + int fbCopy(uint32_t *mem_p, int width, int height, int dst_x, int dst_y, int src_x, int src_y, int mode); + int fbFill(int sx, int sy, int width, int height, fb_pixel_t col, int mode=0); void SetDemux(cDemux *Demux); static cVideo *GetDecoder(unsigned int Unit); bool SyncSTC(void); From 949306bfed7e198f31a1bcc48e244e06e825d33e Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Wed, 22 Mar 2017 12:11:26 +0100 Subject: [PATCH 02/15] acinclude: remove old unused cruft remove: - unused boxtypes, these only give a false sense of support - unused configure options and associated #defines in config.h - unused confiugre check macros Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/216a774343e1d054542d0e85031e0e2ccbce5d75 Author: Stefan Seyfried Date: 2017-03-22 (Wed, 22 Mar 2017) ------------------ This commit was generated by Migit --- acinclude.m4 | 240 +++------------------------------------------------ configure.ac | 1 - 2 files changed, 14 insertions(+), 227 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 67b67f0bf..fd0eda394 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -204,79 +204,6 @@ AC_SUBST(PUBLIC_HTTPDDIR) AC_SUBST(HOSTED_HTTPDDIR) dnl end workaround -AC_DEFUN([TUXBOX_APPS_ENDIAN],[ -AC_CHECK_HEADERS(endian.h) -AC_C_BIGENDIAN -]) - -AC_DEFUN([TUXBOX_APPS_DRIVER],[ -AC_ARG_WITH(driver, - [ --with-driver=PATH path for driver sources [[NONE]]], - [DRIVER="$withval"],[DRIVER=""]) - -if test -d "$DRIVER/include"; then - AC_DEFINE(HAVE_DBOX2_DRIVER,1,[Define to 1 if you have the dbox2 driver sources]) -else - AC_MSG_ERROR([can't find driver sources]) -fi - -AC_SUBST(DRIVER) - -CPPFLAGS="$CPPFLAGS -I$DRIVER/include" -]) - -AC_DEFUN([TUXBOX_APPS_DVB],[ -AC_ARG_WITH(dvbincludes, - [ --with-dvbincludes=PATH path for dvb includes [[NONE]]], - [DVBINCLUDES="$withval"],[DVBINCLUDES=""]) - -if test "$DVBINCLUDES"; then - CPPFLAGS="-I$DVBINCLUDES $CPPFLAGS" - CFLAGS="-I$DVBINCLUDES $CFLAGS" - CXXFLAGS="-I$DVBINCLUDES $CXXFLAGS" -fi - -AC_CHECK_HEADERS(linux/dvb/version.h,[ - AC_LANG_PREPROC_REQUIRE() - AC_REQUIRE([AC_PROG_EGREP]) - AC_LANG_CONFTEST([AC_LANG_SOURCE([[ -#include -version DVB_API_VERSION - ]])]) - DVB_API_VERSION=`(eval "$ac_cpp -traditional-cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | $EGREP "^version" | sed "s,version\ ,,"` - - AC_LANG_CONFTEST([AC_LANG_SOURCE([[ -#include -version DVB_API_VERSION_MINOR - ]])]) - DVB_API_VERSION_MINOR=`(eval "$ac_cpp -traditional-cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | $EGREP "^version" | sed "s,version\ ,,"` - rm -f conftest* - - AC_MSG_NOTICE([found dvb version $DVB_API_VERSION.$DVB_API_VERSION_MINOR]) -]) - -if test "$DVB_API_VERSION"; then - AC_DEFINE(HAVE_DVB,1,[Define to 1 if you have the dvb includes]) - AC_DEFINE_UNQUOTED(HAVE_DVB_API_VERSION,$DVB_API_VERSION,[Define to the version of the dvb api]) -else - AC_MSG_ERROR([can't find dvb headers]) -fi - -if test "$DVB_API_VERSION_MINOR"; then - AC_DEFINE_UNQUOTED(HAVE_DVB_API_VERSION_MINOR,$DVB_API_VERSION_MINOR,[Define to the minor version of the dvb api]) -else - AC_DEFINE_UNQUOTED(HAVE_DVB_API_VERSION_MINOR,0,[Define to the minor version of the dvb api]) -fi -]) - -AC_DEFUN([TUXBOX_APPS_CAPTURE],[ -AC_CHECK_HEADER(linux/dvb/avia/avia_gt_capture.h,[ - AC_DEFINE(HAVE_OLD_CAPTURE_API,1,[Define this if you want to use the old dbox2 capture API]) - AC_MSG_NOTICE([using old demux capture API])],[ - AC_MSG_NOTICE([using v4l2 capture API]) - ]) -]) - AC_DEFUN([_TUXBOX_APPS_LIB_CONFIG],[ AC_PATH_PROG($1_CONFIG,$2,no) if test "$$1_CONFIG" != "no"; then @@ -347,128 +274,20 @@ AC_DEFUN([TUXBOX_APPS_LIB_PKGCONFIG_CHECK],[ _TUXBOX_APPS_LIB_PKGCONFIG($1,$2) ]) -AC_DEFUN([_TUXBOX_APPS_LIB_SYMBOL],[ -AC_CHECK_LIB($2,$3,HAVE_$1="yes",HAVE_$1="no") -if test "$HAVE_$1" = "yes"; then - $1_LIBS=-l$2 -fi - -AC_SUBST($1_LIBS) -]) - -AC_DEFUN([TUXBOX_APPS_LIB_SYMBOL],[ -_TUXBOX_APPS_LIB_SYMBOL($1,$2,$3,ERROR) -if test "$HAVE_$1" = "no"; then - AC_MSG_ERROR([could not find $2]); -fi -]) - -AC_DEFUN([TUXBOX_APPS_LIB_CONFIG_SYMBOL],[ -_TUXBOX_APPS_LIB_SYMBOL($1,$2,$3,WARN) -]) - -AC_DEFUN([TUXBOX_APPS_GETTEXT],[ -AC_PATH_PROG(MSGFMT, msgfmt, no) -AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) -AC_PATH_PROG(XGETTEXT, xgettext, no) -AC_PATH_PROG(MSGMERGE, msgmerge, no) - -AC_MSG_CHECKING([whether NLS is requested]) -AC_ARG_ENABLE(nls, - [ --disable-nls do not use Native Language Support], - USE_NLS=$enableval, USE_NLS=yes) -AC_MSG_RESULT($USE_NLS) -AC_SUBST(USE_NLS) - -if test "$USE_NLS" = "yes"; then - AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,[ - AC_TRY_LINK([ - #include - #ifndef __GNU_GETTEXT_SUPPORTED_REVISION - #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) - #endif - extern int _nl_msg_cat_cntr; - extern int *_nl_domain_bindings; - ],[ - bindtextdomain ("", ""); - return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings; - ], gt_cv_func_gnugettext_libc=yes, gt_cv_func_gnugettext_libc=no - )] - ) - - if test "$gt_cv_func_gnugettext_libc" = "yes"; then - AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if translation of program messages to the user's native language is requested.]) - gt_use_preinstalled_gnugettext=yes - else - USE_NLS=no - fi -fi - -if test -f "$srcdir/po/LINGUAS"; then - ALL_LINGUAS=$(sed -e "/^#/d" "$srcdir/po/LINGUAS") -fi - -POFILES= -GMOFILES= -UPDATEPOFILES= -DUMMYPOFILES= -for lang in $ALL_LINGUAS; do - POFILES="$POFILES $srcdirpre$lang.po" - GMOFILES="$GMOFILES $srcdirpre$lang.gmo" - UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" - DUMMYPOFILES="$DUMMYPOFILES $lang.nop" -done -INST_LINGUAS= -if test -n "$ALL_LINGUAS"; then - for presentlang in $ALL_LINGUAS; do - useit=no - if test -n "$LINGUAS"; then - desiredlanguages="$LINGUAS" - else - desiredlanguages="$ALL_LINGUAS" - fi - for desiredlang in $desiredlanguages; do - case "$desiredlang" in - "$presentlang"*) useit=yes;; - esac - done - if test $useit = yes; then - INST_LINGUAS="$INST_LINGUAS $presentlang" - fi - done -fi -CATALOGS= -if test -n "$INST_LINGUAS"; then - for lang in $INST_LINGUAS; do - CATALOGS="$CATALOGS $lang.gmo" - done -fi -AC_SUBST(POFILES) -AC_SUBST(GMOFILES) -AC_SUBST(UPDATEPOFILES) -AC_SUBST(DUMMYPOFILES) -AC_SUBST(CATALOGS) -]) - AC_DEFUN([TUXBOX_BOXTYPE],[ AC_ARG_WITH(boxtype, - [ --with-boxtype valid values: dbox2,tripledragon,dreambox,ipbox,coolstream,generic], + [ --with-boxtype valid values: tripledragon,coolstream,spark,azbox,generic], [case "${withval}" in - dbox2|dreambox|ipbox|tripledragon|coolstream|generic) + tripledragon|coolstream|spark|azbox|generic) BOXTYPE="$withval" ;; - dm*) - BOXTYPE="dreambox" - BOXMODEL="$withval" - ;; *) AC_MSG_ERROR([bad value $withval for --with-boxtype]) ;; esac], [BOXTYPE="coolstream"]) AC_ARG_WITH(boxmodel, [ --with-boxmodel valid for coolstream: hd1, hd2 - valid for dreambox: dm500, dm500plus, dm600pvr, dm56x0, dm7000, dm7020, dm7025 - valid for ipbox: ip200, ip250, ip350, ip400], + valid for generic: raspi], [case "${withval}" in hd1|hd2) if test "$BOXTYPE" = "coolstream"; then @@ -489,20 +308,9 @@ AC_ARG_WITH(boxmodel, AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE]) fi ;; - dm500|dm500plus|dm600pvr|dm56x0|dm7000|dm7020|dm7025) - if test "$BOXTYPE" = "dreambox"; then + raspi) + if test "$BOXTYPE" = "generic"; then BOXMODEL="$withval" - else - AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE]) - fi - ;; - ip200|ip250|ip350|ip400) - if test "$BOXTYPE" = "ipbox"; then - BOXMODEL="$withval" - else - AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE]) - fi - ;; *) AC_MSG_ERROR([unsupported value $withval for --with-boxmodel]) ;; @@ -514,37 +322,25 @@ AC_ARG_WITH(boxmodel, AC_SUBST(BOXTYPE) AC_SUBST(BOXMODEL) -AM_CONDITIONAL(BOXTYPE_DBOX2, test "$BOXTYPE" = "dbox2") +AM_CONDITIONAL(BOXTYPE_AZBOX, test "$BOXTYPE" = "azbox") AM_CONDITIONAL(BOXTYPE_TRIPLE, test "$BOXTYPE" = "tripledragon") -AM_CONDITIONAL(BOXTYPE_DREAMBOX, test "$BOXTYPE" = "dreambox") -AM_CONDITIONAL(BOXTYPE_IPBOX, test "$BOXTYPE" = "ipbox") AM_CONDITIONAL(BOXTYPE_COOL, test "$BOXTYPE" = "coolstream") +AM_CONDITIONAL(BOXTYPE_SPARK, test "$BOXTYPE" = "spark") AM_CONDITIONAL(BOXTYPE_GENERIC, test "$BOXTYPE" = "generic") AM_CONDITIONAL(BOXMODEL_CS_HD1,test "$BOXMODEL" = "hd1") AM_CONDITIONAL(BOXMODEL_CS_HD2,test "$BOXMODEL" = "hd2") -AM_CONDITIONAL(BOXMODEL_DM500,test "$BOXMODEL" = "dm500") -AM_CONDITIONAL(BOXMODEL_DM500PLUS,test "$BOXMODEL" = "dm500plus") -AM_CONDITIONAL(BOXMODEL_DM600PVR,test "$BOXMODEL" = "dm600pvr") -AM_CONDITIONAL(BOXMODEL_DM56x0,test "$BOXMODEL" = "dm56x0") -AM_CONDITIONAL(BOXMODEL_DM7000,test "$BOXMODEL" = "dm7000" -o "$BOXMODEL" = "dm7020" -o "$BOXMODEL" = "dm7025") +AM_CONDITIONAL(BOXMODEL_RASPI,test "$BOXMODEL" = "raspi") -AM_CONDITIONAL(BOXMODEL_IP200,test "$BOXMODEL" = "ip200") -AM_CONDITIONAL(BOXMODEL_IP250,test "$BOXMODEL" = "ip250") -AM_CONDITIONAL(BOXMODEL_IP350,test "$BOXMODEL" = "ip350") -AM_CONDITIONAL(BOXMODEL_IP400,test "$BOXMODEL" = "ip400") - -if test "$BOXTYPE" = "dbox2"; then - AC_DEFINE(HAVE_DBOX_HARDWARE, 1, [building for a dbox2]) +if test "$BOXTYPE" = "azbox"; then + AC_DEFINE(HAVE_AZBOX_HARDWARE, 1, [building for an azbox]) elif test "$BOXTYPE" = "tripledragon"; then AC_DEFINE(HAVE_TRIPLEDRAGON, 1, [building for a tripledragon]) -elif test "$BOXTYPE" = "dreambox"; then - AC_DEFINE(HAVE_DREAMBOX_HARDWARE, 1, [building for a dreambox]) -elif test "$BOXTYPE" = "ipbox"; then - AC_DEFINE(HAVE_IPBOX_HARDWARE, 1, [building for an ipbox]) elif test "$BOXTYPE" = "coolstream"; then AC_DEFINE(HAVE_COOL_HARDWARE, 1, [building for a coolstream]) +elif test "$BOXTYPE" = "spark"; then + AC_DEFINE(HAVE_SPARK_HARDWARE, 1, [building for a goldenmedia 990 or edision pingulux]) elif test "$BOXTYPE" = "generic"; then AC_DEFINE(HAVE_GENERIC_HARDWARE, 1, [building for a generic device like a standard PC]) fi @@ -554,16 +350,8 @@ if test "$BOXMODEL" = "hd1"; then AC_DEFINE(BOXMODEL_CS_HD1, 1, [coolstream hd1/neo/neo2/zee]) elif test "$BOXMODEL" = "hd2"; then AC_DEFINE(BOXMODEL_CS_HD2, 1, [coolstream tank/trinity/trinity v2/trinity duo/zeeČ/link]) -elif test "$BOXMODEL" = "dm500"; then - AC_DEFINE(BOXMODEL_DM500, 1, [dreambox 500]) -elif test "$BOXMODEL" = "ip200"; then - AC_DEFINE(BOXMODEL_IP200, 1, [ipbox 200]) -elif test "$BOXMODEL" = "ip250"; then - AC_DEFINE(BOXMODEL_IP250, 1, [ipbox 250]) -elif test "$BOXMODEL" = "ip350"; then - AC_DEFINE(BOXMODEL_IP350, 1, [ipbox 350]) -elif test "$BOXMODEL" = "ip400"; then - AC_DEFINE(BOXMODEL_IP400, 1, [ipbox 400]) +elif test "$BOXMODEL" = "raspi"; then + AC_DEFINE(BOXMODEL_RASPI, 1, [Raspberry pi]) fi ]) diff --git a/configure.ac b/configure.ac index 2dc77868d..2e7c6d353 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,6 @@ AM_INIT_AUTOMAKE([1.0.1 nostdinc]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) TUXBOX_APPS -TUXBOX_APPS_DVB TUXBOX_APPS_DIRECTORY TUXBOX_APPS_PKGCONFIG TUXBOX_BOXTYPE From e7fc4f07e20fb5baa8a366b1262f762f8f019e36 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 22 Mar 2017 12:11:26 +0100 Subject: [PATCH 03/15] acinclude.m4: align to neutrino-mp Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/54ff55dd476b198f156c34f6138a8d06223cef94 Author: vanhofen Date: 2017-03-22 (Wed, 22 Mar 2017) Origin message was: ------------------ - acinclude.m4: align to neutrino-mp ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- acinclude.m4 | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index fd0eda394..4f8961c2e 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -10,7 +10,7 @@ AC_ARG_WITH(target, AC_ARG_WITH(targetprefix, [ --with-targetprefix=PATH prefix relative to target root (only applicable in cdk mode)], - [TARGET_PREFIX="$withval"],[TARGET_PREFIX="NONE"]) + [TARGET_PREFIX="$withval"],[TARGET_PREFIX=""]) AC_ARG_WITH(debug, [ --without-debug disable debugging code], @@ -127,6 +127,8 @@ if test "$TARGET" = "cdk"; then targetlocalstatedir="\${TARGET_PREFIX}/var" targetlibdir="\${TARGET_PREFIX}/lib" targetmntdir="\${TARGET_PREFIX}/mnt" +else + mntdir="/mnt" # hack fi TUXBOX_APPS_DIRECTORY_ONE(configdir,CONFIGDIR,localstatedir,/var,/tuxbox/config, @@ -241,8 +243,13 @@ _TUXBOX_APPS_LIB_CONFIG($1,$2,WARN) ]) AC_DEFUN([TUXBOX_APPS_PKGCONFIG],[ -AC_PATH_PROG(PKG_CONFIG, pkg-config,no) -if test "$PKG_CONFIG" = "no" ; then +m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test x"$PKG_CONFIG" = x"" ; then AC_MSG_ERROR([could not find pkg-config]); fi ]) @@ -311,6 +318,10 @@ AC_ARG_WITH(boxmodel, raspi) if test "$BOXTYPE" = "generic"; then BOXMODEL="$withval" + else + AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE]) + fi + ;; *) AC_MSG_ERROR([unsupported value $withval for --with-boxmodel]) ;; From e2401e81d169b9ccc9b7b38add54f6829659dfda Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 22 Mar 2017 12:11:26 +0100 Subject: [PATCH 04/15] acinclude.m4: remove more old unused cruft I don't know if CC/CXX-handling is right, but powerpc-tuxbox-linux-gnu was definitely wrong. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/e3920273bf3b94fb864652fa2db900486ed92bb6 Author: vanhofen Date: 2017-03-22 (Wed, 22 Mar 2017) Origin message was: ------------------ - acinclude.m4: remove more old unused cruft I don't know if CC/CXX-handling is right, but powerpc-tuxbox-linux-gnu was definitely wrong. ------------------ This commit was generated by Migit --- acinclude.m4 | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 4f8961c2e..6212c1f25 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -42,11 +42,10 @@ elif test "$TARGET" = "cdk"; then AC_MSG_RESULT(cdk) if test "$CC" = "" -a "$CXX" = ""; then - CC=powerpc-tuxbox-linux-gnu-gcc CXX=powerpc-tuxbox-linux-gnu-g++ + AC_MSG_ERROR([you need to specify variables CC or CXX in cdk]) fi - if test "$CFLAGS" = "" -a "$CXXFLAGS" = ""; then - CFLAGS="-Wall -Os -mcpu=823 -pipe $DEBUG_CFLAGS" - CXXFLAGS="-Wall -Os -mcpu=823 -pipe $DEBUG_CFLAGS" + if test "$CFLAGS" = "" -o "$CXXFLAGS" = ""; then + AC_MSG_ERROR([you need to specify variables CFLAGS and CXXFLAGS in cdk]) fi if test "$prefix" = "NONE"; then AC_MSG_ERROR([invalid prefix, you need to specify one in cdk mode]) @@ -58,10 +57,6 @@ elif test "$TARGET" = "cdk"; then AC_MSG_ERROR([invalid targetprefix, you need to specify one in cdk mode]) TARGET_PREFIX="" fi - if test "$host_alias" = ""; then - cross_compiling=yes - host_alias=powerpc-tuxbox-linux-gnu - fi else AC_MSG_RESULT(none) AC_MSG_ERROR([invalid target $TARGET, choose on from native,cdk]); @@ -326,9 +321,7 @@ AC_ARG_WITH(boxmodel, AC_MSG_ERROR([unsupported value $withval for --with-boxmodel]) ;; esac], [test "$BOXTYPE" = "coolstream" && BOXMODEL="hd1" || true] - [if test "$BOXTYPE" = "dreambox" -o "$BOXTYPE" = "ipbox" && test -z "$BOXMODEL"; then - AC_MSG_ERROR([Dreambox/IPBox needs --with-boxmodel]) - fi]) + ) AC_SUBST(BOXTYPE) AC_SUBST(BOXMODEL) @@ -360,7 +353,7 @@ fi if test "$BOXMODEL" = "hd1"; then AC_DEFINE(BOXMODEL_CS_HD1, 1, [coolstream hd1/neo/neo2/zee]) elif test "$BOXMODEL" = "hd2"; then - AC_DEFINE(BOXMODEL_CS_HD2, 1, [coolstream tank/trinity/trinity v2/trinity duo/zeeČ/link]) + AC_DEFINE(BOXMODEL_CS_HD2, 1, [coolstream tank/trinity/trinity v2/trinity duo/zee2/link]) elif test "$BOXMODEL" = "raspi"; then AC_DEFINE(BOXMODEL_RASPI, 1, [Raspberry pi]) fi @@ -387,4 +380,3 @@ AC_DEFUN([AC_PROG_EGREP], EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ]) - From 79b679a9ca119237dbbd05013fc5be55df4ad1ab Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Wed, 22 Mar 2017 07:27:12 +0100 Subject: [PATCH 05/15] Fix videosystem auto mode / osd mode switch in movie player Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/2a858c628a98bc70184a0ce62c75cdaebac7c850 Author: Michael Liebmann Date: 2017-03-22 (Wed, 22 Mar 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/movieplayer.cpp | 20 ++++++++++++++++++++ src/gui/movieplayer.h | 2 ++ 2 files changed, 22 insertions(+) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 46e222231..9f1eb5862 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -147,6 +148,8 @@ void CMoviePlayerGui::Init(void) { playing = false; stopped = true; + currentVideoSystem = -1; + currentOsdResolution = 0; frameBuffer = CFrameBuffer::getInstance(); @@ -223,6 +226,12 @@ void CMoviePlayerGui::cutNeutrino() if (playing) return; +#ifdef ENABLE_CHANGE_OSD_RESOLUTION + COsdHelpers *coh = COsdHelpers::getInstance(); + currentVideoSystem = coh->getVideoSystem(); + currentOsdResolution = coh->getOsdResolution(); +#endif + playing = true; /* set g_InfoViewer update timer to 1 sec, should be reset to default from restoreNeutrino->set neutrino mode */ if (!isWebTV) @@ -247,6 +256,17 @@ void CMoviePlayerGui::restoreNeutrino() if (!playing) return; +#ifdef ENABLE_CHANGE_OSD_RESOLUTION + if ((currentVideoSystem > -1) && (g_settings.video_Mode == VIDEO_STD_AUTO)) { + COsdHelpers *coh = COsdHelpers::getInstance(); + if (currentVideoSystem != coh->getVideoSystem()) { + coh->setVideoSystem(currentVideoSystem, false); + coh->changeOsdResolution(currentOsdResolution, false, true); + } + currentVideoSystem = -1; + } +#endif + playing = false; if (isUPNP) diff --git a/src/gui/movieplayer.h b/src/gui/movieplayer.h index 1e15997d7..0b6cd507d 100644 --- a/src/gui/movieplayer.h +++ b/src/gui/movieplayer.h @@ -118,6 +118,8 @@ class CMoviePlayerGui : public CMenuTarget int startposition; int position; int duration; + int currentVideoSystem; + uint32_t currentOsdResolution; unsigned short numpida; unsigned short vpid; From b6e0d61d7a8809be628e8fce6ac44a05d44fad10 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 22 Mar 2017 14:30:34 +0100 Subject: [PATCH 06/15] lcd4l: try to fix display of webtv-channels on external lcd Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/a79dbe65575eeaabec9557e966e69f6aab03c416 Author: vanhofen Date: 2017-03-22 (Wed, 22 Mar 2017) Origin message was: ------------------ - lcd4l: try to fix display of webtv-channels on external lcd ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/lcd4l.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/lcd4l.cpp b/src/gui/lcd4l.cpp index 209cb505d..b92a94641 100644 --- a/src/gui/lcd4l.cpp +++ b/src/gui/lcd4l.cpp @@ -917,7 +917,11 @@ uint64_t CLCD4l::GetParseID() if (m_ModeChannel > 1) ID = g_RemoteControl->subChannels[g_RemoteControl->selected_subchannel].getChannelID(); else - ID = CZapit::getInstance()->GetCurrentChannelID(); + { + CZapitChannel * channel = CZapit::getInstance()->GetCurrentChannel(); + if (channel) + ID = channel->getEpgID(); + } } //printf("[CLCD4l] %s: %llx\n", __FUNCTION__, ID); return ID; From 56ccefe22a32056f52336d9a5af3d258c3898e75 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 23 Mar 2017 12:23:56 +0100 Subject: [PATCH 07/15] cables.xml: update WTC SN; thanks to Gorcon Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/608c0926856c7555eb16163d52cde054f49ece39 Author: vanhofen Date: 2017-03-23 (Thu, 23 Mar 2017) Origin message was: ------------------ - cables.xml: update WTC SN; thanks to Gorcon ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/cables.xml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/data/cables.xml b/data/cables.xml index 4970d600c..e05516a44 100644 --- a/data/cables.xml +++ b/data/cables.xml @@ -442,10 +442,10 @@ - - + + @@ -456,15 +456,21 @@ + + - - - - - + + + + + + + + + @@ -473,6 +479,11 @@ + + + + + From 69fb6175d4e045dd6ac8c785d46be4f3030cb917 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 23 Mar 2017 12:43:27 +0100 Subject: [PATCH 08/15] fix needed mem check Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/833a65c9e46a7ca45a09076225399a74fc623ae5 Author: Jacek Jendrzej Date: 2017-03-23 (Thu, 23 Mar 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/pictureviewer/pictureviewer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/driver/pictureviewer/pictureviewer.cpp b/src/driver/pictureviewer/pictureviewer.cpp index 84f2fc7a6..8b22b68aa 100644 --- a/src/driver/pictureviewer/pictureviewer.cpp +++ b/src/driver/pictureviewer/pictureviewer.cpp @@ -170,7 +170,8 @@ bool CPictureViewer::DecodeImage (const std::string & _name, bool showBusySign, m_NextPic_Buffer = NULL; } size_t bufsize = x * y * 3; - if (!checkfreemem(bufsize)){ + size_t resizeBuf = (m_endx - m_startx) * (m_endy - m_starty)*3; + if (!checkfreemem(bufsize + resizeBuf)){ return false; } m_NextPic_Buffer = (unsigned char *) malloc (bufsize); @@ -856,8 +857,8 @@ bool CPictureViewer::checkfreemem(size_t bufsize) { struct sysinfo info; sysinfo( &info ); - if(bufsize*2 + 4096 > (size_t)info.freeram + (size_t)info.freeswap){ - dprintf(DEBUG_NORMAL, "[CPictureViewer] [%s - %d] Error: Out of memory\n", __func__, __LINE__); + if(bufsize + 4096 > (size_t)info.freeram + (size_t)info.freeswap){ + dprintf(DEBUG_NORMAL, "[CPictureViewer] [%s - %d] Error: Out of memory: need %zu > free %zu\n", __func__, __LINE__,bufsize,(size_t)info.freeram + (size_t)info.freeswap); return false; } return true; From fb73c5ab06ceb3b562bc5c613f457697be5c5b83 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 23 Mar 2017 19:00:57 +0100 Subject: [PATCH 09/15] acinclude.m4: fix merge error Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/d0e7145f37bc3f942fba474787dceada6ea301c1 Author: vanhofen Date: 2017-03-23 (Thu, 23 Mar 2017) Origin message was: ------------------ - acinclude.m4: fix merge error ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- acinclude.m4 | 1 + 1 file changed, 1 insertion(+) diff --git a/acinclude.m4 b/acinclude.m4 index 3a645d476..0f67ee152 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -376,6 +376,7 @@ if test "$BOXMODEL" = "hd1"; then AC_DEFINE(BOXMODEL_CS_HD1, 1, [coolstream hd1/neo/neo2/zee]) elif test "$BOXMODEL" = "hd2"; then AC_DEFINE(BOXMODEL_CS_HD2, 1, [coolstream tank/trinity/trinity v2/trinity duo/zee2/link]) + AC_DEFINE(ENABLE_CHANGE_OSD_RESOLUTION,1,[enable change the osd resolution]) elif test "$BOXMODEL" = "raspi"; then AC_DEFINE(BOXMODEL_RASPI, 1, [Raspberry pi]) fi From 968e1ce9c0eb4ad9b83e001dc7a409947ac02381 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Thu, 23 Mar 2017 21:26:57 +0100 Subject: [PATCH 10/15] src/neutrino.cpp: Simplification EVT_AUTO_SET_VIDEOSYSTEM handling Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/ea18657562fb62154f61e6818d994d76931b9174 Author: Michael Liebmann Date: 2017-03-23 (Thu, 23 Mar 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/neutrino.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index da09d08ca..aba7e3978 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2995,16 +2995,11 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data) printf(">>>>>[CNeutrinoApp::%s:%d] Receive EVT_AUTO_SET_VIDEOSYSTEM message\n", __func__, __LINE__); COsdHelpers *coh = COsdHelpers::getInstance(); int videoSystem = (int)data; - if (coh->getVideoSystem() == videoSystem) - return messages_return::handled; - - if (!frameBufferInitialized) { + if (coh->getVideoSystem() != videoSystem) { coh->setVideoSystem(videoSystem, false); - return messages_return::handled; + if (frameBufferInitialized) + coh->changeOsdResolution(0, true, false); } - - coh->setVideoSystem(videoSystem, false); - coh->changeOsdResolution(0, true, false); return messages_return::handled; } if(msg == NeutrinoMessages::EVT_ZAP_COMPLETE) { From c2d87de865c28e9ea77dccccd88d77361976408f Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Thu, 23 Mar 2017 21:27:06 +0100 Subject: [PATCH 11/15] CFbAccelCSHD2::setMode: Fix if ENABLE_CHANGE_OSD_RESOLUTION is not defined Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/515ab1fe598276b2cb169298cf9fd81968a7c3cd Author: Michael Liebmann Date: 2017-03-23 (Thu, 23 Mar 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/fb_accel_cs_hd2.cpp | 50 ++++++++++++++++++++-------------- src/neutrino.cpp | 2 +- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/src/driver/fb_accel_cs_hd2.cpp b/src/driver/fb_accel_cs_hd2.cpp index d8d13e543..7ca2eed3c 100644 --- a/src/driver/fb_accel_cs_hd2.cpp +++ b/src/driver/fb_accel_cs_hd2.cpp @@ -234,29 +234,35 @@ int CFbAccelCSHD2::setMode(unsigned int nxRes, unsigned int nyRes, unsigned int if (osd_resolutions.empty()) setOsdResolutions(); - if (fullHdAvailable()) { - screeninfo.xres=nxRes; - screeninfo.yres=nyRes; - screeninfo.xres_virtual=nxRes; - screeninfo.yres_virtual=nyRes*2; - screeninfo.height=0; - screeninfo.width=0; - screeninfo.xoffset=screeninfo.yoffset=0; - screeninfo.bits_per_pixel=nbpp; + unsigned int nxRes_ = nxRes; + unsigned int nyRes_ = nyRes; + unsigned int nbpp_ = nbpp; + if (!fullHdAvailable()) { + nxRes_ = 1280; + nyRes_ = 720; + nbpp_ = 32; + } + screeninfo.xres=nxRes_; + screeninfo.yres=nyRes_; + screeninfo.xres_virtual=nxRes_; + screeninfo.yres_virtual=nyRes_*2; + screeninfo.height=0; + screeninfo.width=0; + screeninfo.xoffset=screeninfo.yoffset=0; + screeninfo.bits_per_pixel=nbpp_; - if (ioctl(fd, FBIOPUT_VSCREENINFO, &screeninfo)<0) - perror(LOGTAG "FBIOPUT_VSCREENINFO"); + if (ioctl(fd, FBIOPUT_VSCREENINFO, &screeninfo)<0) + perror(LOGTAG "FBIOPUT_VSCREENINFO"); - printf(LOGTAG "SetMode: %dbits, red %d:%d green %d:%d blue %d:%d transp %d:%d\n", - screeninfo.bits_per_pixel, screeninfo.red.length, screeninfo.red.offset, screeninfo.green.length, screeninfo.green.offset, screeninfo.blue.length, screeninfo.blue.offset, screeninfo.transp.length, screeninfo.transp.offset); - if ((screeninfo.xres != nxRes) || - (screeninfo.yres != nyRes) || - (screeninfo.bits_per_pixel != nbpp)) { - printf(LOGTAG "SetMode failed: wanted: %dx%dx%d, got %dx%dx%d\n", - nxRes, nyRes, nbpp, - screeninfo.xres, screeninfo.yres, screeninfo.bits_per_pixel); - return -1; - } + printf(LOGTAG "SetMode: %dbits, red %d:%d green %d:%d blue %d:%d transp %d:%d\n", + screeninfo.bits_per_pixel, screeninfo.red.length, screeninfo.red.offset, screeninfo.green.length, screeninfo.green.offset, screeninfo.blue.length, screeninfo.blue.offset, screeninfo.transp.length, screeninfo.transp.offset); + if ((screeninfo.xres != nxRes_) || + (screeninfo.yres != nyRes_) || + (screeninfo.bits_per_pixel != nbpp_)) { + printf(LOGTAG "SetMode failed: wanted: %dx%dx%d, got %dx%dx%d\n", + nxRes_, nyRes_, nbpp_, + screeninfo.xres, screeninfo.yres, screeninfo.bits_per_pixel); + return -1; } fb_fix_screeninfo _fix; @@ -337,8 +343,10 @@ int CFbAccelCSHD2::scale2Res(int size) bool CFbAccelCSHD2::fullHdAvailable() { +#ifdef ENABLE_CHANGE_OSD_RESOLUTION if (available >= 16588800) /* new fb driver with maxres 1920x1080(*8) */ return true; +#endif return false; } diff --git a/src/neutrino.cpp b/src/neutrino.cpp index aba7e3978..a37a4d3df 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2139,7 +2139,7 @@ int CNeutrinoApp::run(int argc, char **argv) TIMER_START(); cs_api_init(); cs_register_messenger(CSSendMessage); -#ifdef BOXMODEL_CS_HD2 +#if defined(HAVE_COOL_HARDWARE) && defined(ENABLE_CHANGE_OSD_RESOLUTION) cs_new_auto_videosystem(); #endif From 3cf7452c6963581ff75978a3464150ae518dd51c Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 24 Mar 2017 21:26:21 +0100 Subject: [PATCH 12/15] lcd4l: try to fix display of webtv-channels on external lcd; pt. 2 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/27a925ab28f5a35627a04b79f94a7b0da8bed7f9 Author: vanhofen Date: 2017-03-24 (Fri, 24 Mar 2017) Origin message was: ------------------ - lcd4l: try to fix display of webtv-channels on external lcd; pt. 2 ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/lcd4l.cpp | 16 +++++++++------- src/gui/lcd4l.h | 2 ++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/gui/lcd4l.cpp b/src/gui/lcd4l.cpp index b92a94641..3a2930678 100644 --- a/src/gui/lcd4l.cpp +++ b/src/gui/lcd4l.cpp @@ -722,8 +722,14 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) if (m_ModeChannel) { + t_channel_id channel_id = parseID & 0xFFFFFFFFFFFFULL; + + CZapitChannel * channel = CZapit::getInstance()->GetCurrentChannel(); + if (channel) + channel_id = channel->getEpgID(); + CSectionsdClient::CurrentNextInfo CurrentNext; - CEitManager::getInstance()->getCurrentNextServiceKey(parseID & 0xFFFFFFFFFFFFULL, CurrentNext); + CEitManager::getInstance()->getCurrentNextServiceKey(channel_id, CurrentNext); if (CSectionsdClient::epgflags::has_current) { @@ -907,7 +913,7 @@ uint64_t CLCD4l::GetParseID() m_Mode = (int) ID; m_ModeChannel = 0; - if (ID == MODE_TV || ID == MODE_RADIO) + if (ID == MODE_TV || ID == MODE_WEBTV || ID == MODE_RADIO) { if (!(g_RemoteControl->subChannels.empty()) && (g_RemoteControl->selected_subchannel > 0)) m_ModeChannel = 2; @@ -917,11 +923,7 @@ uint64_t CLCD4l::GetParseID() if (m_ModeChannel > 1) ID = g_RemoteControl->subChannels[g_RemoteControl->selected_subchannel].getChannelID(); else - { - CZapitChannel * channel = CZapit::getInstance()->GetCurrentChannel(); - if (channel) - ID = channel->getEpgID(); - } + ID = CZapit::getInstance()->GetCurrentChannelID(); } //printf("[CLCD4l] %s: %llx\n", __FUNCTION__, ID); return ID; diff --git a/src/gui/lcd4l.h b/src/gui/lcd4l.h index 73ab62dfa..9708cbf14 100644 --- a/src/gui/lcd4l.h +++ b/src/gui/lcd4l.h @@ -62,6 +62,8 @@ class CLCD4l MODE_PIC = 6, MODE_TS = 7, MODE_OFF = 8, + MODE_WEBTV = 9, + MODE_UPNP = 10, MODE_MASK = 0xFF, NOREZAP = 0x100 }; From b80fd4d8c31e754cb0c4d69902bf900ef7b99638 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 26 Mar 2017 23:20:14 +0200 Subject: [PATCH 13/15] movieplayer.h: revert some NI-changes; ... we can use GetFile() instead of pretty_name Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/71569a11323dd82160c3b82aa8a561350a15eef0 Author: vanhofen Date: 2017-03-26 (Sun, 26 Mar 2017) Origin message was: ------------------ - movieplayer.h: revert some NI-changes; ... we can use GetFile() instead of pretty_name ------------------ This commit was generated by Migit --- src/gui/movieplayer.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/movieplayer.h b/src/gui/movieplayer.h index 9d9361ee0..098d723bd 100644 --- a/src/gui/movieplayer.h +++ b/src/gui/movieplayer.h @@ -102,7 +102,7 @@ class CMoviePlayerGui : public CMenuTarget int m_LastMode; //NI std::string file_name; -//NI std::string pretty_name; + std::string pretty_name; std::string cookie_header; std::string info_1, info_2; std::string currentaudioname; @@ -271,7 +271,6 @@ class CMoviePlayerGui : public CMenuTarget //NI MI_MOVIE_INFO * p_movie_info; std::string file_name; - std::string pretty_name; int getState() { return playstate; }; }; From 3ba4cfb126508a453daed6e5798fc4a78818d804 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 26 Mar 2017 23:21:29 +0200 Subject: [PATCH 14/15] menue: fix lcd4l-support for directly started items; ... this fixes missing lcd4l-support in mode_upnp Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/da62cd195ba2d9c4d542858ce14be17585a76afc Author: vanhofen Date: 2017-03-26 (Sun, 26 Mar 2017) Origin message was: ------------------ - menue: fix lcd4l-support for directly started items; ... this fixes missing lcd4l-support in mode_upnp ------------------ This commit was generated by Migit --- src/gui/widget/menue.cpp | 20 +++++++++++++++++--- src/gui/widget/menue.h | 3 +++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 371f706c4..0e14e3a78 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -95,6 +95,8 @@ CMenuItem::CMenuItem(bool Active, neutrino_msg_t DirectKey, const char * const I height = 0; actObserv = NULL; parent_widget = NULL; + + lcd4l_text = ""; //NI lcd4l-support } void CMenuItem::init(const int X, const int Y, const int DX, const int OFFX) @@ -222,15 +224,19 @@ void CMenuItem::paintItemCaption(const bool select_mode, const char * right_text CVFD::getInstance()->showMenuText(0, str, -1, true); //NI lcd4l-support if(g_settings.lcd4l_support) - LCD4l->CreateFile("/tmp/lcd/menu", str, g_settings.lcd4l_convert); + lcd4l_text = str; } else { CVFD::getInstance()->showMenuText(0, left_text, -1, true); //NI lcd4l-support - if(g_settings.lcd4l_support) - LCD4l->CreateFile("/tmp/lcd/menu", left_text, g_settings.lcd4l_convert); + if (g_settings.lcd4l_support) + lcd4l_text = left_text; } + + //NI lcd4l-support + if (g_settings.lcd4l_support) + LCD4l->CreateFile("/tmp/lcd/menu", lcd4l_text, g_settings.lcd4l_convert); } //left text @@ -938,6 +944,9 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) case (CRCInput::RC_ok): { if(hasItem() && selected > -1 && (int)items.size() > selected) { + //NI lcd4l-support + LCD4l->RemoveFile("/tmp/lcd/menu"); + //exec this item... CMenuItem* item = items[selected]; if (!item->isSelectable()) @@ -945,6 +954,11 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &) item->msg = msg; fader.StopFade(); int rv = item->exec( this ); + + //NI lcd4l-support + if (g_settings.lcd4l_support) + LCD4l->CreateFile("/tmp/lcd/menu", item->lcd4l_text, g_settings.lcd4l_convert); + switch ( rv ) { case menu_return::RETURN_EXIT_ALL: retval = menu_return::RETURN_EXIT_ALL; diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index ff4f3e008..84ba02510 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -197,6 +197,9 @@ class CMenuItem : public CComponentsSignals void activateNotify(void); virtual void disableByCondition(const menu_item_disable_cond_t& condition); void setParentWidget(CMenuWidget* parent){parent_widget = parent;} + + //NI lcd4l-support + std::string lcd4l_text; }; class CMenuSeparator : public CMenuItem From f0c594db2a57969b32368437f8606f383e112c82 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 26 Mar 2017 23:23:01 +0200 Subject: [PATCH 15/15] lcd4l: add support for mode_upnp; ... use Getfile() instead of pretty_name in mode_ts Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/902e4e918dbf618038b171aec06b82f94e02c5a4 Author: vanhofen Date: 2017-03-26 (Sun, 26 Mar 2017) Origin message was: ------------------ - lcd4l: add support for mode_upnp; ... use Getfile() instead of pretty_name in mode_ts ------------------ This commit was generated by Migit --- src/gui/lcd4l.cpp | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/gui/lcd4l.cpp b/src/gui/lcd4l.cpp index 3a2930678..652049f2e 100644 --- a/src/gui/lcd4l.cpp +++ b/src/gui/lcd4l.cpp @@ -615,6 +615,10 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) Logo = ICONSDIR "/" NEUTRINO_ICON_MOVIEPLAYER ICONSEXT; } } + else if (parseID == MODE_UPNP) + { + Service = g_Locale->getText(LOCALE_UPNPBROWSER_HEAD); + } else if (parseID == MODE_STANDBY) { Service = "STANDBY"; @@ -798,10 +802,12 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) snprintf(Start, sizeof(Start), "%02d:%02d", tm_struct->tm_hour, tm_struct->tm_min); } - //else if (parseID == MODE_PIC) - //{ +#if 0 + else if (parseID == MODE_PIC) + { // TODO: Event = Bildname - //} + } +#endif else if (parseID == MODE_TS) { if (CMoviePlayerGui::getInstance().p_movie_info) @@ -809,8 +815,8 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) if (!CMoviePlayerGui::getInstance().p_movie_info->epgTitle.empty()) Event = CMoviePlayerGui::getInstance().p_movie_info->epgTitle; } - else if (!CMoviePlayerGui::getInstance().pretty_name.empty()) - Event = CMoviePlayerGui::getInstance().pretty_name; + else if (!CMoviePlayerGui::getInstance().GetFile().empty()) + Event = CMoviePlayerGui::getInstance().GetFile(); if (Event.empty()) Event = "MOVIE"; @@ -835,7 +841,12 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun) snprintf(End, sizeof(End), "%02d:%02d", tm_struct->tm_hour, tm_struct->tm_min); } - +#if 0 + else if (parseID == MODE_UPNP) + { + // TODO? + } +#endif /* ----------------------------------------------------------------- */ Event += "\n"; // make sure we have at least two lines in event-file