From eee00885ef5db175c96812371e412c3ef8c99746 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 27 Nov 2017 10:22:52 +0100 Subject: [PATCH 01/15] locale: minor changes on new tunersetup locales Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/7e8b866425b07e95efd571060205f26a61ff6fb5 Author: vanhofen Date: 2017-11-27 (Mon, 27 Nov 2017) Origin message was: ------------------ - locale: minor changes on new tunersetup locales Signed-off-by: Thilo Graf --- data/locale/deutsch.locale | 2 +- data/locale/english.locale | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index b7ce67e64..e893c24e9 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -2403,7 +2403,7 @@ timing.volumebar Lautstärkeanzeige tunersetup.cable Kabel (DVB-C) tunersetup.hybrid Hybrid (DVB-C/T/T2) tunersetup.mode Betriebsmodus -tunersetup.power 5V Versorgung bei DVB-T/T2 Kanälen +tunersetup.power 5V-Versorgung bei DVB-T/T2 Kanälen tunersetup.terr Terrestrisch (DVB-T/T2) tmdb.api_key TMDb API Schlüssel tmdb.enabled TMDb-Unterstützung diff --git a/data/locale/english.locale b/data/locale/english.locale index a37f2ba6f..094a43057 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -2402,8 +2402,8 @@ timing.static_messages Interactive messages timing.volumebar Volume bar tunersetup.cable Cable (DVB-C) tunersetup.hybrid Hybrid (DVB-C/T/T2) -tunersetup.mode Operation Mode -tunersetup.power 5V Supply on DVB-T/T2 Channels +tunersetup.mode Operation mode +tunersetup.power 5V supply on DVB-T/T2 channels tunersetup.terr Terrestrial (DVB-T/T2) tmdb.api_key TMDb API key tmdb.enabled TMDb support From 224292f9e34db2a43b98e1f4abddc7cbd03b3090 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 27 Nov 2017 12:50:53 +0100 Subject: [PATCH 02/15] neutrino: try to fix timer_wakeup handling; ... The return to deepstandby after timer-wakeups was broken. Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/50cc4ef7a2caf847ba05d4adb6539b24ec970cff Author: vanhofen Date: 2017-11-27 (Mon, 27 Nov 2017) Origin message was: ------------------ - neutrino: try to fix timer_wakeup handling; ... The return to deepstandby after timer-wakeups was broken. Signed-off-by: Thilo Graf --- src/neutrino.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 6184949c0..522a885f1 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -2169,8 +2169,10 @@ void CNeutrinoApp::InitSectiondClient() #include #endif -void wake_up(bool &wakeup) +bool is_wakeup() { + bool wakeup = false; + #if HAVE_COOL_HARDWARE #ifndef FP_IOCTL_CLEAR_WAKEUP_TIMER #define FP_IOCTL_CLEAR_WAKEUP_TIMER 10 @@ -2191,6 +2193,7 @@ void wake_up(bool &wakeup) close(fd); } #endif + /* prioritize proc filesystem */ if (access("/proc/stb/fp/was_timer_wakeup", F_OK) == 0) { @@ -2213,11 +2216,14 @@ void wake_up(bool &wakeup) } printf("[timerd] wakeup from standby: %s\n", wakeup ? "yes" : "no"); - if(!wakeup){ + if (!wakeup) + { puts("[neutrino.cpp] executing " NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT "."); if (my_system(NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT) != 0) perror(NEUTRINO_LEAVE_DEEPSTANDBY_SCRIPT " failed"); } + + return wakeup; } int CNeutrinoApp::run(int argc, char **argv) @@ -2343,21 +2349,19 @@ TIMER_START(); } //timer start - long timerd_signal = 0; - timer_wakeup = false;//init - wake_up( timer_wakeup ); + timer_wakeup = (is_wakeup() && g_settings.shutdown_timer_record_type); + g_settings.shutdown_timer_record_type = false; init_cec_setting = true; - if(!(g_settings.shutdown_timer_record_type && timer_wakeup && g_settings.hdmi_cec_mode)){ + if(!(timer_wakeup && g_settings.hdmi_cec_mode)) + { //init cec settings CCECSetup cecsetup; cecsetup.setCECSettings(); init_cec_setting = false; } - timer_wakeup = (timer_wakeup && g_settings.shutdown_timer_record_type); - g_settings.shutdown_timer_record_type = false; - timerd_signal = (timer_wakeup && g_settings.shutdown_timer_record_type); + long timerd_signal = timer_wakeup; pthread_create (&timer_thread, NULL, timerd_main_thread, (void *)&timerd_signal); timerd_thread_started = true; @@ -3897,7 +3901,7 @@ void CNeutrinoApp::ExitRun(int exit_code) struct tm *tm = localtime(&t); char date[30]; strftime(date, sizeof(date), "%c", tm); - printf("timer_wakeup: %s (%ld)\n", date, timer_minutes * 60); + printf("wakeup_time: %s (%ld)\n", date, timer_minutes * 60); /* prioritize proc filesystem */ if (access("/proc/stb/fp/wakeup_time", F_OK) == 0) From 51681ca2740efce8a2364f8cfec7a2ab22afe480 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 27 Nov 2017 14:16:38 +0100 Subject: [PATCH 03/15] remove unused src/driver/stacktrace.h; use src/system/stacktrace.h if needed Conflicts: src/driver/stacktrace.h Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/a463fdff3a1cdac8989fcf1562586535a669a73a Author: vanhofen Date: 2017-11-27 (Mon, 27 Nov 2017) Origin message was: ------------------ - remove unused src/driver/stacktrace.h; use src/system/stacktrace.h if needed Conflicts: src/driver/stacktrace.h Signed-off-by: Thilo Graf --- src/driver/stacktrace.h | 93 ----------------------------------------- 1 file changed, 93 deletions(-) delete mode 100644 src/driver/stacktrace.h diff --git a/src/driver/stacktrace.h b/src/driver/stacktrace.h deleted file mode 100644 index 49a5e5c0a..000000000 --- a/src/driver/stacktrace.h +++ /dev/null @@ -1,93 +0,0 @@ -// stacktrace.h (c) 2008, Timo Bingmann from http://idlebox.net/ -// published under the WTFPL v2.0 - -#ifndef _STACKTRACE_H_ -#define _STACKTRACE_H_ - -#include -#include -#include -#include - -/** Print a demangled stack backtrace of the caller function to FILE* out. */ -static inline void print_stacktrace(FILE *out = stderr, unsigned int max_frames = 63) -{ - fprintf(out, "stack trace:\n"); - - // storage array for stack trace address data - void* addrlist[max_frames+1]; - - // retrieve current stack addresses - int addrlen = backtrace(addrlist, sizeof(addrlist) / sizeof(void*)); - - if (addrlen == 0) { - fprintf(out, " \n"); - return; - } - - // resolve addresses into strings containing "filename(function+address)", - // this array must be free()-ed - char** symbollist = backtrace_symbols(addrlist, addrlen); - - // allocate string which will be filled with the demangled function name - size_t funcnamesize = 256; - char* funcname = (char*)malloc(funcnamesize); - - // iterate over the returned symbol lines. skip the first, it is the - // address of this function. - for (int i = 1; i < addrlen; i++) - { - char *begin_name = 0, *begin_offset = 0, *end_offset = 0; - - // find parentheses and +address offset surrounding the mangled name: - // ./module(function+0x15c) [0x8048a6d] - for (char *p = symbollist[i]; *p; ++p) - { - if (*p == '(') - begin_name = p; - else if (*p == '+') - begin_offset = p; - else if (*p == ')' && begin_offset) { - end_offset = p; - break; - } - } - - if (begin_name && begin_offset && end_offset - && begin_name < begin_offset) - { - *begin_name++ = '\0'; - *begin_offset++ = '\0'; - *end_offset = '\0'; - - // mangled name is now in [begin_name, begin_offset) and caller - // offset in [begin_offset, end_offset). now apply - // __cxa_demangle(): - - int status; - char* ret = abi::__cxa_demangle(begin_name, - funcname, &funcnamesize, &status); - if (status == 0) { - funcname = ret; // use possibly realloc()-ed string - fprintf(out, " %s : %s+%s\n", - symbollist[i], funcname, begin_offset); - } - else { - // demangling failed. Output function name as a C function with - // no arguments. - fprintf(out, " %s : %s()+%s\n", - symbollist[i], begin_name, begin_offset); - } - } - else - { - // couldn't parse the line? print the whole line. - fprintf(out, " %s\n", symbollist[i]); - } - } - - free(funcname); - free(symbollist); -} - -#endif // _STACKTRACE_H_ From 50799de1e50ff780c18df8e54d0a75c9288aa0f0 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 27 Nov 2017 16:04:43 +0100 Subject: [PATCH 04/15] icons.h: cleanup from unused defines Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/f32629e7aa00e647d2934ff859cbcb1bf591da91 Author: vanhofen Date: 2017-11-27 (Mon, 27 Nov 2017) Origin message was: ------------------ - icons.h: cleanup from unused defines Signed-off-by: Thilo Graf --- src/gui/widget/icons.h | 42 +----------------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/src/gui/widget/icons.h b/src/gui/widget/icons.h index 5436cc6ee..f1f90ce3c 100644 --- a/src/gui/widget/icons.h +++ b/src/gui/widget/icons.h @@ -44,7 +44,6 @@ #define NEUTRINO_ICON_BUTTON_POWER "power" #define NEUTRINO_ICON_BUTTON_OKAY "ok" -#define NEUTRINO_ICON_BUTTON_OKAY_SMALL "ok_small" #define NEUTRINO_ICON_BUTTON_0 "0" #define NEUTRINO_ICON_BUTTON_1 "1" @@ -57,11 +56,9 @@ #define NEUTRINO_ICON_BUTTON_8 "8" #define NEUTRINO_ICON_BUTTON_9 "9" -#define NEUTRINO_ICON_BUTTON_UP "up" -#define NEUTRINO_ICON_BUTTON_UP_SMALL "up_small" +#define NEUTRINO_ICON_BUTTON_UP "up" #define NEUTRINO_ICON_BUTTON_RIGHT "right" #define NEUTRINO_ICON_BUTTON_DOWN "down" -#define NEUTRINO_ICON_BUTTON_DOWN_SMALL "down_small" #define NEUTRINO_ICON_BUTTON_LEFT "left" #define NEUTRINO_ICON_BUTTON_BACKWARD "btn_backward" @@ -72,9 +69,6 @@ #define NEUTRINO_ICON_BUTTON_RECORD_INACTIVE "btn_record_inactive" #define NEUTRINO_ICON_BUTTON_STOP "btn_stop" -#define NEUTRINO_ICON_BUTTON_PLUS "plus" -#define NEUTRINO_ICON_BUTTON_MINUS "minus" - #define NEUTRINO_ICON_BLUE "icon_blue" #define NEUTRINO_ICON_GREEN "icon_green" #define NEUTRINO_ICON_RED "icon_red" @@ -88,7 +82,6 @@ #define NEUTRINO_ICON_DD "dd" #define NEUTRINO_ICON_DD_AVAIL "dd_avail" #define NEUTRINO_ICON_DD_GREY "dd_gray" -#define NEUTRINO_ICON_EPGINFO "epginfo" #define NEUTRINO_ICON_ERROR "error" #define NEUTRINO_ICON_FEATURES "features" #define NEUTRINO_ICON_GAMES "games" @@ -109,12 +102,10 @@ #define NEUTRINO_ICON_PLAY_REPEAT_TRACK "mp_play_repeat_track" #define NEUTRINO_ICON_REW "mp_b-skip" #define NEUTRINO_ICON_FF "mp_f-skip" -#define NEUTRINO_ICON_PROTECTING "protecting" #define NEUTRINO_ICON_QUESTION "question" #define NEUTRINO_ICON_RADIOTEXTGET "radiotextget" #define NEUTRINO_ICON_RADIOTEXTWAIT "radiotextwait" #define NEUTRINO_ICON_RADIOTEXTOFF "radiotextoff" -#define NEUTRINO_ICON_RADIOMODE "radiomode" #define NEUTRINO_ICON_RECORDING "recording" #define NEUTRINO_ICON_REC "rec" #define NEUTRINO_ICON_REC_GRAY "rec_gray" @@ -131,7 +122,6 @@ #define NEUTRINO_ICON_VIDEO "video" #define NEUTRINO_ICON_VTXT "vtxt" #define NEUTRINO_ICON_VTXT_GREY "vtxt_gray" -#define NEUTRINO_ICON_PARTITION "partition" #define NEUTRINO_ICON_SUBT "subt" #define NEUTRINO_ICON_SUBT_GREY "subt_gray" #define NEUTRINO_ICON_AUTO_SHIFT "ats" @@ -176,8 +166,6 @@ #define NEUTRINO_ICON_TMDB "tmdb" #define NEUTRINO_ICON_PICTUREVIEWER "pictureviewer" -#define DUMMY_ICON "dummy" - /* sliders */ #define NEUTRINO_ICON_SLIDER_BODY "slider_body" #define NEUTRINO_ICON_SLIDER_INACTIVE "slider_inactive" @@ -233,10 +221,6 @@ #define NEUTRINO_ICON_HINT_HDD "hint_hdd" #define NEUTRINO_ICON_HINT_KEYS "hint_keys" #define NEUTRINO_ICON_HINT_A_PIC "hint_a_pic" -#define NEUTRINO_ICON_HINT_RASS "hint_rass" - -#define NEUTRINO_ICON_HINT_COLORS "hint_colors" -#define NEUTRINO_ICON_HINT_FONTS "hint_fonts" /* service */ #define NEUTRINO_ICON_HINT_SERVICE_SCAN "hint_scan" @@ -273,32 +257,8 @@ #define NEUTRINO_ICON_CHECKMARK "checkmark" #define NEUTRINO_ICON_WARNING "warning" -/* RASS */ -#define NEUTRINO_ICON_RED_0 "0-red" -#define NEUTRINO_ICON_RED_1 "1-red" -#define NEUTRINO_ICON_RED_2 "2-red" -#define NEUTRINO_ICON_RED_3 "3-red" -#define NEUTRINO_ICON_RED_4 "4-red" -#define NEUTRINO_ICON_RED_5 "5-red" -#define NEUTRINO_ICON_RED_6 "6-red" -#define NEUTRINO_ICON_RED_7 "7-red" -#define NEUTRINO_ICON_RED_8 "8-red" -#define NEUTRINO_ICON_RED_9 "9-red" - -#define NEUTRINO_ICON_GREEN_0 "0-green" -#define NEUTRINO_ICON_GREEN_1 "1-green" -#define NEUTRINO_ICON_GREEN_2 "2-green" -#define NEUTRINO_ICON_GREEN_3 "3-green" -#define NEUTRINO_ICON_GREEN_4 "4-green" -#define NEUTRINO_ICON_GREEN_5 "5-green" -#define NEUTRINO_ICON_GREEN_6 "6-green" -#define NEUTRINO_ICON_GREEN_7 "7-green" -#define NEUTRINO_ICON_GREEN_8 "8-green" -#define NEUTRINO_ICON_GREEN_9 "9-green" - /* misc */ #define NEUTRINO_ICON_HINT_YTPLAY "hint_ytplay" -#define NEUTRINO_ICON_HINT_SPARK "hint_spark" #define NEUTRINO_ICON_EPG "epg" From df04e34248c57a404874605d047447aedef4d764 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 27 Nov 2017 16:04:43 +0100 Subject: [PATCH 05/15] icons: cleanup from unused icons Conflicts: data/icons/buttons/orphaned/0-green.png data/icons/buttons/orphaned/0-red.png data/icons/buttons/orphaned/1-green.png data/icons/buttons/orphaned/1-red.png data/icons/buttons/orphaned/2-green.png data/icons/buttons/orphaned/2-red.png data/icons/buttons/orphaned/3-green.png data/icons/buttons/orphaned/3-red.png data/icons/buttons/orphaned/4-green.png data/icons/buttons/orphaned/4-red.png data/icons/buttons/orphaned/5-green.png data/icons/buttons/orphaned/5-red.png data/icons/buttons/orphaned/6-green.png data/icons/buttons/orphaned/6-red.png data/icons/buttons/orphaned/7-green.png data/icons/buttons/orphaned/7-red.png data/icons/buttons/orphaned/8-green.png data/icons/buttons/orphaned/8-red.png data/icons/buttons/orphaned/9-green.png data/icons/buttons/orphaned/9-red.png data/icons/buttons/orphaned/longpress.png data/icons/hints/hint_rass.png data/icons/hints/hint_spark.png data/icons/various/rass.png Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/47a63857678c63d57db227eb8a563666701109d1 Author: vanhofen Date: 2017-11-27 (Mon, 27 Nov 2017) Origin message was: ------------------ - icons: cleanup from unused icons Conflicts: data/icons/buttons/orphaned/0-green.png data/icons/buttons/orphaned/0-red.png data/icons/buttons/orphaned/1-green.png data/icons/buttons/orphaned/1-red.png data/icons/buttons/orphaned/2-green.png data/icons/buttons/orphaned/2-red.png data/icons/buttons/orphaned/3-green.png data/icons/buttons/orphaned/3-red.png data/icons/buttons/orphaned/4-green.png data/icons/buttons/orphaned/4-red.png data/icons/buttons/orphaned/5-green.png data/icons/buttons/orphaned/5-red.png data/icons/buttons/orphaned/6-green.png data/icons/buttons/orphaned/6-red.png data/icons/buttons/orphaned/7-green.png data/icons/buttons/orphaned/7-red.png data/icons/buttons/orphaned/8-green.png data/icons/buttons/orphaned/8-red.png data/icons/buttons/orphaned/9-green.png data/icons/buttons/orphaned/9-red.png data/icons/buttons/orphaned/longpress.png data/icons/hints/hint_rass.png data/icons/hints/hint_spark.png data/icons/various/rass.png Signed-off-by: Thilo Graf --- data/icons/buttons/orphaned/0-green.png | Bin 316 -> 0 bytes data/icons/buttons/orphaned/0-red.png | Bin 316 -> 0 bytes data/icons/buttons/orphaned/1-green.png | Bin 310 -> 0 bytes data/icons/buttons/orphaned/1-red.png | Bin 310 -> 0 bytes data/icons/buttons/orphaned/2-green.png | Bin 318 -> 0 bytes data/icons/buttons/orphaned/2-red.png | Bin 318 -> 0 bytes data/icons/buttons/orphaned/3-green.png | Bin 324 -> 0 bytes data/icons/buttons/orphaned/3-red.png | Bin 324 -> 0 bytes data/icons/buttons/orphaned/4-green.png | Bin 318 -> 0 bytes data/icons/buttons/orphaned/4-red.png | Bin 318 -> 0 bytes data/icons/buttons/orphaned/5-green.png | Bin 316 -> 0 bytes data/icons/buttons/orphaned/5-red.png | Bin 316 -> 0 bytes data/icons/buttons/orphaned/6-green.png | Bin 316 -> 0 bytes data/icons/buttons/orphaned/6-red.png | Bin 316 -> 0 bytes data/icons/buttons/orphaned/7-green.png | Bin 321 -> 0 bytes data/icons/buttons/orphaned/7-red.png | Bin 321 -> 0 bytes data/icons/buttons/orphaned/8-green.png | Bin 318 -> 0 bytes data/icons/buttons/orphaned/8-red.png | Bin 318 -> 0 bytes data/icons/buttons/orphaned/9-green.png | Bin 310 -> 0 bytes data/icons/buttons/orphaned/9-red.png | Bin 310 -> 0 bytes data/icons/buttons/orphaned/longpress.png | Bin 545 -> 0 bytes data/icons/hints/hint_rass.png | Bin 1107 -> 0 bytes data/icons/hints/hint_spark.png | Bin 6572 -> 0 bytes data/icons/various/rass.png | Bin 3058 -> 0 bytes 24 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 data/icons/buttons/orphaned/0-green.png delete mode 100644 data/icons/buttons/orphaned/0-red.png delete mode 100644 data/icons/buttons/orphaned/1-green.png delete mode 100644 data/icons/buttons/orphaned/1-red.png delete mode 100644 data/icons/buttons/orphaned/2-green.png delete mode 100644 data/icons/buttons/orphaned/2-red.png delete mode 100644 data/icons/buttons/orphaned/3-green.png delete mode 100644 data/icons/buttons/orphaned/3-red.png delete mode 100644 data/icons/buttons/orphaned/4-green.png delete mode 100644 data/icons/buttons/orphaned/4-red.png delete mode 100644 data/icons/buttons/orphaned/5-green.png delete mode 100644 data/icons/buttons/orphaned/5-red.png delete mode 100644 data/icons/buttons/orphaned/6-green.png delete mode 100644 data/icons/buttons/orphaned/6-red.png delete mode 100644 data/icons/buttons/orphaned/7-green.png delete mode 100644 data/icons/buttons/orphaned/7-red.png delete mode 100644 data/icons/buttons/orphaned/8-green.png delete mode 100644 data/icons/buttons/orphaned/8-red.png delete mode 100644 data/icons/buttons/orphaned/9-green.png delete mode 100644 data/icons/buttons/orphaned/9-red.png delete mode 100644 data/icons/buttons/orphaned/longpress.png delete mode 100644 data/icons/hints/hint_rass.png delete mode 100644 data/icons/hints/hint_spark.png delete mode 100644 data/icons/various/rass.png diff --git a/data/icons/buttons/orphaned/0-green.png b/data/icons/buttons/orphaned/0-green.png deleted file mode 100644 index 716637c7a22655441b04c1e5d775c1ebe57d2ed0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDU1=8&8?9Bbl42u{T*E2G1 zWn?_c$atNR@h&6dTSm5jY%>33jQ$x}{j>7<=X3k!?dlIqvw(USOM?7@862M7NCR<_ zyxm;OkH}&M25w;xW@MN(M*?I;iKnkC`(0LHZYF~dP5JYILam-Ijv*Y^ zlM_Tlgjkpu*}iTsZ+sA^*c?;o8ujx`Xum|tCGUU#&(A5H;Ao}$Z}tE0k+U6o@_*h> zJ0vMBx#ZBF{Y;YFl3Seq?myNn5w!4I{GmdKI;Vst0HL03 A4*&oF diff --git a/data/icons/buttons/orphaned/0-red.png b/data/icons/buttons/orphaned/0-red.png deleted file mode 100644 index a99393a3fb50dfedd557701bf888c0c18947d926..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDU1=4*CA(I%w7BPfuU~t>U z;CYNe^#%j$JqCt%3=IES1^-J2{x_`uZ`twRd&TXWxA_GU`ha>EOM?7@862M7NCR<_ zyxm;OkH}&M25w;xW@MN(M*=9wUgGKN%6^wsNK};h$<<__2t%usx6WTA4a>@JO|MPQ7CpcQ^{#*V3d*p0~p8TKp z(+){WOD;L|XFro9x8xS5zx$6hO9UnY@6iw*x&WMWo<-&HcudlDGtIL7S&CviDBCYeSBpMSI0v*i2;OXk;vd$@?2>@6C BZhim& diff --git a/data/icons/buttons/orphaned/1-green.png b/data/icons/buttons/orphaned/1-green.png deleted file mode 100644 index 1ad8fee1b98f8bfd7995f961d4572e93c37c69d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 310 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDU1=8&8?9Bbl3`-aoH!?CF zWn{e0$at5L@hv0EKNhZkTyp>9jQ$x}{j>7<=X3k!?Q$cQD?mMrB|(0{3=Yq3q=7g| z-tI089jvk*Kn`btM`SSr1Gg{;GcwGYBLT9a#M9T6{VuC8H#48c59d;#P`#&%V+hCf z8T}WYECE!PkZ)%?c&c0%_SM9{;!vnm2Tvzw{Vs} zbD@a$4g3MgPlM{5MSeZ<+DmyXp4L+u73MGl6;-OM?7@862M7NCR<_ zyxm;OkH}&M25w;xW@MN(M*=9wUgGKN%6^wsNL1MDi4DV2pisT1i(?4K z_2dK*kq{9eND!#57Uy`UYII`h(&?!sXKGF;2v2+Vf9>MW3e6=Mr~a>(m6dMfskd;J zKXajo_v8PliyJ36o-)1iKfCg%6PvGi_<#MEqQa6Y4n12wxhWhz`p-MUYR1DyQnT1n uW;947_VOq_O?~?G>B~MIhxCR928R3I#v6K_Q`CV@VeoYIb6Mw<&;$V60cZRG diff --git a/data/icons/buttons/orphaned/2-green.png b/data/icons/buttons/orphaned/2-green.png deleted file mode 100644 index 3679e751183dcb16798d9813bbd7dba244002215..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 318 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDU1=8&8?9Bbl3`-ao*E2G1 zWn?_c$atNR@h&6dTSm5jY;ynPjQ$x}{j>7<=X3k!ZH-@SeLy{oB|(0{3=Yq3q=7g| z-tI089jvk*Kn`btM`SSr1Gg{;GcwGYBLT9a#M9T6{VuC8H?xqgTe~DWM4f DHmYph diff --git a/data/icons/buttons/orphaned/2-red.png b/data/icons/buttons/orphaned/2-red.png deleted file mode 100644 index 05845207e8c557efe0a983d9c938da0272245be4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 318 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDU1=4*CA(I%wmN0~FU~t>U z;CYNe^#%j$JqCt%3=IESx&O;r{5MSeZ<+DmyXp4L+o|{Yn}B*4OM?7@862M7NCR<_ zyxm;OkH}&M25w;xW@MN(M*=9wUgGKN%6^wsNK`~?f6XafpisM~i(?4K z_2h&Q5f(;9wvXG(8z00eHpf)DM*TVy$}gF6$@|~`^D(6p9IbT!cmMw$Dc#t!rRPt+ z@xh*=dI4uG9o?t(N6xhJ1TD<`7O&;NbN#{pXHR9hB~@bI+V5Nz?vpa1WaIz;|D|U< z%*hc7<4c*bqor->QvVczxfk!nUA!oG;=qa(EM;sA8&u7^4H!JX1D(X+>FVdQ&MBb@ E06~{7<=X3k!?NZe(96&vcB|(0{3=Yq3q=7g| z-tI089jvk*Kn`btM`SSr1Gg{;GcwGYBLT9a#M9T6{VuC8HU z;CX^U?FIwuJqCt%3=IESx&O;r{5MSeZ<+DmyXp4L+geQ}Hb6a$B|(0{3=Yq3q=7g| z-tI089jvk*Kn`btM`SSr1Gg{;GcwGYBLNg-FY)wsWxvZRBr2@j`S6J!P^j0_#W95A zdUAq@h)4(!CkWJ6i*vjaH99f1e96-DF<&P*s_lL9|Nog#cF84|KkfffKYy#>2@mhj z|Lug&ocN#5nBvj8bm`6d**hmVYMJQj{=0p~)xpgp;?MSTtvr*~{hR-Gf2mK(gp$I4 z|L?D5I#OV2=Bv$a7~^#K(j|4Hj&mzsym+yKCk1G`5Q`Ec!^(r^QB{w))&d>I;OXk; Jvd$@?2>>{qbCv)A diff --git a/data/icons/buttons/orphaned/4-green.png b/data/icons/buttons/orphaned/4-green.png deleted file mode 100644 index 4b690273d06e7bb13a914630f208aebabc811425..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 318 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDU1=8&8?9Bbl3=0?-*E2G1 zWn?_g$atNR@h&6dTSm5jY%>33jQ$x}{j>7<=X3k!?b`Xi;Xpl%B|(0{3=Yq3q=7g| z-tI089jvk*Kn`btM`SSr1Gg{;GcwGYBLT9a#M9T6{VuC8H#6t9IoGZMh1xw`978y+ zCnt!6h_Em*vVGiM-uNI+u{oy7-Tmj9P=3jjOWINY!_QfrP?#Gw@4tQVH8%z2yZ`H- z`3NX~HJ+h3b=sew^~cV%@&qORJNDn!fhYX;|Nr|-^-?C3@D~2dzh^kn@sg^^llltQ zj)zjOCWY}O?PzIRy3{{KAUFSgM*e%AlmrnLW>$tfvn^!f{(gxAI*Gy4)z4*}Q$iB} DrRr?T diff --git a/data/icons/buttons/orphaned/4-red.png b/data/icons/buttons/orphaned/4-red.png deleted file mode 100644 index c2508e59e0a01e10d7e7347216edbfac970f515e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 318 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDU1=4*CA(I%w7BB>FU~t>U z;CX^U?FIwuJqCt%3=IESx&KRB|2IthZ<+DmyXp4L+s9Vvo&@S)ED7=pW^j0RBMrn! z@^*J&=wOxg0CG4BJR*x37`TN&n2}-D90{Nxdx@v7EBjqmAyH8Uw@pGtK%sU|7sn8e z>&XcsAtEeHjBFpbmp49$Q*4f@a(Dl^CX`IpA{r~^|QoWQ3CA@|I^6wc=biAZ$@}$0k zwd0}Gt4U#eNjqBFmM-;A5y;JdpOOEbCnZ6Ig_)J%&TI?WxW8ZGfKFoYboFyt=akR{ E0MP?(egFUf diff --git a/data/icons/buttons/orphaned/5-green.png b/data/icons/buttons/orphaned/5-green.png deleted file mode 100644 index bf74eeed9285c8feea992a4f5b3fb6c81ab4adec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDU1=8&8?9Bbl3=0?-*E2G1 zWn?_g$atNR@h&6dTSm5jY%>33jQ$x}{j>7<=X3k!?b`Xi;Xpl%B|(0{3=Yq3q=7g| z-tI089jvk*Kn`btM`SSr1Gg{;GcwGYBLT9a#M9T6{VuC8H?x@al-tTcp;k{9#}JO| z$q6DX%&cr5x0g3Qh*NBisdSI3dcMk?$0#%P|Ns9pN+&p4t$ngT`stZo2e&`Zx6Djv z0}2Z|w1v$2pZ+`FSlq~?b!p4dX32$$c^~gvi5q3KH7(InGxFGF@&A85TiOnZ-Akr2 zORDKDOw4>KEa|eme9HFl5*8x^F0RHoiVO^5wH6(EH{x#r9mL@2>gTe~DWM4ffYE5J diff --git a/data/icons/buttons/orphaned/5-red.png b/data/icons/buttons/orphaned/5-red.png deleted file mode 100644 index cc9963238c72592ee7f0ada34864083ad56ba34c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDU1=4*C`jZ$87BDz$U~t>U z;CX^U?FIwuJqCt%3=IESx&KRB|2IthZ<+DmyXp4L+YPrLUIpr5ED7=pW^j0RBMrn! z@^*J&=wOxg0CG4BJR*x37`TN&n2}-D90{Nxdx@v7EBjqmAyE-lk+t7TfI_XFE{-7_ z*OL=OSeRMaK5j2>d=RJD98>8YRrP$8JC9Lj>i_@$XOvEGv|9UQfArHcy$)`Fo^P3% z&;}G1bZ85i^*{Z0zOlHGN9)p-qs@{F74tscw-PtXXlq)crDo)@%i{n4e73Y561$g7 zWtLRaTbP*nQdrVudHIy>;Uz3a23%Z?a}*gE#A+=%^lrr80y>Dn)78&qol`;+0PNvx AW&i*H diff --git a/data/icons/buttons/orphaned/6-green.png b/data/icons/buttons/orphaned/6-green.png deleted file mode 100644 index b8376864a256d448dfaff1a8770968e04fbd90ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDU1=8%T>?}Pj3=0?-S2HrM zXJp*Z$as;F@h&6ddq$>zOcMVjwEk&X{Il@-=XK@U75&A^tUx`CB|(0{3=Yq3q=7g| z-tI089jvk*Kn`btM`SSr1Gg{;GcwGYBLT9a#M9T6{VuC8HnAvF+p~CY&9znSJVq~{e*AA7E}JsJ&->@A|H;qX6qNsYXQ|D2 z`2T;s$^^x!V*hXczkQ~aCurfn_{R%-^grIW5;yYLb*p~c|7(U59WNdI`M-WMm%!np zH%->coG{?z=Fb2JqFef3~c`y+5d~{{@3*RZ=Uwwv+>HcD;rL8DgyN|mIV0)GdMiEkp|)< zdAqwXbg;^L06Clm9+AZi4BWyX%*Zfnjs#GUy~NYkmHjTOkf?~MQOWTeK%rJo7sn8e z>&XcsLM)7oY#(9jQ$x}{j>7<=X3k!?Q$cQD?mMrB|(0{3=Yq3q=7g| z-tI089jvk*Kn`btM`SSr1Gg{;GcwGYBLT9a#M9T6{VuC8H#5U|hrA-7P?x8RV+hCf z;IsO8z(rPGQILI+j4^9%SWH?o9s4g3MgPlM{5MSeZ<+DmyXp4L+u73MGl6;-OM?7@862M7NCR<_ zyxm;OkH}&M25w;xW@MN(M*=9wUgGKN%6^wsNK{0o;8^??piq~mi(?4K z_2h&Qkq{9eND!#57H1KXd~zwsIaoW*E@c8|@Bjb*f1hdQxwLTM!f*Gj%$Xz;SN^xP zGHY~k`sZGflQMye_v`$;$?wjmQQfhAN{#<{3!zVX3P61_I z*&_vpg}lDZ#xYLLhovN4PF+5I`m~meq{LK*bpj#`3`-1+)vwf9KLNUm!PC{xWt~$( F698WBYK;H@ diff --git a/data/icons/buttons/orphaned/8-green.png b/data/icons/buttons/orphaned/8-green.png deleted file mode 100644 index a87ae15c01f40e44f8c2597846b821683476be59..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 318 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDU1=8&8?9Bbl42u{T*E2G1 zWn?_c$atNR@h&6dTSm5jY%>33jQ$x}{j>7<=X3k!?dlIqvw(USOM?7@862M7NCR<_ zyxm;OkH}&M25w;xW@MN(M*?I;iKnkC`(0LHZf2Gfx~sB*LhYU|jv*Y^ zlM_T(m>JnVZZB_q5U1E2Q|TJ@YfUJ>WXdJ)fB(Jm?T)AP%|NpvadPx(wzW&eopZm;-O*8!e`j7Xm#Em?5-C}mtQUlT!|NrN+rL|b> zUN)UsQcZ7RX68#_Ntg5~2*o+LgxEkj&GUU&;V!3Ab{S(kh44$rjF6*2UngFC$ BYRLcq diff --git a/data/icons/buttons/orphaned/8-red.png b/data/icons/buttons/orphaned/8-red.png deleted file mode 100644 index 000fc524b538da27651be556bf74a196dedc05b0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 318 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDU1=4*CA(I%w7BPfuU~t>U z;CYNe^#%j$JqCt%3=IESx&KRB|2IthZ<+DmyXp4L+jkNeKzbQVg8YIR9G=}s196hP z-CYDqW*~tqJ9qOu6L!@BjIj(g}`My8pBPe4i=Z*z+U*=Y549 z{eKFAD>p3p|6eyvFKGhT*Z(>HbDue}X@>t_|M9++xRJ-MTg5@LBd`o!=n~?z*SL0kphWy!9EZ6M5e*!v*!PC{xWt~$(699oC BY;*ts diff --git a/data/icons/buttons/orphaned/9-green.png b/data/icons/buttons/orphaned/9-green.png deleted file mode 100644 index 8959902e80ef43a794685cd8e778ddfa35fea911..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 310 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDU1=8&8?9Bbl42u{T*E2G1 zWn?_c$atNR@h&6dTSm5jYzqGrjQ$x}{j>7<=X3k!?fk^JYM>s*k|4ie28U-i(mD&3=gtqJ9qOu6L!@BjIj(g}`My8pfZe4i=Z*z+U*=lugb z^&HMxXZ~;gzkMdRTFuB~m&O18lj0bYc1Y}A vI<;AHVP@t_VaX8dQ`Wa`TQf^0oMT`}dTH7HB{+W>&?yX_u6{1-oD!MU z;CYNe^#%j$JqCt%3=IESx&O;s{x?kgZ<+DmyXp4L+e;@{F#+{3mIV0)GdMiEkp|)< zdAqwXbg;^L06Clm9+AZi4BWyX%*Zfnjs#GUy~NYkmHjTOkf^Ax1#{kcpisT1i(?4K z_2dK*7G_4akK4-|AH*p($5gsU{aO>sFPU=5```cbF{Kk6t#to;|M@;sy0Pa+{?Gdd zcx1`77GC$ zL{5{t&tAP;C<5S$?|a0UZeK6nF16^)yfS`SNkojBlQ)psZS4HEvew(WCuRMuZ#)M8 zZEWIN`Oe)b;;u_XMEQK4HrDGDg$cc_R>HIAE|S@0jmU#`!ES6f`bI}CKvH!4M-stx zIZotGvVp!+*rDrF^1-%4Z4^gR`bayXFa!VyAuvBT2g7KA%2XUpABL)`mYfI?aL(cT zK9VGY&jZXpokgiMk6LXRkO0r+h@*(h>#ILL|K8l%s#MC*G=?DHV2t73^fV@mMf`D` zr22jluIIi001ViLM}^@tRDSb1^4tc+QApl)gPdPK#mvk@%J$?a-QICr0)XyJwl&eT zC%X*ee8C<<#_Ry+9MyMASX^3$-}J{^cT~cJ_mdex|CFBKR jumDK+*S>%K2mt>8kf7t~GR@s100000NkvXXu0mjfPk;P^ diff --git a/data/icons/hints/hint_rass.png b/data/icons/hints/hint_rass.png deleted file mode 100644 index e9f5462da6ebce7bd745de379fedd90109714901..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1107 zcmV-Z1g!gsP)aD9<0oV9-N4ftSBL4By2E(ia`u2h@wQO ztRb!JqR>pKjWeU?*F*me%k4QnR7@}59}esL_FCV%?X}k4N2*YvLWK$yDpaUYp~8Ow z;B4Sq{>C4`N5J(!Y9N0KupD>|=mE9>%YgR(D}Zb5e2rtVppcsctOX8JAKgI5NITyO zJOT^=-vj-@!L>jFMmxg?3Wo>1V?)3puPq&7kkllpN7A~K(pw=3<0LKd z>tRW?e~`$OQo{C0DN*ur!tL|1yI|S|Y;q=#6n*g<@M!qvB-63LyI}`zZ{(nNJJqX# zsI$TMEhj7^)7ikD;LMQe9^j^|C>nAZW$XsdD9W?tM8<>dNx+N1QsC4Ww4ZMPo&zoe z+K$VP>HVSBhlBHT&2I;q!*`Fn`7`c}!=bRz4ovrNR9J5_eIw|3rr^ye#{BGh&Y$L) z9y8w$%&(KRt6ge?!Dwg5R%_6C7q9_%2lxVb9hhSNXw!Q`+4ccf#!~e+aa2#P7r+t= z42J*~nl}|#=#0My>@CLWx}4R#L%=HFGvHt$`!z5<*uNC`H3V=7I63Ia!R68Z{BgYk zOa!)CAkXuA{QCs>#zxA6?nmIZV64SwMpqqKtfLErYF{fP}>`VY&<0QS?&kF4>*9_Zx2W3 zCxk2j>;ldOE^-g#vdS5K+tZ~zOp09dD~fBzVxR-q0rUcEfQiBOg}~>Qy&U*CRKYpG z9e&^L0khxlFU0^Bhb^iBD?$Ta2Rv0|rysbcsP|0Y4{|HLwjiv18X7nEUI%capLbjC zAaH@#E(R_E=7az?##`mCVBpmThtGImXOP>%7?RX4X`7_gzBryIsaMhgUn2KPdLgCMUHt{EP@zJF3Kc3;s8Hcw Z;V(60pCpW5G5Y`j002ovPDHLkV1hve4m|(> diff --git a/data/icons/hints/hint_spark.png b/data/icons/hints/hint_spark.png deleted file mode 100644 index f10fca62e25289fa96331a9be3f8ff2bff00311a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6572 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 Date: Mon, 27 Nov 2017 16:47:50 +0100 Subject: [PATCH 06/15] radiotext: cleanup from tons of unused code; rass is dead Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/4ea86a238063baa34a16ab53e8ad0bd6f42d5393 Author: vanhofen Date: 2017-11-27 (Mon, 27 Nov 2017) Origin message was: ------------------ - radiotext: cleanup from tons of unused code; rass is dead Signed-off-by: Thilo Graf --- src/driver/radiotext.cpp | 1640 ------------------------------------- src/driver/radiotext.h | 110 --- src/driver/radiotools.cpp | 42 - src/gui/infoviewer.cpp | 61 -- 4 files changed, 1853 deletions(-) diff --git a/src/driver/radiotext.cpp b/src/driver/radiotext.cpp index 2079481f6..3e1a19a58 100644 --- a/src/driver/radiotext.cpp +++ b/src/driver/radiotext.cpp @@ -59,24 +59,6 @@ #include #include -#if 0 -#ifdef HAVE_TRIPLEDRAGON -#include -#include -#define DMXDEV "/dev/" DEVICE_NAME_DEMUX "1" -#elif HAVE_DVB_API_VERSION < 3 -#include -#define DMXDEV "/dev/dvb/card0/demux0" -#define DVRDEV "/dev/dvb/card0/dvr0" -#define dmx_pes_filter_params dmxPesFilterParams -#define pes_type pesType -#else -#include -#define DMXDEV "/dev/dvb/adapter0/demux0" -#define DVRDEV "/dev/dvb/adapter0/dvr0" -#endif -#endif - #include #include #include @@ -96,18 +78,8 @@ char RDS_PSText[12][9]; // plugin audiorecorder service bool ARec_Receive = false, ARec_Record = false; -#if ENABLE_RASS -// ... Gallery (1..999) -#define RASS_GALMAX 999 -bool Rass_Gallery[RASS_GALMAX+1]; -int Rass_GalStart, Rass_GalEnd, Rass_GalCount, Rass_SlideFoto; -#endif - #define floor const char *DataDir = "./"; -//cRadioAudio *RadioAudio; -//cRadioTextOsd *RadioTextOsd; -//cRDSReceiver *RDSReceiver; // RDS-Chartranslation: 0x80..0xff unsigned char rds_addchar[128] = { @@ -349,9 +321,6 @@ if (i < 0) { fprintf(stderr, "RT %s: i < 0 (%d)\n", __FUNCTION__, i); break; } RDS_PsPtynDecode(false, mtext, index); // PS break; case 0xda: -#if ENABLE_RASS - RassDecode(mtext, index); // Rass -#endif break; } } @@ -627,7 +596,6 @@ fprintf(stderr, "MEC=0x%02x DSN=0x%02x PSN=0x%02x MEL=%02d STATUS=0x%02x MFL=%02 rtp_itoggle = false; rtp_idiffs = 0; RadioStatusMsg(); -// AudioRecorderService(); } RTP_TToggle = 0; } @@ -677,1616 +645,13 @@ void CRadioText::RadioStatusMsg(void) int ind = (RT_Index == 0) ? S_RtOsdRows - 1 : RT_Index - 1; strcpy(temp, RT_Text[ind]); printf("RadioStatusMsg = %s\n", temp); -// cStatus::MsgOsdTextItem(rtrim(temp), false); } if ((S_RtMsgItems == 1 || S_RtMsgItems >= 3) && ((S_RtOsdTags == 1 && RT_PlusShow) || S_RtOsdTags >= 2)) { -// struct tm tm_store; -// struct tm *ts = localtime_r(&RTP_Starttime, &tm_store); -// cStatus::MsgOsdProgramme(mktime(ts), RTP_Title, RTP_Artist, 0, NULL, NULL); printf("RTP_Title = %s, RTP_Artist = %s\n", RTP_Title, RTP_Artist); } } - -#if ENABLE_RASS -// add of DVB Radio Slides Specification 1.0, 20061228 -void CRadioText::RassDecode(unsigned char *mtext, int len) -{ - static uint splfd = 0, spmax = 0, index = 0; - static uint afiles, slidenumr, slideelem, filemax, fileoffp; - static int filetype, fileoffb; - static bool slideshow = false, slidesave = false, slidecan = false, slidedel = false, start = false; - static uchar daten[65536]; // mpegs-stills defined <= 50kB - FILE *fd; - - // byte 1+2 = ADD (10bit SiteAdress + 6bit EncoderAdress) - // byte 3 = SQC (Sequence Counter 0x00 = not used) - // byte 4 = MFL (Message Field Length), - if (len >= mtext[4]+7) { // check complete length - // byte 5 = MEC (0xda for Rass) - // byte 6 = MEL - if (mtext[6] == 0 || mtext[6] > mtext[4]-2) { - if ((S_Verbose && 0x0f) >= 1) - printf("Rass-Error: Length = 0 or not correct !\n"); - return; - } - // byte 7+8 = Service-ID zugehöriger Datenkanal - // byte 9-11 = Nummer aktuelles Paket, - uint plfd = mtext[11] + mtext[10]*256 + mtext[9]*65536; - // byte 12-14 = Anzahl Pakete, - uint pmax = mtext[14] + mtext[13]*256 + mtext[12]*65536; - - // byte 15+16 = Rass-Kennung = Header, - if (mtext[15] == 0x40 && mtext[16] == 0xda) { // first - // byte 17+18 = Anzahl Dateien im Archiv, - afiles = mtext[18] + mtext[17]*256; - // byte 19+20 = Slide-Nummer, - slidenumr = mtext[20] + mtext[19]*256; - // byte 21+22 = Element-Nummer im Slide, - slideelem = mtext[22] + mtext[21]*256; - // byte 23 = Slide-Steuerbyte, : bit0 = Anzeige, bit1 = Speichern, bit2 = DarfAnzeige bei Senderwechsel, bit3 = Löschen - slideshow = mtext[23] & 0x01; - slidesave = mtext[23] & 0x02; - slidecan = mtext[23] & 0x04; - slidedel = mtext[23] & 0x08; - // byte 24 = Dateiart, : 0=unbekannt/1=MPEG-Still/2=Definition - filetype = mtext[24]; - if (filetype != 1 && filetype != 2) { - if ((S_Verbose && 0x0f) >= 1) - printf("Rass-Error: Filetype unknown !\n"); - return; - } - // byte 25-28 = Dateilänge, - filemax = mtext[28] + mtext[27]*256 + mtext[26]*65536 + mtext[25]*65536*256; - if (filemax >= 65536) { - if ((S_Verbose && 0x0f) >= 1) - printf("Rass-Error: Filesize will be too big !\n"); - return; - } - // byte 29-31 = Dateioffset Paketnr, - fileoffp = mtext[31] + mtext[30]*256 + mtext[29]*65536; - // byte 32 = Dateioffset Bytenr, - fileoffb = mtext[32]; - if (S_Verbose >= 2) - printf("Rass-Header: afiles= %d\n slidenumr= %d, slideelem= %d\n slideshow= %d, -save= %d, -canschow= %d, -delete= %d\n filetype= %d, filemax= %d\n fileoffp= %d, fileoffb= %d\n", - afiles, slidenumr, slideelem, slideshow, slidesave, slidecan, slidedel, filetype, filemax, fileoffp, fileoffb); - - if (fileoffp == 0) { // First - if (S_Verbose >= 2) - printf("Rass-Start@0 ...\n"); - start = true; - index = 0; - for (int i=fileoffb; i < len-2; i++) { - if (index < filemax) - daten[index++] = mtext[i]; - else - start = false; - } - } - splfd = plfd; - } - else if (plfd < pmax && plfd == splfd+1) { // Between - splfd = plfd; - if (!start && fileoffp == plfd) { // Data start, - if (S_Verbose >= 2) - printf("Rass-Start@%d ...\n", fileoffp); - start = true; - index = 0; - } - else - fileoffb = 15; - if (start) { - for (int i=fileoffb; i < len-2; i++) { - if (index < filemax) - daten[index++] = mtext[i]; - else - start = false; - } - } - } - else if (plfd == pmax && plfd == splfd+1) { // Last - fileoffb = 15; - if (start) { - for (int i=fileoffb; i < len-4; i++) { - if (index <= filemax) - daten[index++] = mtext[i]; - else { - start = false; - return; - } - } - if (S_Verbose >= 2) - printf("... Rass-End (%d bytes)\n", index); - } - - if (filemax > 0) { // nothing todo, if 0 byte file - // crc-check with bytes 'len-4/3' - unsigned short crc16 = crc16_ccitt(daten, filemax, false); - if (crc16 != (mtext[len-4]<<8)+mtext[len-3]) { - if ((S_Verbose && 0x0f) >= 1) - printf("Rass-Error: wrong CRC # calc = %04x <> transmit = %02x%02x\n", crc16, mtext[len-4], mtext[len-3]); - start = false; - return; - } - } - - // show & save file ? - if (index == filemax) { - if (slideshow || (slidecan && Rass_Show == -1)) { - if (filetype == 1) { // show only mpeg-still - char *filepath; - asprintf(&filepath, "%s/%s", DataDir, "Rass_show.mpg"); - if ((fd = fopen(filepath, "wb")) != NULL) { - fwrite(daten, 1, filemax, fd); - //fflush(fd); // for test in replaymode - fclose(fd); - Rass_Show = 1; - if (S_Verbose >= 2) - printf("Rass-File: ready for displaying :-)\n"); - } - else - printf("ERROR vdr-radio: writing imagefile failed '%s'", filepath); - free(filepath); - } - } - if (slidesave || slidedel || slidenumr < RASS_GALMAX) { - // lfd. Fotogallery 100.. ??? - if (slidenumr >= 100 && slidenumr < RASS_GALMAX) { - (Rass_SlideFoto < RASS_GALMAX) ? Rass_SlideFoto++ : Rass_SlideFoto = 100; - slidenumr = Rass_SlideFoto; - } - // - char *filepath = NULL; - (filetype == 2) ? asprintf(&filepath, "%s/Rass_%d.def", DataDir, slidenumr) - : asprintf(&filepath, "%s/Rass_%d.mpg", DataDir, slidenumr); - if ((fd = fopen(filepath, "wb")) != NULL) { - fwrite(daten, 1, filemax, fd); - fclose(fd); - if (S_Verbose >= 1) - printf("Rass-File: saving '%s'\n", filepath); - // archivemarker mpeg-stills - if (filetype == 1) { - // 0, 1000/1100/1110/1111..9000/9900/9990/9999 - if (slidenumr == 0 || slidenumr > RASS_GALMAX) { - if (slidenumr == 0) { - Rass_Flags[0][0] = !slidedel; - (RT_Info > 0) ? : RT_Info = 0; // open RadioTextOsd for ArchivTip - } - else { - int islide = (int) floor(slidenumr/1000); - for (int i = 3; i >= 0; i--) { - if ((slidenumr % (i==3 ? 1000 : i==2 ? 100 : i==1 ? 10 : 1)) == 0) { - Rass_Flags[islide][3-i] = !slidedel; //true; - break; - } - } - } - } - // gallery - else { - Rass_Gallery[slidenumr] = !slidedel; - if (!slidedel && (int)slidenumr > Rass_GalEnd) - Rass_GalEnd = slidenumr; - if (!slidedel && (Rass_GalStart == 0 || (int)slidenumr < Rass_GalStart)) - Rass_GalStart = slidenumr; - // counter - Rass_GalCount = 0; - for (int i = Rass_GalStart; i <= Rass_GalEnd; i++) { - if (Rass_Gallery[i]) - Rass_GalCount++; - } - Rass_Flags[10][0] = (Rass_GalCount > 0); - } - } - } - else - printf("ERROR vdr-radio: writing image/data-file failed '%s'", filepath); - if(filepath) - free(filepath); - } - } - start = false; - splfd = spmax = 0; - } - else { - start = false; - splfd = spmax = 0; - } - } - else { - start = false; - splfd = spmax = 0; - if (S_Verbose >= 1) - printf("RDS-Error: [Rass] Length not correct !\n"); - } -} -#endif - -#if 0 -void cRadioAudio::EnableRadioTextProcessing(const char *Titel, bool replay) -{ - asprintf(&RT_Titel, "%s", Titel); - RT_Replay = replay; - ARec_Receive = ARec_Record = false; - - first_packets = 0; - enabled = true; - imagedelay = 0; - - // Radiotext init - if (S_RtFunc >= 1) { - RT_MsgShow = RT_PlusShow = false; - RT_ReOpen = true; - RT_OsdTO = false; - RT_Index = RT_PTY = RTP_TToggle = 0; - RTP_ItemToggle = 1; - for (int i = 0; i < 5; i++) - memset(RT_Text[i], 0x20, RT_MEL-1); - sprintf(RTP_Title, "---"); - sprintf(RTP_Artist, "---"); - RTP_Starttime = time(NULL); - // - RDS_PSShow = false; - RDS_PSIndex = 0; - for (int i = 0; i < 12; i++) - memset(RDS_PSText[i], 0x20, 8); - } - - // ...Memory - rtp_content.start = time(NULL); - rtp_content.item_New = false; - rtp_content.rt_Index = -1; - rtp_content.item_Index = -1; - rtp_content.info_StockIndex = -1; - rtp_content.info_SportIndex = -1; - rtp_content.info_LotteryIndex = -1; - rtp_content.info_WeatherIndex = -1; - rtp_content.info_OtherIndex = -1; - - for (int i = 0; i < MAX_RTPC; i++) { - rtp_content.radiotext[i] = NULL; - rtp_content.radiotext[MAX_RTPC+i] = NULL; - rtp_content.item_Title[i] = NULL; - rtp_content.item_Artist[i] = NULL; - rtp_content.info_Stock[i] = NULL; - rtp_content.info_Sport[i] = NULL; - rtp_content.info_Lottery[i] = NULL; - rtp_content.info_Weather[i] = NULL; - rtp_content.info_Other[i] = NULL; - } - - rtp_content.info_News = NULL; - rtp_content.info_NewsLocal = NULL; - rtp_content.info_DateTime = NULL; - rtp_content.info_Traffic = NULL; - rtp_content.info_Alarm = NULL; - rtp_content.info_Advert = NULL; - rtp_content.info_Url = NULL; - rtp_content.prog_Station = NULL; - rtp_content.prog_Now = NULL; - rtp_content.prog_Next = NULL; - rtp_content.prog_Part = NULL; - rtp_content.prog_Host = NULL; - rtp_content.prog_EditStaff = NULL; - rtp_content.prog_Homepage = NULL; - rtp_content.phone_Hotline = NULL; - rtp_content.phone_Studio = NULL; - rtp_content.email_Hotline = NULL; - rtp_content.email_Studio = NULL; - - // Rass init - Rass_Show = Rass_Archiv = -1; - for (int i = 0; i <= 10; i++) { - for (int ii = 0; ii < 4; ii++) - Rass_Flags[i][ii] = false; - } - Rass_GalStart = Rass_GalEnd = Rass_GalCount = 0; - for (int i = 0; i < RASS_GALMAX; i++) - Rass_Gallery[i] = false; - Rass_SlideFoto = 99; - - if (S_RtFunc < 1) return; - - // RDS-Receiver for seperate Data-PIDs, only Livemode, hardcoded Astra_19E + Hotbird 13E - int pid = 0; - if (!replay) { - switch (chan->Tid()) { - case 1113: - switch (pid = chan->Apid(0)) { // Astra_19.2E - 12633 GHz - /* case 0x161: pid = 0x229; // radio top40 - break; */ - case 0x400: // Hitradio FFH - case 0x406: // planet radio - case 0x40c: pid += 1; // harmony.ffm - break; - default: return; - } - break; - case 1115: - switch (pid = chan->Apid(0)) { // Astra_19.2E - 12663 GHz - case 0x1bA: pid = 0x21e; // TruckRadio, only NaviData(0xbf) seen - break; - default: return; - } - break; - case 5300: - switch (pid = chan->Apid(0)) { // Hotbird_13E - 11747 GHz, no Radiotext @ moment, only TMC + MECs 25/26 - case 0xdc3: // Radio 1 - case 0xdd3: // Radio 3 - case 0xddb: // Radio 5 - case 0xde3: // Radio Exterior - case 0xdeb: pid += 1; // Radio 4 - break; - default: return; - } - break; - default: return; - } - RDSReceiver = new cRDSReceiver(pid); - rdsdevice = cDevice::ActualDevice(); - rdsdevice->AttachReceiver(RDSReceiver); - } -} - -void cRadioAudio::DisableRadioTextProcessing() -{ - RT_Replay = enabled = false; - - // Radiotext & Rass - RT_Info = -1; - RT_ReOpen = false; - Rass_Show = Rass_Archiv = -1; - Rass_GalStart = Rass_GalEnd = Rass_GalCount = 0; - - if (RadioTextOsd != NULL) - RadioTextOsd->Hide(); - - if (RDSReceiver != NULL) { - rdsdevice->Detach(RDSReceiver); - delete RDSReceiver; - RDSReceiver = NULL; - rdsdevice = NULL; - } -} - - -// --- cRadioTextOsd ------------------------------------------------------ - -cBitmap cRadioTextOsd::rds(rds_xpm); -cBitmap cRadioTextOsd::arec(arec_xpm); -cBitmap cRadioTextOsd::rass(rass_xpm); -cBitmap cRadioTextOsd::index(index_xpm); -cBitmap cRadioTextOsd::marker(marker_xpm); -cBitmap cRadioTextOsd::page1(page1_xpm); -cBitmap cRadioTextOsd::pages2(pages2_xpm); -cBitmap cRadioTextOsd::pages3(pages3_xpm); -cBitmap cRadioTextOsd::pages4(pages4_xpm); -cBitmap cRadioTextOsd::no0(no0_xpm); -cBitmap cRadioTextOsd::no1(no1_xpm); -cBitmap cRadioTextOsd::no2(no2_xpm); -cBitmap cRadioTextOsd::no3(no3_xpm); -cBitmap cRadioTextOsd::no4(no4_xpm); -cBitmap cRadioTextOsd::no5(no5_xpm); -cBitmap cRadioTextOsd::no6(no6_xpm); -cBitmap cRadioTextOsd::no7(no7_xpm); -cBitmap cRadioTextOsd::no8(no8_xpm); -cBitmap cRadioTextOsd::no9(no9_xpm); -cBitmap cRadioTextOsd::bok(bok_xpm); -cBitmap cRadioTextOsd::pageE(pageE_xpm); - -cRadioTextOsd::cRadioTextOsd() -{ - RadioTextOsd = this; - osd = NULL; - qosd = NULL; - rtclosed = rassclosed = false; - RT_ReOpen = false; -} - -cRadioTextOsd::~cRadioTextOsd() -{ - if (Rass_Archiv >= 0) { - if (!RT_Replay) - Rass_Archiv = RassImage(-1, -1, false); - else { - Rass_Archiv = -1; - RadioAudio->SetBackgroundImage(ReplayFile); - } - } - - if (osd != NULL) - delete osd; - if (qosd != NULL) - delete qosd; - RadioTextOsd = NULL; - RT_ReOpen = !RT_OsdTO; - - cRemote::Put(LastKey); -} - -void cRadioTextOsd::Show(void) -{ - LastKey = kNone; - RT_OsdTO = false; -#ifndef VDRP_CLOSEMENU - osdtimer.Set(); -#endif - - ftitel = cFont::GetFont(fontOsd); - ftext = cFont::GetFont(fontSml); - fheight = ftext->Height() + 4; - int rowoffset = (S_RtOsdTitle == 1) ? 1 : 0; - bheight = (S_RtOsdTags >=1 ) ? fheight * (S_RtOsdRows+rowoffset+2) : fheight * (S_RtOsdRows+rowoffset); - (S_RtOsdTitle == 1) ? bheight += 20 : bheight += 12; - - asprintf(&RTp_Titel, "%s - %s", tr("RTplus"), RT_Titel); - - if (S_RtDispl >= 1 && (Rass_Show == -1 || S_RassText >= 2)) { - RT_MsgShow = (RT_Info >= 1); - ShowText(); - } -} - -void cRadioTextOsd::Hide(void) -{ - RTOsdClose(); - RassOsdClose(); -} - -void cRadioTextOsd::RTOsdClose(void) -{ - if (osd != NULL) { - delete osd; - osd = NULL; - } -} -#endif - -#if ENABLE_RASS -int CRadioText::RassImage(int QArchiv, int QKey, bool DirUp) -{ - int i; - - if (QKey >= 0 && QKey <= 9) { - if (QArchiv == 0) - (Rass_Flags[QKey][0]) ? QArchiv = QKey * 1000 : QArchiv = 0; - else if (QArchiv > 0) { - if (floor(QArchiv/1000) == QKey) { - for (i = 3; i >= 0; i--) { -// if (fmod(QArchiv, pow(10, i)) == 0) - if ((QArchiv % (i==3 ? 1000 : i==2 ? 100 : i==1 ? 10 : 1)) == 0) - break; - } - - if (i > 0) { - --i; - QArchiv += QKey * (int) (i==3 ? 1000 : i==2 ? 100 : i==1 ? 10 : 1); - } - else - QArchiv = QKey * 1000; - (Rass_Flags[QKey][3-i]) ? : QArchiv = QKey * 1000; - } - else - (Rass_Flags[QKey][0]) ? QArchiv = QKey * 1000 : QArchiv = 0; - } - } - - // Gallery - else if (QKey > 9 && Rass_GalCount >= 0) { - if (QArchiv < Rass_GalStart || QArchiv > Rass_GalEnd) - QArchiv = Rass_GalStart - 1; - if (DirUp) { - for (i = QArchiv+1; i <= Rass_GalEnd; i++) { - if (Rass_Gallery[i]) - break; - } - QArchiv = (i <= Rass_GalEnd) ? i : Rass_GalStart; - } - else { - for (i = QArchiv-1; i >= Rass_GalStart; i--) { - if (Rass_Gallery[i]) - break; - } - QArchiv = (i >= Rass_GalStart) ? i : Rass_GalEnd; - } - } - - // show mpeg-still - char *image; - if (QArchiv >= 0) - asprintf(&image, "%s/Rass_%d.mpg", DataDir, QArchiv); - else - asprintf(&image, "%s/Rass_show.mpg", DataDir); -// Houdini: SetBackgroundImage() does not accept mpg stills -// frameBuffer->useBackground(frameBuffer->loadBackground(image));// set useBackground true or false -// frameBuffer->paintBackground(); -// RadioAudio->SetBackgroundImage(image); - free(image); - - return QArchiv; -} -#endif - -#if 0 -void cRadioTextOsd::RassOsd(void) -{ - int fh = ftext->Height(); - - if (!qosd && !osd && !Skins.IsOpen() && !cOsd::IsOpen()) { - qosd = cOsdProvider::NewOsd(Setup.OSDLeft, Setup.OSDTop+Setup.OSDHeight - (29+264-6+36)); - tArea Area = {0, 0, 97, 29+264+5, 4}; - qosd->SetAreas(&Area, 1); - } - - if (qosd) { - uint32_t bcolor, fcolor; - int skin = theme_skin(); - - // Logo - bcolor = radioSkin[skin].clrTitleBack; - fcolor = radioSkin[skin].clrTitleText; - qosd->DrawRectangle(0, 1, 97, 29, bcolor); - qosd->DrawBitmap(25, 5, rass, bcolor, fcolor); - - // Body - bcolor = radioSkin[skin].clrBack; - fcolor = radioSkin[skin].clrText; - int offs = 29 + 2; - qosd->DrawRectangle(0, offs, 97, 29+264+5, bcolor); - - // Keys+Index - offs += 4; - qosd->DrawBitmap(4, offs, no0, bcolor, fcolor); - qosd->DrawBitmap(44, offs, index, bcolor, fcolor); - qosd->DrawBitmap(4, 24+offs, no1, bcolor, fcolor); - qosd->DrawBitmap(4, 48+offs, no2, bcolor, fcolor); - qosd->DrawBitmap(4, 72+offs, no3, bcolor, fcolor); - qosd->DrawBitmap(4, 96+offs, no4, bcolor, fcolor); - qosd->DrawBitmap(4, 120+offs, no5, bcolor, fcolor); - qosd->DrawBitmap(4, 144+offs, no6, bcolor, fcolor); - qosd->DrawBitmap(4, 168+offs, no7, bcolor, fcolor); - qosd->DrawBitmap(4, 192+offs, no8, bcolor, fcolor); - qosd->DrawBitmap(4, 216+offs, no9, bcolor, fcolor); - qosd->DrawBitmap(4, 240+offs, bok, bcolor, fcolor); - - // Content - bool mark = false; - for (int i = 1; i <= 9; i++) { - // Pages - if (Rass_Flags[i][0] && Rass_Flags[i][1] && Rass_Flags[i][2] && Rass_Flags[i][3]) - qosd->DrawBitmap(48, (i*24)+offs, pages4, bcolor, fcolor); - else if (Rass_Flags[i][0] && Rass_Flags[i][1] && Rass_Flags[i][2]) - qosd->DrawBitmap(48, (i*24)+offs, pages3, bcolor, fcolor); - else if (Rass_Flags[i][0] && Rass_Flags[i][1]) - qosd->DrawBitmap(48, (i*24)+offs, pages2, bcolor, fcolor); - else if (Rass_Flags[i][0]) - qosd->DrawBitmap(48, (i*24)+offs, page1, bcolor, fcolor); - - // Marker - if (floor(Rass_Archiv/1000) == i) { - qosd->DrawBitmap(28, (i*24)+offs, marker, bcolor, fcolor); - mark = true; - } - } - - // Gallery - if (Rass_GalCount > 0) { - char *temp; - qosd->DrawBitmap(48, 240+offs, pageE, bcolor, fcolor); - asprintf(&temp, "%d", Rass_GalCount); - qosd->DrawText(67, 240+offs-2, temp, fcolor, clrTransparent, ftext, 97, fh); - free(temp); - } - - // Marker gallery/index - if (!mark) { - if (Rass_Archiv > 0 && Rass_Archiv <= RASS_GALMAX) - qosd->DrawBitmap(30, 240+offs, marker, bcolor, fcolor); - else - qosd->DrawBitmap(28, offs, marker, bcolor, fcolor); - } - qosd->Flush(); - } -} - -void cRadioTextOsd::RassOsdTip(void) -{ - int fh = ftext->Height(); - - if (!qosd && !osd && !Skins.IsOpen() && !cOsd::IsOpen()) { - qosd = cOsdProvider::NewOsd(Setup.OSDLeft, Setup.OSDTop+Setup.OSDHeight - (29+(2*fh)-6+36)); - tArea Area = {0, 0, 97, 29+(2*fh)+5, 4}; - qosd->SetAreas(&Area, 1); - } - - if (qosd) { - uint32_t bcolor, fcolor; - int skin = theme_skin(); - - // Title - bcolor = radioSkin[skin].clrTitleBack; - fcolor = radioSkin[skin].clrTitleText; - qosd->DrawRectangle(0, 0, 97, 29, bcolor); - qosd->DrawBitmap(25, 5, rass, bcolor, fcolor); - - // Body - bcolor = radioSkin[skin].clrBack; - fcolor = radioSkin[skin].clrText; - qosd->DrawRectangle(0, 29+2, 97, 29+(2*fh)+5, bcolor); - qosd->DrawText(5, 29+4, tr("Records"), fcolor, clrTransparent, ftext, 97, fh); - qosd->DrawText(5, 29+fh+4, tr("with <0>"), fcolor, clrTransparent, ftext, 97, fh); - qosd->Flush(); - } -} - -void cRadioTextOsd::RassOsdClose(void) -{ - if (qosd != NULL) { - delete qosd; - qosd = NULL; - } -} - -void cRadioTextOsd::RassImgSave(char *size, int pos) -{ - char *infile, *outfile, *cmd; - int filenr = 0, error = 0; - struct tm *ts, tm_store; - time_t t = time(NULL); - ts = localtime_r(&t, &tm_store); - - switch (pos) { - // all from 1-9 - case 1 ... 9: - for (int i = 3; i >= 0; i--) { - filenr += (int) (pos * pow(10, i)); - if (Rass_Flags[pos][3-i]) { - asprintf(&infile, "%s/Rass_%d.mpg", DataDir, filenr); - asprintf(&outfile, "%s/Rass_%s-%04d_%02d%02d%02d%02d.jpg", DataDir, RT_Titel, filenr, - ts->tm_mon+1, ts->tm_mday, ts->tm_hour, ts->tm_min); - asprintf(&cmd, "ffmpeg -i %s -s %s -f mjpeg -y %s", infile, size, outfile); - if ((error = system(cmd))) - i = -1; - } - } - asprintf(&cmd, "%s '%d'", tr("Rass-Image(s) saved from Archiv "), pos); - break; - - // all from gallery - case 10: - for (int i = Rass_GalStart; i <= Rass_GalEnd; i++) { - if (Rass_Gallery[i]) { - asprintf(&infile, "%s/Rass_%d.mpg", DataDir, i); - asprintf(&outfile, "%s/Rass_%s-Gallery%04d_%02d%02d.jpg", DataDir, RT_Titel, i, - ts->tm_mon+1, ts->tm_mday); - asprintf(&cmd, "ffmpeg -i %s -s %s -f mjpeg -y %s", infile, size, outfile); - if ((error = system(cmd))) - i = Rass_GalEnd + 1; - } - } - asprintf(&cmd, "%s", tr("Rass-Image(s) saved from Gallery")); - break; - - // single - default: - asprintf(&infile, "%s/Rass_%d.mpg", DataDir, Rass_Archiv); - asprintf(&outfile, "%s/Rass_%s-%04d_%02d%02d%02d%02d.jpg", DataDir, RT_Titel, Rass_Archiv, - ts->tm_mon+1, ts->tm_mday, ts->tm_hour, ts->tm_min); - asprintf(&cmd, "ffmpeg -i %s -s %s -f mjpeg -y %s", infile, size, outfile); - error = system(cmd); - asprintf(&cmd, "%s: %s", tr("Rass-Image saved"), outfile); - } - free(infile); - - // Info - RassOsdClose(); - if (error) { - asprintf(&cmd, "%s: %s", tr("Rass-Image failed"), outfile); - Skins.Message(mtError, cmd, Setup.OSDMessageTime); - } - else - Skins.Message(mtInfo, cmd, Setup.OSDMessageTime); - - free(outfile); - free(cmd); -} - -void cRadioTextOsd::rtp_print(void) -{ - struct tm tm_store; - time_t t = time(NULL); - - printf("\n>>> RTplus-Memoryclasses @ %s", asctime(localtime_r(&t, &tm_store))); - printf(" on '%s' since %s", RT_Titel, asctime(localtime_r(&rtp_content.start, &tm_store))); - - printf("--- Programme ---\n"); - if (rtp_content.prog_Station != NULL) printf(" Station: %s\n", rtp_content.prog_Station); - if (rtp_content.prog_Now != NULL) printf(" Now: %s\n", rtp_content.prog_Now); - if (rtp_content.prog_Next != NULL) printf(" Next: %s\n", rtp_content.prog_Next); - if (rtp_content.prog_Part != NULL) printf(" Part: %s\n", rtp_content.prog_Part); - if (rtp_content.prog_Host != NULL) printf(" Host: %s\n", rtp_content.prog_Host); - if (rtp_content.prog_EditStaff != NULL) printf(" Ed.Staff: %s\n", rtp_content.prog_EditStaff); - if (rtp_content.prog_Homepage != NULL) printf(" Homepage: %s\n", rtp_content.prog_Homepage); - - printf("--- Interactivity ---\n"); - if (rtp_content.phone_Hotline != NULL) printf(" Phone-Hotline: %s\n", rtp_content.phone_Hotline); - if (rtp_content.phone_Studio != NULL) printf(" Phone-Studio: %s\n", rtp_content.phone_Studio); - if (rtp_content.email_Hotline != NULL) printf(" Email-Hotline: %s\n", rtp_content.email_Hotline); - if (rtp_content.email_Studio != NULL) printf(" Email-Studio: %s\n", rtp_content.email_Studio); - - printf("--- Info ---\n"); - if (rtp_content.info_News != NULL) printf(" News: %s\n", rtp_content.info_News); - if (rtp_content.info_NewsLocal != NULL) printf(" NewsLocal: %s\n", rtp_content.info_NewsLocal); - if (rtp_content.info_DateTime != NULL) printf(" DateTime: %s\n", rtp_content.info_DateTime); - if (rtp_content.info_Traffic != NULL) printf(" Traffic: %s\n", rtp_content.info_Traffic); - if (rtp_content.info_Alarm != NULL) printf(" Alarm: %s\n", rtp_content.info_Alarm); - if (rtp_content.info_Advert != NULL) printf(" Advertisg: %s\n", rtp_content.info_Advert); - if (rtp_content.info_Url != NULL) printf(" Url: %s\n", rtp_content.info_Url); - // no sorting - for (int i = 0; i < MAX_RTPC; i++) - if (rtp_content.info_Stock[i] != NULL) printf(" Stock[%02d]: %s\n", i, rtp_content.info_Stock[i]); - for (int i = 0; i < MAX_RTPC; i++) - if (rtp_content.info_Sport[i] != NULL) printf(" Sport[%02d]: %s\n", i, rtp_content.info_Sport[i]); - for (int i = 0; i < MAX_RTPC; i++) - if (rtp_content.info_Lottery[i] != NULL) printf(" Lottery[%02d]: %s\n", i, rtp_content.info_Lottery[i]); - for (int i = 0; i < MAX_RTPC; i++) - if (rtp_content.info_Weather[i] != NULL) printf(" Weather[%02d]: %s\n", i, rtp_content.info_Weather[i]); - for (int i = 0; i < MAX_RTPC; i++) - if (rtp_content.info_Other[i] != NULL) printf(" Other[%02d]: %s\n", i, rtp_content.info_Other[i]); -/* - printf("--- Item-Playlist ---\n"); - // no sorting - if (rtp_content.item_Index >= 0) { - for (int i = 0; i < MAX_RTPC; i++) { - if (rtp_content.item_Title[i] != NULL && rtp_content.item_Artist[i] != NULL) { - struct tm tm_store; - struct tm *ts = localtime_r(&rtp_content.item_Start[i], &tm_store); - printf(" [%02d] %02d:%02d Title: %s | Artist: %s\n", - i, ts->tm_hour, ts->tm_min, rtp_content.item_Title[i], rtp_content.item_Artist[i]); - } - } - } - - printf("--- Last seen Radiotext ---\n"); - // no sorting - if (rtp_content.rt_Index >= 0) { - for (int i = 0; i < 2*MAX_RTPC; i++) - if (rtp_content.radiotext[i] != NULL) printf(" [%03d] %s\n", i, rtp_content.radiotext[i]); - } -*/ - printf("<<<\n"); -} - -#define rtplog 0 -eOSState cRadioTextOsd::ProcessKey(eKeys Key) -{ - // RTplus Infolog - if (rtplog == 1 && S_Verbose >= 1) { - static int ct = 0; - if (++ct >= 60) { - ct = 0; - rtp_print(); - } - } - - // check end @ replay - if (RT_Replay) { - int rplayCur, rplayTot; - cControl::Control()->GetIndex(rplayCur, rplayTot, false); - if (rplayCur >= rplayTot-1) { - Hide(); - return osEnd; - } - } - - // Timeout or no Info/Rass - if (RT_OsdTO || (RT_OsdTOTemp > 0) || (RT_Info < 0)) { - Hide(); - return osEnd; - } - - eOSState state = cOsdObject::ProcessKey(Key); - if (state != osUnknown) return state; - - // Key pressed ... - if (Key != kNone && Key < k_Release) { - if (osd) { // Radiotext, -plus Osd - switch (Key) { - case kBack: RTOsdClose(); - rtclosed = true; - //rassclosed = false; - break; - case k0: RTOsdClose(); - RTplus_Osd = true; - cRemote::CallPlugin("radio"); - return osEnd; - default: Hide(); - LastKey = (Key == kChanUp || Key == kChanDn) ? kNone : Key; - return osEnd; - } - } - else if (qosd && Rass_Archiv >= 0) { // Rass-Archiv Osd - int i, pos; - pos = (Rass_Archiv > 0 && Rass_Archiv <= RASS_GALMAX) ? 10 : (int) floor(Rass_Archiv/1000); - switch (Key) { - // back to Slideshow - case kBlue: - case kBack: - if (!RT_Replay) - Rass_Archiv = RassImage(-1, 0, false); - else { - Rass_Archiv = -1; - RadioAudio->SetBackgroundImage(ReplayFile); - } - RassOsdClose(); - rassclosed = rtclosed = false; - break; - - // Archiv-Sides - case k0 ... k9: - Rass_Archiv = RassImage(Rass_Archiv, Key-k0, false); - RassOsd(); - break; - - case kOk: - if (Rass_Flags[10][0]) { - Rass_Archiv = RassImage(Rass_Archiv, 10, true); - RassOsd(); - } - break; - - case kLeft: - case kRight: - Rass_Archiv = RassImage(Rass_Archiv, pos, (Key == kRight) ? true : false); - RassOsd(); - break; - case kDown: - (pos == 10) ? i = 0 : i = pos + 1; - while (i != pos) { - if (Rass_Flags[i][0]) { - Rass_Archiv = RassImage(Rass_Archiv, i, true); - RassOsd(); - return osContinue; - } - if (++i > 10) i = 0; - } - break; - - case kUp: - (pos == 0) ? i = 10 : i = pos - 1; - while (i != pos) { - if (Rass_Flags[i][0]) { - Rass_Archiv = RassImage(Rass_Archiv, i, true); - RassOsd(); - return osContinue; - } - if (--i < 0) i = 10; - } - break; - - case kRed: - RassImgSave("1024x576", 0); - break; - - case kGreen: - RassImgSave("1024x576", pos); - break; - - case kYellow: - break; // todo, what ? - - default: - Hide(); - LastKey = (Key == kChanUp || Key == kChanDn) ? kNone : Key; - return osEnd; - } - } - else if (qosd && Rass_Archiv == -1) { // Rass-Slideshow Osd - switch (Key) { - // close - case kBack: - RassOsdClose(); - rassclosed = true; - //rtclosed = false; - break; - - // Archiv-Index - case k0: - if (Rass_Flags[0][0]) { - RassOsdClose(); - Rass_Archiv = RassImage(0, 0, false); - RassOsd(); - } - break; - - default: - Hide(); - LastKey = (Key == kChanUp || Key == kChanDn) ? kNone : Key; - return osEnd; - } - } - else { // no RT && no Rass - Hide(); - LastKey = (Key == kChanUp || Key == kChanDn) ? kNone : Key; - return osEnd; - } - } - // no Key pressed ... -#ifndef VDRP_CLOSEMENU - else if (S_RtOsdTO > 0 && osdtimer.Elapsed()/1000/60 >= (uint)S_RtOsdTO) { - RT_OsdTO = true; - Hide(); - return osEnd; - } -#endif - else if (Rass_Archiv >= 0) - RassOsd(); - else if (RT_MsgShow && !rtclosed && (Rass_Show == -1 || S_RassText >= 2 || rassclosed)) { - RassOsdClose(); - ShowText(); - } - else if (Rass_Flags[0][0] && !rassclosed && (S_RassText < 2 || rtclosed)) { - RTOsdClose(); - RassOsdTip(); - } - - return osContinue; -} - - -// --- cRTplusOsd ------------------------------------------------------ - -cRTplusOsd::cRTplusOsd(void) -:cOsdMenu(RTp_Titel, 3, 12) -{ - RTplus_Osd = false; - - bcount = helpmode = 0; - listtyp[0] = tr("Radiotext"); - listtyp[1] = tr("Playlist"); - listtyp[2] = tr("Sports"); - listtyp[3] = tr("Lottery"); - listtyp[4] = tr("Weather"); - listtyp[5] = tr("Stockmarket"); - listtyp[6] = tr("Other"); - - Load(); - Display(); -} - -cRTplusOsd::~cRTplusOsd() -{ -} - -void cRTplusOsd::Load(void) -{ - char text[80]; - - struct tm tm_store; - struct tm *ts = localtime_r(&rtp_content.start, &tm_store); - snprintf(text, sizeof(text), "%s %02d:%02d", tr("RTplus Memory since"), ts->tm_hour, ts->tm_min); - Add(new cOsdItem(hk(text))); - snprintf(text, sizeof(text), "%s", " "); - Add(new cOsdItem(hk(text))); - - snprintf(text, sizeof(text), "-- %s --", tr("Programme")); - Add(new cOsdItem(hk(text))); - if (rtp_content.prog_Station != NULL) { - snprintf(text, sizeof(text), "\t%s:\t%s", tr("Station"), rtp_content.prog_Station); - Add(new cOsdItem(hk(text))); - } - if (rtp_content.prog_Now != NULL) { - snprintf(text, sizeof(text), "\t%s:\t%s", tr("Now"), rtp_content.prog_Now); - Add(new cOsdItem(hk(text))); - } - if (rtp_content.prog_Part != NULL) { - snprintf(text, sizeof(text), "\t%s:\t%s", tr("...Part"), rtp_content.prog_Part); - Add(new cOsdItem(hk(text))); - } - if (rtp_content.prog_Next != NULL) { - snprintf(text, sizeof(text), "\t%s:\t%s", tr("Next"), rtp_content.prog_Next); - Add(new cOsdItem(hk(text))); - } - if (rtp_content.prog_Host != NULL) { - snprintf(text, sizeof(text), "\t%s:\t%s", tr("Host"), rtp_content.prog_Host); - Add(new cOsdItem(hk(text))); - } - if (rtp_content.prog_EditStaff != NULL) { - snprintf(text, sizeof(text), "\t%s:\t%s", tr("Edit.Staff"), rtp_content.prog_EditStaff); - Add(new cOsdItem(hk(text))); - } - if (rtp_content.prog_Homepage != NULL) { - snprintf(text, sizeof(text), "\t%s:\t%s", tr("Homepage"), rtp_content.prog_Homepage); - Add(new cOsdItem(hk(text))); - } - snprintf(text, sizeof(text), "%s", " "); - Add(new cOsdItem(hk(text))); - - snprintf(text, sizeof(text), "-- %s --", tr("Interactivity")); - Add(new cOsdItem(hk(text))); - if (rtp_content.phone_Hotline != NULL) { - snprintf(text, sizeof(text), "\t%s:\t%s", tr("Phone-Hotline"), rtp_content.phone_Hotline); - Add(new cOsdItem(hk(text))); - } - if (rtp_content.phone_Studio != NULL) { - snprintf(text, sizeof(text), "\t%s:\t%s", tr("Phone-Studio"), rtp_content.phone_Studio); - Add(new cOsdItem(hk(text))); - } - if (rtp_content.email_Hotline != NULL) { - snprintf(text, sizeof(text), "\t%s:\t%s", tr("Email-Hotline"), rtp_content.email_Hotline); - Add(new cOsdItem(hk(text))); - } - if (rtp_content.email_Studio != NULL) { - snprintf(text, sizeof(text), "\t%s:\t%s", tr("Email-Studio"), rtp_content.email_Studio); - Add(new cOsdItem(hk(text))); - } - snprintf(text, sizeof(text), "%s", " "); - Add(new cOsdItem(hk(text))); - - snprintf(text, sizeof(text), "-- %s --", tr("Info")); - Add(new cOsdItem(hk(text))); - if (rtp_content.info_News != NULL) { - snprintf(text, sizeof(text), "\t%s:\t%s", tr("News"), rtp_content.info_News); - Add(new cOsdItem(hk(text))); - } - if (rtp_content.info_NewsLocal != NULL) { - snprintf(text, sizeof(text), "\t%s:\t%s", tr("NewsLocal"), rtp_content.info_NewsLocal); - Add(new cOsdItem(hk(text))); - } - if (rtp_content.info_DateTime != NULL) { - snprintf(text, sizeof(text), "\t%s:\t%s", tr("DateTime"), rtp_content.info_DateTime); - Add(new cOsdItem(hk(text))); - } - if (rtp_content.info_Traffic != NULL) { - snprintf(text, sizeof(text), "\t%s:\t%s", tr("Traffic"), rtp_content.info_Traffic); - Add(new cOsdItem(hk(text))); - } - if (rtp_content.info_Alarm != NULL) { - snprintf(text, sizeof(text), "\t%s:\t%s", tr("Alarm"), rtp_content.info_Alarm); - Add(new cOsdItem(hk(text))); - } - if (rtp_content.info_Advert != NULL) { - snprintf(text, sizeof(text), "\t%s:\t%s", tr("Advertising"), rtp_content.info_Advert); - Add(new cOsdItem(hk(text))); - } - if (rtp_content.info_Url != NULL) { - snprintf(text, sizeof(text), "\t%s:\t%s", tr("Url"), rtp_content.info_Url); - Add(new cOsdItem(hk(text))); - } - - for (int i = 0; i <= 6; i++) - btext[i] = NULL; - bcount = 0; - asprintf(&btext[bcount++], "%s", listtyp[0]); - if (rtp_content.item_Index >= 0) - asprintf(&btext[bcount++], "%s", listtyp[1]); - if (rtp_content.info_SportIndex >= 0) - asprintf(&btext[bcount++], "%s", listtyp[2]); - if (rtp_content.info_LotteryIndex >= 0) - asprintf(&btext[bcount++], "%s", listtyp[3]); - if (rtp_content.info_WeatherIndex >= 0) - asprintf(&btext[bcount++], "%s", listtyp[4]); - if (rtp_content.info_StockIndex >= 0) - asprintf(&btext[bcount++], "%s", listtyp[5]); - if (rtp_content.info_OtherIndex >= 0) - asprintf(&btext[bcount++], "%s", listtyp[6]); - - switch (bcount) { - case 4: if (helpmode == 0) - SetHelp(btext[0], btext[1], btext[2], ">>"); - else if (helpmode == 1) - SetHelp("<<", btext[3], NULL, tr("Exit")); - break; - case 5: if (helpmode == 0) - SetHelp(btext[0], btext[1], btext[2], ">>"); - else if (helpmode == 1) - SetHelp("<<", btext[3], btext[4], tr("Exit")); - break; - case 6: if (helpmode == 0) - SetHelp(btext[0], btext[1], btext[2], ">>"); - else if (helpmode == 1) - SetHelp("<<", btext[3], btext[4], ">>"); - else if (helpmode == 2) - SetHelp("<<", btext[5], NULL, tr("Exit")); - break; - case 7: if (helpmode == 0) - SetHelp(btext[0], btext[1], btext[2], ">>"); - else if (helpmode == 1) - SetHelp("<<", btext[3], btext[4], ">>"); - else if (helpmode == 2) - SetHelp("<<", btext[5], btext[6], tr("Exit")); - break; - default: helpmode = 0; - SetHelp(btext[0], btext[1], btext[2], tr("Exit")); - } -} - -void cRTplusOsd::Update(void) -{ - Clear(); - Load(); - Display(); -} - -int cRTplusOsd::rtptyp(char *btext) -{ - for (int i = 0; i <= 6; i++) { - if (strcmp(btext, listtyp[i]) == 0) - return i; - } - - return -1; -} - -void cRTplusOsd::rtp_fileprint(void) -{ - struct tm *ts, tm_store; - char *fname, *fpath; - FILE *fd; - int ind, lfd = 0; - - time_t t = time(NULL); - ts = localtime_r(&t, &tm_store); - asprintf(&fname, "RTplus_%s_%04d-%02d-%02d.%02d.%02d", RT_Titel, ts->tm_year+1900, ts->tm_mon+1, ts->tm_mday, ts->tm_hour, ts->tm_min); - asprintf(&fpath, "%s/%s", DataDir, fname); - if ((fd = fopen(fpath, "w")) != NULL) { - - fprintf(fd, ">>> RTplus-Memoryclasses @ %s", asctime(localtime_r(&t, &tm_store))); - fprintf(fd, " on '%s' since %s", RT_Titel, asctime(localtime_r(&rtp_content.start, &tm_store))); - - fprintf(fd, "--- Programme ---\n"); - if (rtp_content.prog_Station != NULL) fprintf(fd, " Station: %s\n", rtp_content.prog_Station); - if (rtp_content.prog_Now != NULL) fprintf(fd, " Now: %s\n", rtp_content.prog_Now); - if (rtp_content.prog_Part != NULL) fprintf(fd, " Part: %s\n", rtp_content.prog_Part); - if (rtp_content.prog_Next != NULL) fprintf(fd, " Next: %s\n", rtp_content.prog_Next); - if (rtp_content.prog_Host != NULL) fprintf(fd, " Host: %s\n", rtp_content.prog_Host); - if (rtp_content.prog_EditStaff != NULL) fprintf(fd, " Ed.Staff: %s\n", rtp_content.prog_EditStaff); - if (rtp_content.prog_Homepage != NULL) fprintf(fd, " Homepage: %s\n", rtp_content.prog_Homepage); - - fprintf(fd, "--- Interactivity ---\n"); - if (rtp_content.phone_Hotline != NULL) fprintf(fd, " Phone-Hotline: %s\n", rtp_content.phone_Hotline); - if (rtp_content.phone_Studio != NULL) fprintf(fd, " Phone-Studio: %s\n", rtp_content.phone_Studio); - if (rtp_content.email_Hotline != NULL) fprintf(fd, " Email-Hotline: %s\n", rtp_content.email_Hotline); - if (rtp_content.email_Studio != NULL) fprintf(fd, " Email-Studio: %s\n", rtp_content.email_Studio); - - fprintf(fd, "--- Info ---\n"); - if (rtp_content.info_News != NULL) fprintf(fd, " News: %s\n", rtp_content.info_News); - if (rtp_content.info_NewsLocal != NULL) fprintf(fd, " NewsLocal: %s\n", rtp_content.info_NewsLocal); - if (rtp_content.info_DateTime != NULL) fprintf(fd, " DateTime: %s\n", rtp_content.info_DateTime); - if (rtp_content.info_Traffic != NULL) fprintf(fd, " Traffic: %s\n", rtp_content.info_Traffic); - if (rtp_content.info_Alarm != NULL) fprintf(fd, " Alarm: %s\n", rtp_content.info_Alarm); - if (rtp_content.info_Advert != NULL) fprintf(fd, " Advertisg: %s\n", rtp_content.info_Advert); - if (rtp_content.info_Url != NULL) fprintf(fd, " Url: %s\n", rtp_content.info_Url); - - if (rtp_content.item_Index >= 0) { - fprintf(fd, "--- Item-Playlist ---\n"); - ind = rtp_content.item_Index; - if (ind < (MAX_RTPC-1) && rtp_content.item_Title[ind+1] != NULL) { - for (int i = ind+1; i < MAX_RTPC; i++) { - if (rtp_content.item_Title[i] != NULL && rtp_content.item_Artist[i] != NULL) { - ts = localtime_r(&rtp_content.item_Start[i], &tm_store); - fprintf(fd, " %02d:%02d Title: '%s' | Artist: '%s'\n", ts->tm_hour, ts->tm_min, rtp_content.item_Title[i], rtp_content.item_Artist[i]); - } - } - } - for (int i = 0; i <= ind; i++) { - if (rtp_content.item_Title[i] != NULL && rtp_content.item_Artist[i] != NULL) { - ts = localtime_r(&rtp_content.item_Start[i], &tm_store); - fprintf(fd, " %02d:%02d Title: '%s' | Artist: '%s'\n", ts->tm_hour, ts->tm_min, rtp_content.item_Title[i], rtp_content.item_Artist[i]); - } - } - } - - if (rtp_content.info_SportIndex >= 0) { - fprintf(fd, "--- Sports ---\n"); - ind = rtp_content.info_SportIndex; - if (ind < (MAX_RTPC-1) && rtp_content.info_Sport[ind+1] != NULL) { - for (int i = ind+1; i < MAX_RTPC; i++) { - if (rtp_content.info_Sport[i] != NULL) - fprintf(fd, " %02d. %s\n", ++lfd, rtp_content.info_Sport[i]); - } - } - for (int i = 0; i <= ind; i++) { - if (rtp_content.info_Sport[i] != NULL) - fprintf(fd, " %02d. %s\n", ++lfd, rtp_content.info_Sport[i]); - } - } - - if (rtp_content.info_LotteryIndex >= 0) { - fprintf(fd, "--- Lottery ---\n"); - ind = rtp_content.info_LotteryIndex; - if (ind < (MAX_RTPC-1) && rtp_content.info_Lottery[ind+1] != NULL) { - for (int i = ind+1; i < MAX_RTPC; i++) { - if (rtp_content.info_Lottery[i] != NULL) - fprintf(fd, " %02d. %s\n", ++lfd, rtp_content.info_Lottery[i]); - } - } - for (int i = 0; i <= ind; i++) { - if (rtp_content.info_Lottery[i] != NULL) - fprintf(fd, " %02d. %s\n", ++lfd, rtp_content.info_Lottery[i]); - } - } - - if (rtp_content.info_WeatherIndex >= 0) { - fprintf(fd, "--- Weather ---\n"); - ind = rtp_content.info_WeatherIndex; - if (ind < (MAX_RTPC-1) && rtp_content.info_Weather[ind+1] != NULL) { - for (int i = ind+1; i < MAX_RTPC; i++) { - if (rtp_content.info_Weather[i] != NULL) - fprintf(fd, " %02d. %s\n", ++lfd, rtp_content.info_Weather[i]); - } - } - for (int i = 0; i <= ind; i++) { - if (rtp_content.info_Weather[i] != NULL) - fprintf(fd, " %02d. %s\n", ++lfd, rtp_content.info_Weather[i]); - } - } - - if (rtp_content.info_StockIndex >= 0) { - fprintf(fd, "--- Stockmarket ---\n"); - ind = rtp_content.info_StockIndex; - if (ind < (MAX_RTPC-1) && rtp_content.info_Stock[ind+1] != NULL) { - for (int i = ind+1; i < MAX_RTPC; i++) { - if (rtp_content.info_Stock[i] != NULL) - fprintf(fd, " %02d. %s\n", ++lfd, rtp_content.info_Stock[i]); - } - } - for (int i = 0; i <= ind; i++) { - if (rtp_content.info_Stock[i] != NULL) - fprintf(fd, " %02d. %s\n", ++lfd, rtp_content.info_Stock[i]); - } - } - - if (rtp_content.info_OtherIndex >= 0) { - fprintf(fd, "--- Other ---\n"); - ind = rtp_content.info_OtherIndex; - if (ind < (MAX_RTPC-1) && rtp_content.info_Other[ind+1] != NULL) { - for (int i = ind+1; i < MAX_RTPC; i++) { - if (rtp_content.info_Other[i] != NULL) - fprintf(fd, " %02d. %s\n", ++lfd, rtp_content.info_Other[i]); - } - } - for (int i = 0; i <= ind; i++) { - if (rtp_content.info_Other[i] != NULL) - fprintf(fd, " %02d. %s\n", ++lfd, rtp_content.info_Other[i]); - } - } - - fprintf(fd, "--- Last seen Radiotext ---\n"); - ind = rtp_content.rt_Index; - if (ind < (2*MAX_RTPC-1) && rtp_content.radiotext[ind+1] != NULL) { - for (int i = ind+1; i < 2*MAX_RTPC; i++) { - if (rtp_content.radiotext[i] != NULL) - fprintf(fd, " %03d. %s\n", ++lfd, rtp_content.radiotext[i]); - } - } - for (int i = 0; i <= ind; i++) { - if (rtp_content.radiotext[i] != NULL) - fprintf(fd, " %03d. %s\n", ++lfd, rtp_content.radiotext[i]); - } - - fprintf(fd, "<<<\n"); - fclose(fd); - - char *infotext; - asprintf(&infotext, "%s: %s", tr("RTplus-File saved"), fname); - Skins.Message(mtInfo, infotext, Setup.OSDMessageTime); - free(infotext); - } - else - printfesyslog("ERROR vdr-radio: writing RTplus-File failed '%s'", fpath); - - free(fpath); - free(fname); -} - -eOSState cRTplusOsd::ProcessKey(eKeys Key) -{ - int typ, ind; - eOSState state = cOsdMenu::ProcessKey(Key); - - if (HasSubMenu()) - return osContinue; - - if (state == osUnknown) { - switch (Key) { - case kBack: - case kOk: - return osEnd; - - case kBlue: - if (bcount >= 4 && helpmode == 0) { - helpmode += 1; - Update(); - } - else if (bcount >= 6 && helpmode == 1) { - helpmode += 1; - Update(); - } - else - return osEnd; - break; - - case k0: - Update(); - break; - - case k8: - rtp_fileprint(); - break; - - case kRed: - if (helpmode == 0) { - if (btext[0] != NULL) - if ((typ = rtptyp(btext[0])) >= 0) - AddSubMenu(new cRTplusList(typ)); - } - else { - helpmode -= 1; - Update(); - } - break; - - case kGreen: - ind = (helpmode*2) + 1; - if (btext[ind] != NULL) { - if ((typ = rtptyp(btext[ind])) >= 0) - AddSubMenu(new cRTplusList(typ)); - } - break; - - case kYellow: - ind = (helpmode*2) + 2; - if (btext[ind] != NULL) { - if ((typ = rtptyp(btext[ind])) >= 0) - AddSubMenu(new cRTplusList(typ)); - } - break; - default: - state = osContinue; - } - } - - static int ct; - if (++ct >= 60) { - ct = 0; - Update(); - } - - return state; -} - - -// --- cRTplusList ------------------------------------------------------ - -cRTplusList::cRTplusList(int Typ) -:cOsdMenu(RTp_Titel, 4) -{ - typ = Typ; - refresh = false; - - Load(); - Display(); -} - -cRTplusList::~cRTplusList() -{ - typ = 0; -} - -void cRTplusList::Load(void) -{ - char text[80]; - struct tm *ts, tm_store; - int ind, lfd = 0; - - ts = localtime_r(&rtp_content.start, &tm_store); - switch (typ) { - case 0: - snprintf(text, sizeof(text), "-- %s (max. %d) --", tr("last seen Radiotext"), 2*MAX_RTPC); - Add(new cOsdItem(hk(text))); - snprintf(text, sizeof(text), "%s", " "); - Add(new cOsdItem(hk(text))); - ind = rtp_content.rt_Index; - if (ind < (2*MAX_RTPC-1) && rtp_content.radiotext[ind+1] != NULL) { - for (int i = ind+1; i < 2*MAX_RTPC; i++) { - if (rtp_content.radiotext[i] != NULL) { - snprintf(text, sizeof(text), "%d.\t%s", ++lfd, rtp_content.radiotext[i]); - Add(new cOsdItem(hk(text))); - } - } - } - for (int i = 0; i <= ind; i++) { - if (rtp_content.radiotext[i] != NULL) { - snprintf(text, sizeof(text), "%d.\t%s", ++lfd, rtp_content.radiotext[i]); - Add(new cOsdItem(hk(text)), refresh); - } - } - break; - - case 1: - SetCols(6, 19, 1); - snprintf(text, sizeof(text), "-- %s --", tr("Playlist")); - Add(new cOsdItem(hk(text))); - snprintf(text, sizeof(text), "%s\t%s\t\t%s", tr("Time"), tr("Title"), tr("Artist")); - Add(new cOsdItem(hk(text))); - snprintf(text, sizeof(text), "%s", " "); - Add(new cOsdItem(hk(text))); - ind = rtp_content.item_Index; - if (ind < (MAX_RTPC-1) && rtp_content.item_Title[ind+1] != NULL) { - for (int i = ind+1; i < MAX_RTPC; i++) { - if (rtp_content.item_Title[i] != NULL && rtp_content.item_Artist[i] != NULL) { - ts = localtime_r(&rtp_content.item_Start[i], &tm_store); - snprintf(text, sizeof(text), "%02d:%02d\t%s\t\t%s", ts->tm_hour, ts->tm_min, rtp_content.item_Title[i], rtp_content.item_Artist[i]); - Add(new cOsdItem(hk(text))); - } - } - } - for (int i = 0; i <= ind; i++) { - if (rtp_content.item_Title[i] != NULL && rtp_content.item_Artist[i] != NULL) { - ts = localtime_r(&rtp_content.item_Start[i], &tm_store); - snprintf(text, sizeof(text), "%02d:%02d\t%s\t\t%s", ts->tm_hour, ts->tm_min, rtp_content.item_Title[i], rtp_content.item_Artist[i]); - Add(new cOsdItem(hk(text)), refresh); - } - } - break; - - case 2: - snprintf(text, sizeof(text), "-- %s --", tr("Sports")); - Add(new cOsdItem(hk(text))); - snprintf(text, sizeof(text), "%s", " "); - Add(new cOsdItem(hk(text))); - ind = rtp_content.info_SportIndex; - if (ind < (MAX_RTPC-1) && rtp_content.info_Sport[ind+1] != NULL) { - for (int i = ind+1; i < MAX_RTPC; i++) { - if (rtp_content.info_Sport[i] != NULL) { - snprintf(text, sizeof(text), "%d.\t%s", ++lfd, rtp_content.info_Sport[i]); - Add(new cOsdItem(hk(text))); - } - } - } - for (int i = 0; i <= ind; i++) { - if (rtp_content.info_Sport[i] != NULL) { - snprintf(text, sizeof(text), "%d.\t%s", ++lfd, rtp_content.info_Sport[i]); - Add(new cOsdItem(hk(text)), refresh); - } - } - break; - - case 3: - snprintf(text, sizeof(text), "-- %s --", tr("Lottery")); - Add(new cOsdItem(hk(text))); - snprintf(text, sizeof(text), "%s", " "); - Add(new cOsdItem(hk(text))); - ind = rtp_content.info_LotteryIndex; - if (ind < (MAX_RTPC-1) && rtp_content.info_Lottery[ind+1] != NULL) { - for (int i = ind+1; i < MAX_RTPC; i++) { - if (rtp_content.info_Lottery[i] != NULL) { - snprintf(text, sizeof(text), "%d.\t%s", ++lfd, rtp_content.info_Lottery[i]); - Add(new cOsdItem(hk(text))); - } - } - } - for (int i = 0; i <= ind; i++) { - if (rtp_content.info_Lottery[i] != NULL) { - snprintf(text, sizeof(text), "%d.\t%s", ++lfd, rtp_content.info_Lottery[i]); - Add(new cOsdItem(hk(text)), refresh); - } - } - break; - - case 4: snprintf(text, sizeof(text), "-- %s --", tr("Weather")); - Add(new cOsdItem(hk(text))); - snprintf(text, sizeof(text), "%s", " "); - Add(new cOsdItem(hk(text))); - ind = rtp_content.info_WeatherIndex; - if (ind < (MAX_RTPC-1) && rtp_content.info_Weather[ind+1] != NULL) { - for (int i = ind+1; i < MAX_RTPC; i++) { - if (rtp_content.info_Weather[i] != NULL) { - snprintf(text, sizeof(text), "%d.\t%s", ++lfd, rtp_content.info_Weather[i]); - Add(new cOsdItem(hk(text))); - } - } - } - for (int i = 0; i <= ind; i++) { - if (rtp_content.info_Weather[i] != NULL) { - snprintf(text, sizeof(text), "%d.\t%s", ++lfd, rtp_content.info_Weather[i]); - Add(new cOsdItem(hk(text)), refresh); - } - } - break; - case 5: - snprintf(text, sizeof(text), "-- %s --", tr("Stockmarket")); - Add(new cOsdItem(hk(text))); - snprintf(text, sizeof(text), "%s", " "); - Add(new cOsdItem(hk(text))); - ind = rtp_content.info_StockIndex; - if (ind < (MAX_RTPC-1) && rtp_content.info_Stock[ind+1] != NULL) { - for (int i = ind+1; i < MAX_RTPC; i++) { - if (rtp_content.info_Stock[i] != NULL) { - snprintf(text, sizeof(text), "%d.\t%s", ++lfd, rtp_content.info_Stock[i]); - Add(new cOsdItem(hk(text))); - } - } - } - for (int i = 0; i <= ind; i++) { - if (rtp_content.info_Stock[i] != NULL) { - snprintf(text, sizeof(text), "%d.\t%s", ++lfd, rtp_content.info_Stock[i]); - Add(new cOsdItem(hk(text)), refresh); - } - } - break; - - case 6: - snprintf(text, sizeof(text), "-- %s --", tr("Other")); - Add(new cOsdItem(hk(text))); - snprintf(text, sizeof(text), "%s", " "); - Add(new cOsdItem(hk(text))); - ind = rtp_content.info_OtherIndex; - if (ind < (MAX_RTPC-1) && rtp_content.info_Other[ind+1] != NULL) { - for (int i = ind+1; i < MAX_RTPC; i++) { - if (rtp_content.info_Other[i] != NULL) { - snprintf(text, sizeof(text), "%d.\t%s", ++lfd, rtp_content.info_Other[i]); - Add(new cOsdItem(hk(text))); - } - } - } - for (int i = 0; i <= ind; i++) { - if (rtp_content.info_Other[i] != NULL) { - snprintf(text, sizeof(text), "%d.\t%s", ++lfd, rtp_content.info_Other[i]); - Add(new cOsdItem(hk(text)), refresh); - } - } - break; - } - - SetHelp(NULL, NULL , refresh ? tr("Refresh Off") : tr("Refresh On"), tr("Back")); -} - -void cRTplusList::Update(void) -{ - Clear(); - Load(); - Display(); -} - -eOSState cRTplusList::ProcessKey(eKeys Key) -{ - eOSState state = cOsdMenu::ProcessKey(Key); - - if (state == osUnknown) { - switch (Key) { - case k0: - Update(); - break; - case kYellow: - refresh = (refresh) ? false : true; - Update(); - break; - case kBack: - case kOk: - case kBlue: - return osBack; - default: - state = osContinue; - } - } - - static int ct; - if (refresh) { - if (++ct >= 20) { - ct = 0; - Update(); - } - } - - return state; -} - -//--------------- End ----------------------------------------------------------------- -#endif - CRadioText::CRadioText(void) { pid = 0; @@ -2337,11 +702,6 @@ void CRadioText::init() RT_Text[i][0] = 0; RDS_PTYN[0] = 0; -#if ENABLE_RASS - // Rass ... - Rass_Show = -1; // -1=No, 0=Yes, 1=display - Rass_Archiv = -1; // -1=Off, 0=Index, 1000-9990=Slidenr. -#endif RT_MsgShow = false; // clear entries from old channel have_radiotext = false; } diff --git a/src/driver/radiotext.h b/src/driver/radiotext.h index d5758e48d..60aeaf266 100644 --- a/src/driver/radiotext.h +++ b/src/driver/radiotext.h @@ -46,21 +46,10 @@ #ifndef __RADIO_AUDIO_H #define __RADIO_AUDIO_H -#if 0 -#include -#include -#include -#include -#include -#include -#endif - #include #include #include -//#define ENABLE_RASS - typedef unsigned char uchar; typedef unsigned int uint; @@ -68,22 +57,6 @@ extern const char *ConfigDir; extern const char *DataDir; extern char *ReplayFile; - -#if 0 -// RDS-Receiver for seperate Data-Pids -class cRDSReceiver : public cReceiver { -private: - int pid; - bool rt_start; - bool rt_bstuff; -protected: - virtual void Receive(uchar *Data, int Length); -public: - cRDSReceiver(int Pid); - virtual ~cRDSReceiver(void); -}; -#endif - #define RT_MEL 65 #define tr(a) a @@ -101,18 +74,10 @@ private: int first_packets; //Radiotext -#if 0 -// cDevice *rdsdevice; - void RadiotextCheckPES(const uchar *Data, int Length); - void AudioRecorderService(void); -#endif void RadioStatusMsg(void); - void RassDecode(uchar *Data, int Length); bool DividePes(unsigned char *data, int length, int *substart, int *subend); uint pid; - //pthread_t threadRT; - //int dmxfd; OpenThreads::Mutex mutex; OpenThreads::Mutex pidmutex; @@ -125,7 +90,6 @@ public: CRadioText(void); ~CRadioText(void); int PES_Receive(unsigned char *data, int len); - int RassImage(int QArchiv, int QKey, bool DirUp); void EnableRadioTextProcessing(const char *Titel, bool replay = false); void DisableRadioTextProcessing(); void RadiotextDecode(uchar *Data, int Length); @@ -156,9 +120,7 @@ public: int S_RtBgTra; int S_RtFgCol; int S_RtDispl; - int S_RassText; int S_RtMsgItems; -// uint32_t rt_color[9]; int S_Verbose; // Radiotext @@ -173,80 +135,8 @@ public: int RT_OsdTOTemp; char RDS_PTYN[9]; char *RT_Titel, *RTp_Titel; - -#if ENABLE_RASS - // Rass ... - int Rass_Show; // -1=No, 0=Yes, 1=display - int Rass_Archiv; // -1=Off, 0=Index, 1000-9990=Slidenr. - bool Rass_Flags[11][4]; // Slides+Gallery existent -#endif - }; -#if 0 -class cRadioTextOsd : public cOsdObject { -private: - cOsd *osd; - cOsd *qosd; - cOsd *qiosd; - const cFont *ftitel; - const cFont *ftext; - int fheight; - int bheight; - eKeys LastKey; - cTimeMs osdtimer; - void rtp_print(void); - bool rtclosed; - bool rassclosed; - static cBitmap rds, arec, rass; - static cBitmap index, marker, page1, pages2, pages3, pages4, pageE; - static cBitmap no0, no1, no2, no3, no4, no5, no6, no7, no8, no9, bok; -public: - cRadioTextOsd(); - ~cRadioTextOsd(); - virtual void Hide(void); - virtual void Show(void); - virtual void ShowText(void); - virtual void RTOsdClose(void); - int RassImage(int QArchiv, int QKey, bool DirUp); - virtual void RassOsd(void); - virtual void RassOsdTip(void); - virtual void RassOsdClose(void); - virtual void RassImgSave(char *size, int pos); - virtual eOSState ProcessKey(eKeys Key); - virtual bool IsInteractive(void) { return false; } -}; - -class cRTplusOsd : public cOsdMenu { -private: - int bcount; - int helpmode; - const char *listtyp[7]; - char *btext[7]; - int rtptyp(char *btext); - void rtp_fileprint(void); -public: - cRTplusOsd(void); - virtual ~cRTplusOsd(); - virtual void Load(void); - virtual void Update(void); - virtual eOSState ProcessKey(eKeys Key); -}; - -class cRTplusList : public cOsdMenu { -private: - int typ; - bool refresh; -public: - cRTplusList(int Typ = 0); - ~cRTplusList(); - virtual void Load(void); - virtual void Update(void); - virtual eOSState ProcessKey(eKeys Key); -}; - -#endif - // Radiotext-Memory #define MAX_RTPC 50 struct rtp_classes { diff --git a/src/driver/radiotools.cpp b/src/driver/radiotools.cpp index 64449b238..f0be42bc9 100644 --- a/src/driver/radiotools.cpp +++ b/src/driver/radiotools.cpp @@ -26,19 +26,8 @@ #include #include -/* for timetest */ -//#include -//#include unsigned short crc16_ccitt(unsigned char *daten, int len, bool skipfirst) { -/* timetest */ -//struct timeval t; -//unsigned long long tstart = 0; -//if (gettimeofday(&t, NULL) == 0) -// tstart = t.tv_sec*1000000 + t.tv_usec; - - // CRC16-CCITT: x^16 + x^12 + x^5 + 1 - // with start 0xffff and result invers register unsigned short crc = 0xffff; if (skipfirst) daten++; @@ -50,10 +39,6 @@ unsigned short crc16_ccitt(unsigned char *daten, int len, bool skipfirst) crc ^= ((crc & 0xff) << 4) << 1; } -/* timetest */ -//if (tstart > 0 && gettimeofday(&t, NULL) == 0) -// printf("vdr-radio: crc-calctime = %d usec\n", (int)((t.tv_sec*1000000 + t.tv_usec) - tstart)); - return ~(crc); } @@ -72,30 +57,3 @@ cTimeMs::cTimeMs(void) { Set(); } - -#if 0 -uint64_t cTimeMs::Now(void) -{ - struct timeval t; - if (gettimeofday(&t, NULL) == 0) - return (uint64_t(t.tv_sec)) * 1000 + t.tv_usec / 1000; - return 0; -} - -void cTimeMs::Set(int Ms) -{ - begin = Now() + Ms; -} - -bool cTimeMs::TimedOut(void) -{ - return Now() >= begin; -} - -uint64_t cTimeMs::Elapsed(void) -{ - return Now() - begin; -} - -#endif -//--------------- End ----------------------------------------------------------------- diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index e2bbbcd5a..febd22e1c 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1395,26 +1395,6 @@ void CInfoViewer::showRadiotext() } // yoff = 17; ii = 1; -#if 0 - // RDS- or Rass-Symbol, ARec-Symbol or Bitrate - int inloff = (ftitel->Height() + 9 - 20) / 2; - if (Rass_Flags[0][0]) { - osd->DrawBitmap(Setup.OSDWidth-51, inloff, rass, bcolor, fcolor); - if (ARec_Record) - osd->DrawBitmap(Setup.OSDWidth-107, inloff, arec, bcolor, 0xFFFC1414); // FG=Red - else - inloff = (ftitel->Height() + 9 - ftext->Height()) / 2; - osd->DrawText(4, inloff, RadioAudio->bitrate, fcolor, clrTransparent, ftext, Setup.OSDWidth-59, ftext->Height(), taRight); - } - else { - osd->DrawBitmap(Setup.OSDWidth-84, inloff, rds, bcolor, fcolor); - if (ARec_Record) - osd->DrawBitmap(Setup.OSDWidth-140, inloff, arec, bcolor, 0xFFFC1414); // FG=Red - else - inloff = (ftitel->Height() + 9 - ftext->Height()) / 2; - osd->DrawText(4, inloff, RadioAudio->bitrate, fcolor, clrTransparent, ftext, Setup.OSDWidth-92, ftext->Height(), taRight); - } -#endif } // Body if (lines) { @@ -1439,48 +1419,7 @@ void CInfoViewer::showRadiotext() g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisIsUTF); } } -#if 0 - // + RT-Plus or PS-Text = 2 rows - if ((S_RtOsdTags == 1 && RT_PlusShow) || S_RtOsdTags >= 2) { - if (!RDS_PSShow || !strstr(RTP_Title, "---") || !strstr(RTP_Artist, "---")) { - sprintf(stext[1], "> %s %s", tr("Title :"), RTP_Title); - sprintf(stext[2], "> %s %s", tr("Artist :"), RTP_Artist); - osd->DrawText(4, 6+yoff+fheight*(ii++), stext[1], fcolor, clrTransparent, ftext, Setup.OSDWidth-4, ftext->Height()); - osd->DrawText(4, 3+yoff+fheight*(ii++), stext[2], fcolor, clrTransparent, ftext, Setup.OSDWidth-4, ftext->Height()); - } - else { - char *temp = ""; - int ind = (RDS_PSIndex == 0) ? 11 : RDS_PSIndex - 1; - for (int i = ind+1; i < 12; i++) - asprintf(&temp, "%s%s ", temp, RDS_PSText[i]); - for (int i = 0; i <= ind; i++) - asprintf(&temp, "%s%s ", temp, RDS_PSText[i]); - snprintf(stext[1], 6*9, "%s", temp); - snprintf(stext[2], 6*9, "%s", temp+(6*9)); - free(temp); - osd->DrawText(6, 6+yoff+fheight*ii, "[", fcolor, clrTransparent, ftext, 12, ftext->Height()); - osd->DrawText(Setup.OSDWidth-12, 6+yoff+fheight*ii, "]", fcolor, clrTransparent, ftext, Setup.OSDWidth-6, ftext->Height()); - osd->DrawText(16, 6+yoff+fheight*(ii++), stext[1], fcolor, clrTransparent, ftext, Setup.OSDWidth-16, ftext->Height(), taCenter); - osd->DrawText(6, 3+yoff+fheight*ii, "[", fcolor, clrTransparent, ftext, 12, ftext->Height()); - osd->DrawText(Setup.OSDWidth-12, 3+yoff+fheight*ii, "]", fcolor, clrTransparent, ftext, Setup.OSDWidth-6, ftext->Height()); - osd->DrawText(16, 3+yoff+fheight*(ii++), stext[2], fcolor, clrTransparent, ftext, Setup.OSDWidth-16, ftext->Height(), taCenter); - } - } -#endif } -#if 0 -// framebuffer can only display raw images - // show mpeg-still - char *image; - if (g_Radiotext->Rass_Archiv >= 0) - asprintf(&image, "%s/Rass_%d.mpg", DataDir, g_Radiotext->Rass_Archiv); - else - asprintf(&image, "%s/Rass_show.mpg", DataDir); - frameBuffer->useBackground(frameBuffer->loadBackground(image));// set useBackground true or false - frameBuffer->paintBackground(); -// RadioAudio->SetBackgroundImage(image); - free(image); -#endif } g_Radiotext->RT_MsgShow = false; From c2bab5c1b833459c9c18259d5ea14399f10de88e Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 27 Nov 2017 23:18:14 +0100 Subject: [PATCH 07/15] infoviewer: rework radiotext element; ... use OFFSET defines, larger font, fix header width Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/20cc2a2b171be490bdd525031ffea8c274cc3a48 Author: vanhofen Date: 2017-11-27 (Mon, 27 Nov 2017) Origin message was: ------------------ - infoviewer: rework radiotext element; ... use OFFSET defines, larger font, fix header width Signed-off-by: Thilo Graf --- src/gui/infoviewer.cpp | 108 ++++++++++++++++++++++------------------- src/gui/infoviewer.h | 2 - 2 files changed, 59 insertions(+), 51 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index febd22e1c..ed5615982 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -108,8 +108,6 @@ CInfoViewer::CInfoViewer () infoViewerBB = CInfoViewerBB::getInstance(); InfoHeightY = 0; ButtonWidth = 0; - rt_dx = 0; - rt_dy = 0; ChanNameX = 0; ChanNameY = 0; ChanWidth = 0; @@ -265,6 +263,7 @@ void CInfoViewer::initClock() clock->setTextColor(COL_INFOBAR_TEXT); } + void CInfoViewer::showRecordIcon (const bool show) { /* FIXME if record or timeshift stopped while infobar visible, artifacts */ @@ -1347,82 +1346,93 @@ void CInfoViewer::showMotorMoving (int duration) void CInfoViewer::killRadiotext() { if (g_Radiotext->S_RtOsd) - frameBuffer->paintBackgroundBox(rt_x, rt_y, rt_w, rt_h); + frameBuffer->paintBackgroundBoxRel(rt_x, rt_y, rt_w + OFFSET_SHADOW, rt_h + OFFSET_SHADOW); rt_x = rt_y = rt_h = rt_w = 0; CInfoClock::getInstance()->enableInfoClock(true); } void CInfoViewer::showRadiotext() { - char stext[3][100]; - bool RTisIsUTF = false; + /* + Maybe there's a nice CComponents solution with user's gradients. + */ + + if (g_Radiotext == NULL) + return; - if (g_Radiotext == NULL) return; infoViewerBB->showIcon_RadioText(g_Radiotext->haveRadiotext()); - if (g_Radiotext->S_RtOsd) { + char stext[3][100]; + bool RTisUTF8 = false; + + if (g_Radiotext->S_RtOsd) + { CInfoClock::getInstance()->enableInfoClock(false); + int rt_font = SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO; + int item_h = g_Font[rt_font]->getHeight(); + // dimensions of radiotext window - int /*yoff = 8,*/ ii = 0; - rt_dx = BoxEndX - BoxStartX; - rt_dy = 25; rt_x = BoxStartX; - rt_y = g_settings.screen_StartY + 10; - rt_h = rt_y + 7 + rt_dy*(g_Radiotext->S_RtOsdRows+1)+OFFSET_SHADOW; - rt_w = rt_x+rt_dx+OFFSET_SHADOW; + rt_y = g_settings.screen_StartY + OFFSET_INNER_MID; + rt_w = BoxEndX - BoxStartX; + rt_h = (g_Radiotext->S_RtOsdRows + 1)*item_h + 4*OFFSET_INNER_SMALL; + int item_x = rt_x + OFFSET_INNER_MID; + int item_y = rt_y + OFFSET_INNER_SMALL + item_h; + int item_w = rt_w - 2*OFFSET_INNER_MID; + + int item = 0; int lines = 0; - for (int i = 0; i < g_Radiotext->S_RtOsdRows; i++) { - if (g_Radiotext->RT_Text[i][0] != '\0') lines++; + for (int i = 0; i < g_Radiotext->S_RtOsdRows; i++) + { + if (g_Radiotext->RT_Text[i][0] != '\0') + lines++; } if (lines == 0) - frameBuffer->paintBackgroundBox(rt_x, rt_y, rt_w, rt_h); + frameBuffer->paintBackgroundBoxRel(rt_x, rt_y, rt_w + OFFSET_SHADOW, rt_h + OFFSET_SHADOW); - if (g_Radiotext->RT_MsgShow) { - - if (g_Radiotext->S_RtOsdTitle == 1) { - - // Title - // sprintf(stext[0], g_Radiotext->RT_PTY == 0 ? "%s - %s %s%s" : "%s - %s (%s)%s", - // g_Radiotext->RT_Titel, tr("Radiotext"), g_Radiotext->RT_PTY == 0 ? g_Radiotext->RDS_PTYN : g_Radiotext->ptynr2string(g_Radiotext->RT_PTY), g_Radiotext->RT_MsgShow ? ":" : tr(" [waiting ...]")); - if ((lines) || (g_Radiotext->RT_PTY !=0)) { + if (g_Radiotext->RT_MsgShow) + { + // Title + if (g_Radiotext->S_RtOsdTitle == 1) + { + if (lines || g_Radiotext->RT_PTY != 0) + { sprintf(stext[0], g_Radiotext->RT_PTY == 0 ? "%s %s%s" : "%s (%s)%s", tr("Radiotext"), g_Radiotext->RT_PTY == 0 ? g_Radiotext->RDS_PTYN : g_Radiotext->ptynr2string(g_Radiotext->RT_PTY), ":"); - - // shadow - frameBuffer->paintBoxRel(rt_x+OFFSET_SHADOW, rt_y+OFFSET_SHADOW, rt_dx, rt_dy, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_TOP); - frameBuffer->paintBoxRel(rt_x, rt_y, rt_dx, rt_dy, COL_INFOBAR_PLUS_0, RADIUS_LARGE, CORNER_TOP); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rt_x+10, rt_y+ 30, rt_dx-20, stext[0], COL_INFOBAR_TEXT, 0, RTisIsUTF); + int title_w = g_Font[rt_font]->getRenderWidth(stext[0]) + 2*OFFSET_INNER_MID; + + g_Font[rt_font]->RenderString(item_x, item_y, title_w, stext[0], COL_INFOBAR_TEXT, 0, RTisUTF8); } -// yoff = 17; - ii = 1; + item = 1; } // Body - if (lines) { - frameBuffer->paintBoxRel(rt_x+OFFSET_SHADOW, rt_y+rt_dy+OFFSET_SHADOW, rt_dx, 7+rt_dy* g_Radiotext->S_RtOsdRows, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM); - frameBuffer->paintBoxRel(rt_x, rt_y+rt_dy, rt_dx, 7+rt_dy* g_Radiotext->S_RtOsdRows, COL_INFOBAR_PLUS_0, RADIUS_LARGE, CORNER_BOTTOM); + if (lines) + { + frameBuffer->paintBoxRel(rt_x + OFFSET_SHADOW, rt_y + 2*OFFSET_INNER_SMALL + item_h + OFFSET_SHADOW, rt_w, item_h*g_Radiotext->S_RtOsdRows + 2*OFFSET_INNER_SMALL, COL_SHADOW_PLUS_0, RADIUS_LARGE, item == 1 ? CORNER_TOP_RIGHT|CORNER_BOTTOM : CORNER_ALL); + frameBuffer->paintBoxRel(rt_x, rt_y + 2*OFFSET_INNER_SMALL + item_h, rt_w, item_h*g_Radiotext->S_RtOsdRows + 2*OFFSET_INNER_SMALL, COL_INFOBAR_PLUS_0, RADIUS_LARGE, item == 1 ? CORNER_TOP_RIGHT|CORNER_BOTTOM : CORNER_ALL); + + item_y += 2*OFFSET_INNER_SMALL; // RT-Text roundloop - int ind = (g_Radiotext->RT_Index == 0) ? g_Radiotext->S_RtOsdRows - 1 : g_Radiotext->RT_Index - 1; - int rts_x = rt_x+10; - int rts_y = rt_y+ 30; - int rts_dx = rt_dx-20; - if (g_Radiotext->S_RtOsdLoop == 1) { // latest bottom - for (int i = ind+1; i < g_Radiotext->S_RtOsdRows; i++) - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisIsUTF); - for (int i = 0; i <= ind; i++) - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisIsUTF); + int index = (g_Radiotext->RT_Index == 0) ? g_Radiotext->S_RtOsdRows - 1 : g_Radiotext->RT_Index - 1; + if (g_Radiotext->S_RtOsdLoop == 1) // latest bottom + { + for (int i = index + 1; i < g_Radiotext->S_RtOsdRows; i++) + g_Font[rt_font]->RenderString(item_x, item_y + (item++)*item_h, item_w, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisUTF8); + for (int i = 0; i <= index; i++) + g_Font[rt_font]->RenderString(item_x, item_y + (item++)*item_h, item_w, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisUTF8); } - else { // latest top - for (int i = ind; i >= 0; i--) - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisIsUTF); - for (int i = g_Radiotext->S_RtOsdRows-1; i > ind; i--) - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisIsUTF); + else // latest top + { + for (int i = index; i >= 0; i--) + g_Font[rt_font]->RenderString(item_x, item_y + (item++)*item_h, item_w, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisUTF8); + for (int i = g_Radiotext->S_RtOsdRows - 1; i > index; i--) + g_Font[rt_font]->RenderString(item_x, item_y + (item++)*item_h, item_w, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisUTF8); } } } } g_Radiotext->RT_MsgShow = false; - } int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data) diff --git a/src/gui/infoviewer.h b/src/gui/infoviewer.h index c8df0a74a..798629a7c 100644 --- a/src/gui/infoviewer.h +++ b/src/gui/infoviewer.h @@ -67,8 +67,6 @@ class CInfoViewer int ButtonWidth; // dimensions of radiotext window - int rt_dx; - int rt_dy; int rt_x; int rt_y; int rt_h; From 500f64008ac90fc76c17fe5d3cd21265a9cf48da Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 27 Nov 2017 23:24:55 +0100 Subject: [PATCH 08/15] usermenu: cleanup from ITEM_RASS Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/fb56689b0b8c013dc02a489f1a16d801c309c492 Author: vanhofen Date: 2017-11-27 (Mon, 27 Nov 2017) Origin message was: ------------------ - usermenu: cleanup from ITEM_RASS Signed-off-by: Thilo Graf --- src/gui/user_menue.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/gui/user_menue.cpp b/src/gui/user_menue.cpp index 65bbca3be..3d0b1b1e8 100644 --- a/src/gui/user_menue.cpp +++ b/src/gui/user_menue.cpp @@ -626,11 +626,6 @@ const char *CUserMenu::getUserMenuButtonName(int button, bool &active, bool retu return_title = true; active = true; continue; -#if 0 - case SNeutrinoSettings::ITEM_RASS: - if (!(CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_radio && g_Radiotext && g_Radiotext->haveRASS())) - continue; -#endif default: if(loc == NONEXISTANT_LOCALE && !text) loc = CUserMenuSetup::getLocale(item); From fad721c02c77ff97b4f395ecaf70e04db996ce86 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 28 Nov 2017 14:41:42 +0100 Subject: [PATCH 09/15] infoviewer_bb: take footer height from CComponentsFooter ... to get this footer in sync with the footers of other gui elements Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/3276b5358ab7ef7061e53bf5d8a3c49c939efc71 Author: vanhofen Date: 2017-11-28 (Tue, 28 Nov 2017) Origin message was: ------------------ - infoviewer_bb: take footer height from CComponentsFooter ... to get this footer in sync with the footers of other gui elements Signed-off-by: Thilo Graf --- src/gui/infoviewer_bb.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 5e95ba823..9816157b5 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -109,7 +109,10 @@ void CInfoViewerBB::Init() bbButtonInfo[i].x = -1; } - InfoHeightY_Info = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight() + 5; + // not really a CComponentsFooter but let's take its height + CComponentsFooter footer; + InfoHeightY_Info = footer.getHeight(); + initBBOffset(); changePB(); From 07bcc0705a93dca931b2e33a9968b5089912826d Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 29 Nov 2017 10:47:34 +0100 Subject: [PATCH 10/15] infoviewer_bb: fix offset for first status-icon Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/04eeb5d65b452f9d45e0f181e8c25ffb4c1d8d0d Author: vanhofen Date: 2017-11-29 (Wed, 29 Nov 2017) Origin message was: ------------------ - infoviewer_bb: fix offset for first status-icon Signed-off-by: Thilo Graf --- src/gui/infoviewer_bb.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 9816157b5..b7027f9ba 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -153,6 +153,7 @@ void CInfoViewerBB::getBBIconInfo() BBarFontY = BBarY + InfoHeightY_Info - (InfoHeightY_Info - g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight()) / 2; /* center in buttonbar */ bbIconMinX = g_InfoViewer->BoxEndX - OFFSET_INNER_MID; bool isRadioMode = (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_radio || CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webradio); + bool firstIcon = true; for (int i = 0; i < CInfoViewerBB::ICON_MAX; i++) { int w = 0, h = 0; @@ -194,8 +195,10 @@ void CInfoViewerBB::getBBIconInfo() break; } if (iconView) { - if (i > 0) - bbIconMinX -= OFFSET_INNER_MIN; + if (firstIcon) + firstIcon = false; + else + bbIconMinX -= OFFSET_INNER_SMALL; bbIconMinX -= w; bbIconInfo[i].x = bbIconMinX; bbIconInfo[i].h = h; From 462457cba5b2945315269960049ff66036f08144 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 30 Nov 2017 10:55:14 +0100 Subject: [PATCH 11/15] infoviewer: cleanup from some unused code Conflicts: src/gui/infoviewer.cpp Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/38e76f6a3f8a38c65f6f5d747fe835a290c362f0 Author: vanhofen Date: 2017-11-30 (Thu, 30 Nov 2017) Origin message was: ------------------ - infoviewer: cleanup from some unused code Conflicts: src/gui/infoviewer.cpp Signed-off-by: Thilo Graf --- src/gui/infoviewer.cpp | 174 ++--------------------------------------- src/gui/infoviewer.h | 10 --- 2 files changed, 5 insertions(+), 179 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index ed5615982..84842055d 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -386,27 +386,7 @@ void CInfoViewer::showRecordIcon (const bool show) void CInfoViewer::paintBackground(int col_NumBox) { int c_rad_mid = RADIUS_MID; -#if 0 // kill left side - int BoxEndInfoY = BoxEndY; - if (showButtonBar) // add button bar and blinkenlights - BoxEndInfoY += infoViewerBB->InfoHeightY_Info + infoViewerBB->bottom_bar_offset; - frameBuffer->paintBackgroundBox(BoxStartX, - BoxStartY + ChanHeight - 6, - BoxStartX + ChanWidth / 3, - BoxEndInfoY + OFFSET_SHADOW); - // kill progressbar + info-line - frameBuffer->paintBackgroundBox(BoxStartX + ChanWidth + 40, // 40 for the recording icon! - BoxStartY, BoxEndX, BoxStartY + ChanHeight); - - // shadow for channel name, epg data... - frameBuffer->paintBox(BoxEndX - c_shadow_width, ChanNameY + OFFSET_SHADOW, - BoxEndX + OFFSET_SHADOW, BoxEndInfoY + OFFSET_SHADOW, - COL_SHADOW_PLUS_0, c_rad_large, CORNER_RIGHT); - frameBuffer->paintBox(ChanInfoX + OFFSET_SHADOW, BoxEndInfoY - c_shadow_width, - BoxEndX - c_shadow_width, BoxEndInfoY + OFFSET_SHADOW, - COL_SHADOW_PLUS_0, c_rad_large, CORNER_BOTTOM_LEFT); -#endif // background for channel name/logo and clock paintHead(); @@ -1143,10 +1123,6 @@ void CInfoViewer::loop(bool show_dot) hideIt = true; int rec_mode = CRecordManager::getInstance()->GetRecordMode(); -#if 0 - if ((rec_mode == CRecordManager::RECMODE_REC) || (rec_mode == CRecordManager::RECMODE_REC_TSHIFT)) - hideIt = true; -#endif /* hide, if record (not timeshift only) is running -> neutrino will show channel list */ if (rec_mode & CRecordManager::RECMODE_REC) hideIt = true; @@ -1188,23 +1164,6 @@ void CInfoViewer::loop(bool show_dot) else res = CNeutrinoApp::getInstance()->handleMsg(msg, data); } -#if 0 - else if (CMoviePlayerGui::getInstance().start_timeshift && (msg == NeutrinoMessages::EVT_TIMER)) { - CMoviePlayerGui::getInstance().start_timeshift = false; - } -#endif -#if 0 - else if (CMoviePlayerGui::getInstance().timeshift && ((msg == (neutrino_msg_t) g_settings.mpkey_rewind) || \ - (msg == (neutrino_msg_t) g_settings.mpkey_forward) || \ - (msg == (neutrino_msg_t) g_settings.mpkey_pause) || \ - (msg == (neutrino_msg_t) g_settings.mpkey_stop) || \ - (msg == (neutrino_msg_t) g_settings.mpkey_play) || \ - (msg == (neutrino_msg_t) g_settings.mpkey_time) || \ - (msg == (neutrino_msg_t) g_settings.key_timeshift))) { - g_RCInput->postMsg (msg, data); - res = messages_return::cancel_info; - } -#endif } if (hideIt) { @@ -1918,26 +1877,7 @@ void CInfoViewer::show_Data (bool calledFromEvent) } else last_next_id = 0; -// int ChanInfoY = BoxStartY + ChanHeight + 15; //+10 - if (showButtonBar) { -#if 0 - int posy = BoxStartY + 16; - int height2 = 20; - //percent - if (info_CurrentNext.flags & CSectionsdClient::epgflags::has_current) { -//printf("CInfoViewer::show_Data: ************************************************* runningPercent %d\n", runningPercent); - if (!calledFromEvent || (oldrunningPercent != runningPercent)) { - frameBuffer->paintBoxRel(BoxEndX - 104, posy + 6, 108, 14, COL_SHADOW_PLUS_0, 1); - frameBuffer->paintBoxRel(BoxEndX - 108, posy + 2, 108, 14, COL_INFOBAR_PLUS_0, 1); - oldrunningPercent = runningPercent; - } - timescale->paint(BoxEndX - 102, posy + 2, runningPercent); - } else { - oldrunningPercent = 255; - frameBuffer->paintBackgroundBoxRel (BoxEndX - 108, posy, 112, height2); - } -#endif infoViewerBB->showBBButtons(calledFromEvent); } @@ -1995,73 +1935,6 @@ void CInfoViewer::show_Data (bool calledFromEvent) } display_Info(current, next, true, runningPercent, curr_time, curr_rest, next_time, next_dur, curr_upd, next_upd); - -#if 0 - int height = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight (); - int xStart = BoxStartX + ChanWidth; - - //frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0); - - if ((info_CurrentNext.flags & CSectionsdClient::epgflags::not_broadcast) || ((calledFromEvent) && !(info_CurrentNext.flags & (CSectionsdClient::epgflags::has_next | CSectionsdClient::epgflags::has_current)))) { - // no EPG available - ChanInfoY += height; - frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (BoxStartX + ChanWidth + 20, ChanInfoY + height, BoxEndX - (BoxStartX + ChanWidth + 20), g_Locale->getText (timeset ? LOCALE_INFOVIEWER_NOEPG : LOCALE_INFOVIEWER_WAITTIME), COL_INFOBAR_TEXT); - } else { - // irgendein EPG gefunden - int duration1Width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getRenderWidth (runningRest); - int duration1TextPos = BoxEndX - duration1Width - LEFT_OFFSET; - - int duration2Width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getRenderWidth (nextDuration); - int duration2TextPos = BoxEndX - duration2Width - LEFT_OFFSET; - - if ((info_CurrentNext.flags & CSectionsdClient::epgflags::has_next) && (!(info_CurrentNext.flags & CSectionsdClient::epgflags::has_current))) { - // there are later events available - yet no current - frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, BoxEndX - xStart, g_Locale->getText (LOCALE_INFOVIEWER_NOCURRENT), COL_INFOBAR_TEXT); - - ChanInfoY += height; - - //info next - //frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0); - - if (last_next_id != info_CurrentNext.next_uniqueKey) { - frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (ChanInfoX + 10, ChanInfoY + height, 100, nextStart, COL_INFOBAR_TEXT); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, duration2TextPos - xStart - 5, info_CurrentNext.next_name, COL_INFOBAR_TEXT); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (duration2TextPos, ChanInfoY + height, duration2Width, nextDuration, COL_INFOBAR_TEXT); - last_next_id = info_CurrentNext.next_uniqueKey; - } - } else { - if (last_curr_id != info_CurrentNext.current_uniqueKey) { - frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (ChanInfoX + 10, ChanInfoY + height, 100, runningStart, COL_INFOBAR_TEXT); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, duration1TextPos - xStart - 5, info_CurrentNext.current_name, COL_INFOBAR_TEXT); - - last_curr_id = info_CurrentNext.current_uniqueKey; - } - frameBuffer->paintBox (BoxEndX - 80, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0);//FIXME duration1TextPos not really good - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (duration1TextPos, ChanInfoY + height, duration1Width, runningRest, COL_INFOBAR_TEXT); - - ChanInfoY += height; - - //info next - //frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0); - - if ((!is_nvod) && (info_CurrentNext.flags & CSectionsdClient::epgflags::has_next)) { - if (last_next_id != info_CurrentNext.next_uniqueKey) { - frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (ChanInfoX + 10, ChanInfoY + height, 100, nextStart, COL_INFOBAR_TEXT); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, duration2TextPos - xStart - 5, info_CurrentNext.next_name, COL_INFOBAR_TEXT); - g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (duration2TextPos, ChanInfoY + height, duration2Width, nextDuration, COL_INFOBAR_TEXT); - last_next_id = info_CurrentNext.next_uniqueKey; - } - } //else - //frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0);//why this... - } - } -} -#endif } void CInfoViewer::killInfobarText() @@ -2140,11 +2013,6 @@ void CInfoViewer::killTitle() { is_visible = false; infoViewerBB->is_visible = false; -#if 0 //unused - int bottom = BoxEndY + OFFSET_SHADOW + infoViewerBB->bottom_bar_offset; - if (showButtonBar) - bottom += infoViewerBB->InfoHeightY_Info; -#endif if (infoViewerBB->getFooter()) infoViewerBB->getFooter()->kill(); if (infoViewerBB->getCABar()) @@ -2159,19 +2027,21 @@ void CInfoViewer::killTitle() numbox->kill(); } -#if 0 //not really required to kill sigbox, numbox does this +#if 0 + //not really required to kill sigbox, numbox does this if (sigbox) sigbox->kill(); #endif + header->kill(); -#if 1 //not really required to kill clock, header does this <--- really ???? + if (clock) { clock->kill(); delete clock; clock = NULL; } -#endif + body->kill(); if (txt_cur_event) @@ -2354,11 +2224,6 @@ void CInfoViewer::showLcdPercentOver () } int runningPercent = -1; time_t jetzt = time (NULL); -#if 0 - if (!(info_CurrentNext.flags & CSectionsdClient::epgflags::has_current) || jetzt > (int) (info_CurrentNext.current_zeit.startzeit + info_CurrentNext.current_zeit.dauer)) { - info_CurrentNext = getEPG (current_channel_id); - } -#endif if (info_CurrentNext.flags & CSectionsdClient::epgflags::has_current) { if (jetzt < info_CurrentNext.current_zeit.startzeit) runningPercent = 0; @@ -2379,14 +2244,6 @@ void CInfoViewer::showEpgInfo() //message on event change eventname = info_CurrentNext.current_name; if (g_settings.infobar_show) g_RCInput->postMsg(NeutrinoMessages::SHOW_INFOBAR , 0); -#if 0 - /* let's check if this is still needed */ - else - /* don't show anything, but update the LCD - TODO: we should not have to update the LCD from the _infoviewer_. - they have nothing to do with each other */ - showLcdPercentOver(); -#endif } } @@ -2397,27 +2254,6 @@ void CInfoViewer::setUpdateTimer(uint64_t interval) lcdUpdateTimer = g_RCInput->addTimer(interval, false); } -#if 0 -int CInfoViewerHandler::exec (CMenuTarget * parent, const std::string & /*actionkey*/) -{ - int res = menu_return::RETURN_EXIT_ALL; - CChannelList *channelList; - CInfoViewer *i; - - if (parent) { - parent->hide (); - } - - i = new CInfoViewer; - - channelList = CNeutrinoApp::getInstance ()->channelList; - i->start (); - i->showTitle (channelList->getActiveChannelNumber (), channelList->getActiveChannelName (), channelList->getActiveSatellitePosition (), channelList->getActiveChannel_ChannelID ()); // UTF-8 - delete i; - - return res; -} -#endif void CInfoViewer::ResetModules() { diff --git a/src/gui/infoviewer.h b/src/gui/infoviewer.h index 798629a7c..b1c44a49d 100644 --- a/src/gui/infoviewer.h +++ b/src/gui/infoviewer.h @@ -85,7 +85,6 @@ class CInfoViewer t_channel_id current_channel_id; t_channel_id current_epg_id; - //uint32_t fadeTimer; COSDFader fader; int time_width; @@ -213,13 +212,4 @@ class CInfoViewer inline t_channel_id get_current_channel_id(void) { return current_channel_id; } void ResetModules(); }; -#if 0 -class CInfoViewerHandler : public CMenuTarget -{ - public: - int exec( CMenuTarget* parent, const std::string &actionkey); - int doMenu(); - -}; -#endif #endif From 78c2e935733f2f4d318c4f9c3d480128336ece66 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 30 Nov 2017 10:55:14 +0100 Subject: [PATCH 12/15] infoviewer: avoid display of radiotext icon in virtual zap mode Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/aca5157707e67818b3b3b4965fd2724c5ecbf61f Author: vanhofen Date: 2017-11-30 (Thu, 30 Nov 2017) Origin message was: ------------------ - infoviewer: avoid display of radiotext icon in virtual zap mode Signed-off-by: Thilo Graf --- src/gui/infoviewer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 84842055d..9d2bb9642 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -884,7 +884,7 @@ void CInfoViewer::showTitle(CZapitChannel * channel, const bool calledFromNumZap { if ((g_settings.radiotext_enable) && (!recordModeActive) && (!calledFromNumZap)) showRadiotext(); - else + else if (showButtonBar) infoViewerBB->showIcon_RadioText(false); } @@ -1319,7 +1319,8 @@ void CInfoViewer::showRadiotext() if (g_Radiotext == NULL) return; - infoViewerBB->showIcon_RadioText(g_Radiotext->haveRadiotext()); + if (showButtonBar) + infoViewerBB->showIcon_RadioText(g_Radiotext->haveRadiotext()); char stext[3][100]; bool RTisUTF8 = false; From fa216ecf1694570c93d247f0f1b331df787f8d99 Mon Sep 17 00:00:00 2001 From: max_10 Date: Thu, 30 Nov 2017 12:38:40 +0100 Subject: [PATCH 13/15] ffmpegdec: fix audio playback for ARM_HARDWARE Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/a179a38fd942461cb77a0ceee06022a3af074b9f Author: max_10 Date: 2017-11-30 (Thu, 30 Nov 2017) Origin message was: ------------------ - ffmpegdec: fix audio playback for ARM_HARDWARE --- src/driver/audiodec/ffmpegdec.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/driver/audiodec/ffmpegdec.cpp b/src/driver/audiodec/ffmpegdec.cpp index 02ccdb412..bd3ac8869 100644 --- a/src/driver/audiodec/ffmpegdec.cpp +++ b/src/driver/audiodec/ffmpegdec.cpp @@ -257,7 +257,12 @@ CBaseDec::RetCode CFfmpegDec::Decoder(FILE *_in, int /*OutputFd*/, State* state, mSampleRate = samplerate; mChannels = av_get_channel_layout_nb_channels(AV_CH_LAYOUT_STEREO); + +#if !HAVE_ARM_HARDWARE audioDecoder->PrepareClipPlay(mChannels, mSampleRate, 16, 1); +#else + audioDecoder->PrepareClipPlay(mChannels, mSampleRate, 16, 0); +#endif AVFrame *frame = NULL; AVPacket rpacket; From c878fac57846fda704f155f7386ad7166a994603 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 30 Nov 2017 12:38:40 +0100 Subject: [PATCH 14/15] Revert "- media-menu: disable currently broken audioplayer for ARM_HARDWARE" This reverts commit 38a431fcdabc264bc08e133b45630efb2ec6052d because it's fixed in 334ce41 Signed-off-by: Thilo Graf Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/090120f704dd4f8c569211ca3453e6bbd823d0f2 Author: vanhofen Date: 2017-11-30 (Thu, 30 Nov 2017) --- src/gui/mediaplayer.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gui/mediaplayer.cpp b/src/gui/mediaplayer.cpp index 548b1a1a3..49252e8df 100644 --- a/src/gui/mediaplayer.cpp +++ b/src/gui/mediaplayer.cpp @@ -139,7 +139,6 @@ int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p) bool enabled = !CMoviePlayerGui::getInstance().Playing(); -#if !HAVE_ARM_HARDWARE //audio player CMenuForwarder *fw_audio = new CMenuForwarder(LOCALE_MAINMENU_AUDIOPLAYER, enabled, NULL, this, "audioplayer", CRCInput::RC_red); fw_audio->setHint(NEUTRINO_ICON_HINT_APLAY, LOCALE_MENU_HINT_APLAY); @@ -149,7 +148,6 @@ int CMediaPlayerMenu::initMenuMedia(CMenuWidget *m, CPersonalizeGui *p) CMenuForwarder *fw_inet = new CMenuForwarder(LOCALE_INETRADIO_NAME, enabled, NULL, this, "inetplayer", CRCInput::RC_green); fw_inet->setHint(NEUTRINO_ICON_HINT_INET_RADIO, LOCALE_MENU_HINT_INET_RADIO); personalize->addItem(multimedia_menu, fw_inet, &g_settings.personalize[SNeutrinoSettings::P_MEDIA_INETPLAY]); -#endif //init movieplayer submenu CMenuWidget *movieplayer_menu = new CMenuWidget(LOCALE_MAINMENU_MOVIEPLAYER, NEUTRINO_ICON_MULTIMEDIA, width, MN_WIDGET_ID_MEDIA_MOVIEPLAYER); From 7f3527e34953b2f922baffe0129d11e54a0fa7ac Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 1 Dec 2017 23:26:44 +0100 Subject: [PATCH 15/15] infoviewer_bb: use OFFSET defines; ... height of ca-bar now depends on height of ca-icons cleanup from commented code Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/77db4a63e361726bc84259882b976faad19e5980 Author: vanhofen Date: 2017-12-01 (Fri, 01 Dec 2017) Origin message was: ------------------ - infoviewer_bb: use OFFSET defines; ... height of ca-bar now depends on height of ca-icons cleanup from commented code --- src/gui/infoviewer_bb.cpp | 90 +++++++++++++++------------------------ src/gui/infoviewer_bb.h | 1 + 2 files changed, 35 insertions(+), 56 deletions(-) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index b7027f9ba..cc52f1f95 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -113,6 +113,7 @@ void CInfoViewerBB::Init() CComponentsFooter footer; InfoHeightY_Info = footer.getHeight(); + ca_h = 0; initBBOffset(); changePB(); @@ -295,8 +296,8 @@ void CInfoViewerBB::getBBButtonInfo() if (text == g_Locale->getText(LOCALE_MPKEY_AUDIO) && !g_settings.infobar_buttons_usertitle) text = CMoviePlayerGui::getInstance(false).CurrentAudioName(); // use instance_mp } - bbButtonInfo[i].w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getRenderWidth(text) + w + 10; - bbButtonInfo[i].cx = w + 5; + bbButtonInfo[i].w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getRenderWidth(text) + w + OFFSET_INNER_MID; + bbButtonInfo[i].cx = w + OFFSET_INNER_SMALL; bbButtonInfo[i].h = h; bbButtonInfo[i].text = text; bbButtonInfo[i].icon = icon; @@ -306,21 +307,12 @@ void CInfoViewerBB::getBBButtonInfo() } // Calculate position/size of buttons minX = std::min(bbIconMinX, g_InfoViewer->ChanInfoX + (((g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX) * 75) / 100)); - int MaxBr = minX - (g_InfoViewer->ChanInfoX + 10); - bbButtonMaxX = g_InfoViewer->ChanInfoX + 10; + int MaxBr = minX - (g_InfoViewer->ChanInfoX + OFFSET_INNER_MID); + bbButtonMaxX = g_InfoViewer->ChanInfoX + OFFSET_INNER_MID; int br = 0, count = 0; for (int i = 0; i < CInfoViewerBB::BUTTON_MAX; i++) { -#if 0 - if ((i == CInfoViewerBB::BUTTON_YELLOW) && (g_RemoteControl->subChannels.empty())) { // no subchannels - bbButtonInfo[i].paint = false; -// bbButtonInfo[i].x = -1; -// continue; - } - else -#else if (!bbButtonInfo[i].active) bbButtonInfo[i].paint = false; -#endif else { count++; @@ -333,35 +325,7 @@ void CInfoViewerBB::getBBButtonInfo() } if (br > MaxBr) printf("[infoviewer_bb:%s#%d] width br (%d) > MaxBr (%d) count %d\n", __func__, __LINE__, br, MaxBr, count); -#if 0 - int Btns = 0; - // counting buttons - for (int i = 0; i < CInfoViewerBB::BUTTON_MAX; i++) { - if (bbButtonInfo[i].x != -1) { - Btns++; - } - } - bbButtonMaxX = g_InfoViewer->ChanInfoX + 10; - - bbButtonInfo[CInfoViewerBB::BUTTON_RED].x = bbButtonMaxX; - bbButtonInfo[CInfoViewerBB::BUTTON_BLUE].x = minX - bbButtonInfo[CInfoViewerBB::BUTTON_BLUE].w; - - int x1 = bbButtonInfo[CInfoViewerBB::BUTTON_RED].x + bbButtonInfo[CInfoViewerBB::BUTTON_RED].w; - int rest = bbButtonInfo[CInfoViewerBB::BUTTON_BLUE].x - x1; - - if (Btns < 4) { - rest -= bbButtonInfo[CInfoViewerBB::BUTTON_GREEN].w; - bbButtonInfo[CInfoViewerBB::BUTTON_GREEN].x = x1 + rest / 2; - } - else { - rest -= bbButtonInfo[CInfoViewerBB::BUTTON_GREEN].w + bbButtonInfo[CInfoViewerBB::BUTTON_YELLOW].w; - rest = rest / 3; - bbButtonInfo[CInfoViewerBB::BUTTON_GREEN].x = x1 + rest; - bbButtonInfo[CInfoViewerBB::BUTTON_YELLOW].x = bbButtonInfo[CInfoViewerBB::BUTTON_GREEN].x + - bbButtonInfo[CInfoViewerBB::BUTTON_GREEN].w + rest; - } -#endif - bbButtonMaxX = g_InfoViewer->ChanInfoX + 10; + bbButtonMaxX = g_InfoViewer->ChanInfoX + OFFSET_INNER_MID; int step = MaxBr / 4; if (count > 0) { /* avoid div-by-zero :-) */ step = MaxBr / count; @@ -407,7 +371,7 @@ void CInfoViewerBB::showBBButtons(bool paintFooter) if (paint) { fb_pixel_t *pixbuf = NULL; - int buf_x = bbIconMinX - 5; + int buf_x = bbIconMinX - OFFSET_INNER_SMALL; int buf_y = BBarY; int buf_w = g_InfoViewer->BoxEndX-buf_x; int buf_h = InfoHeightY_Info; @@ -601,7 +565,7 @@ void CInfoViewerBB::showIcon_Resolution() switch (yres) { case 2160: icon_name = NEUTRINO_ICON_RESOLUTION_2160; - break; + break; case 1920: icon_name = NEUTRINO_ICON_RESOLUTION_1920; break; @@ -725,7 +689,7 @@ void CInfoViewerBB::showBarSys(int percent) if (is_visible){ sysscale->reset(); sysscale->doPaintBg(false); - sysscale->setDimensionsAll(bbIconMinX, BBarY + InfoHeightY_Info / 2 - 2 - 6, hddwidth, 6); + sysscale->setDimensionsAll(bbIconMinX, BBarY + InfoHeightY_Info/2 - OFFSET_INNER_MIN - InfoHeightY_Info/4, hddwidth, InfoHeightY_Info/4); sysscale->setValues(percent, 100); sysscale->paint(); } @@ -737,11 +701,11 @@ void CInfoViewerBB::showBarHdd(int percent) hddscale->reset(); hddscale->doPaintBg(false); if (percent >= 0){ - hddscale->setDimensionsAll(bbIconMinX, BBarY + InfoHeightY_Info / 2 + 2 + 0, hddwidth, 6); + hddscale->setDimensionsAll(bbIconMinX, BBarY + InfoHeightY_Info/2 + OFFSET_INNER_MIN, hddwidth, InfoHeightY_Info/4); hddscale->setValues(percent, 100); hddscale->paint(); }else { - frameBuffer->paintBoxRel(bbIconMinX, BBarY + InfoHeightY_Info / 2 + 2 + 0, hddwidth, 6, COL_INFOBAR_BUTTONS_BACKGROUND); + frameBuffer->paintBoxRel(bbIconMinX, BBarY + InfoHeightY_Info/2 + OFFSET_INNER_MIN, hddwidth, InfoHeightY_Info/4, COL_INFOBAR_BUTTONS_BACKGROUND); } } } @@ -749,11 +713,11 @@ void CInfoViewerBB::showBarHdd(int percent) void CInfoViewerBB::paint_ca_icons(int caid, const char *icon, int &icon_space_offset) { char buf[20]; - int endx = g_InfoViewer->BoxEndX - (g_settings.infobar_casystem_frame ? 20 : 10); - int py = g_InfoViewer->BoxEndY + (g_settings.infobar_casystem_frame ? 4 : 2); /* hand-crafted, should be automatic */ + int endx = g_InfoViewer->BoxEndX - OFFSET_INNER_MID - (g_settings.infobar_casystem_frame ? FRAME_WIDTH_MIN + OFFSET_INNER_SMALL : 0); + int py = g_InfoViewer->BoxEndY + OFFSET_INNER_SMALL; int px = 0; static std::map > icon_map; - const int icon_space = 10, icon_number = 10; + const int icon_space = OFFSET_INNER_SMALL, icon_number = 10; static int icon_offset[icon_number] = {0,0,0,0,0,0,0,0,0,0}; static int icon_sizeW [icon_number] = {0,0,0,0,0,0,0,0,0,0}; @@ -801,7 +765,7 @@ void CInfoViewerBB::paint_ca_icons(int caid, const char *icon, int &icon_space_o if (px) { snprintf(buf, sizeof(buf), "%s_%s", icon_map[caid].second, icon); - if ((px >= (endx-8)) || (px <= 0)) + if ((px >= (endx-OFFSET_INNER_MID)) || (px <= 0)) printf("#####[%s:%d] Error paint icon %s, px: %d, py: %d, endx: %d, icon_offset: %d\n", __FUNCTION__, __LINE__, buf, px, py, endx, icon_offset[icon_map[caid].first]); else @@ -870,12 +834,14 @@ void CInfoViewerBB::showIcon_CA_Status(int notfirst) void CInfoViewerBB::paint_ca_bar() { initBBOffset(); - int ca_width = g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX; + int ca_x = g_InfoViewer->ChanInfoX + OFFSET_INNER_MID; + int ca_y = g_InfoViewer->BoxEndY; + int ca_w = g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX - 2*OFFSET_INNER_MID; if (g_settings.infobar_casystem_frame) { if (ca_bar == NULL) - ca_bar = new CComponentsShapeSquare(g_InfoViewer->ChanInfoX + OFFSET_INNER_MID, g_InfoViewer->BoxEndY, ca_width - 2*OFFSET_INNER_MID, bottom_bar_offset - OFFSET_INNER_MID, NULL, CC_SHADOW_ON, COL_INFOBAR_CASYSTEM_PLUS_2, COL_INFOBAR_CASYSTEM_PLUS_0); + ca_bar = new CComponentsShapeSquare(ca_x, ca_y, ca_w, ca_h, NULL, CC_SHADOW_ON, COL_INFOBAR_CASYSTEM_PLUS_2, COL_INFOBAR_CASYSTEM_PLUS_0); ca_bar->enableShadow(CC_SHADOW_ON, OFFSET_SHADOW/2, true); ca_bar->setFrameThickness(FRAME_WIDTH_MIN); ca_bar->setCorner(RADIUS_SMALL, CORNER_ALL); @@ -883,7 +849,7 @@ void CInfoViewerBB::paint_ca_bar() } else { - paintBoxRel(g_InfoViewer->ChanInfoX, g_InfoViewer->BoxEndY, ca_width , bottom_bar_offset, COL_INFOBAR_CASYSTEM_PLUS_0); + paintBoxRel(g_InfoViewer->ChanInfoX, g_InfoViewer->BoxEndY, g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX, bottom_bar_offset, COL_INFOBAR_CASYSTEM_PLUS_0); } #if 1 if (g_settings.infobar_casystem_dotmatrix) @@ -904,7 +870,8 @@ void CInfoViewerBB::paint_ca_bar() void CInfoViewerBB::changePB() { - hddwidth = frameBuffer->getScreenWidth(true) * ((g_settings.screen_preset == 1) ? 10 : 8) / 128; /* 80(CRT)/100(LCD) pix if screen is 1280 wide */ + hddwidth = frameBuffer->getScreenWidth(true) / 100 * 10; // 10 percent of screen width + if (!hddscale) { hddscale = new CProgressBar(); hddscale->setType(CProgressBar::PB_REDRIGHT); @@ -941,7 +908,18 @@ void CInfoViewerBB::ResetModules() void CInfoViewerBB::initBBOffset() { - bottom_bar_offset = (g_settings.infobar_casystem_display < 2) ? (g_settings.infobar_casystem_frame ? 36 : 22) : 0; + int icon_w = 0, icon_h = 0; + frameBuffer->getIconSize("nagra_white", &icon_w, &icon_h); // take any ca icon to get its height + ca_h = icon_h + 2*OFFSET_INNER_SMALL; + + bottom_bar_offset = 0; + if (g_settings.infobar_casystem_display < 2) + { + if (g_settings.infobar_casystem_frame) + bottom_bar_offset = ca_h + OFFSET_SHADOW/2 + OFFSET_INNER_SMALL; + else + bottom_bar_offset = ca_h; + } } void* CInfoViewerBB::scrambledThread(void *arg) diff --git a/src/gui/infoviewer_bb.h b/src/gui/infoviewer_bb.h index 765ddc20a..4f1f2bad6 100644 --- a/src/gui/infoviewer_bb.h +++ b/src/gui/infoviewer_bb.h @@ -106,6 +106,7 @@ class CInfoViewerBB CProgressBar *hddscale, *sysscale; CComponentsShapeSquare *foot, *ca_bar; + int ca_h; void paintFoot(int w = 0); void showBBIcons(const int modus, const std::string & icon); void getBBIconInfo(void);