From 169ef8d585087b52e3d28329ec98c77695713b5d Mon Sep 17 00:00:00 2001 From: BPanther Date: Wed, 26 Jul 2023 20:46:25 +0200 Subject: [PATCH] new option added for eof retries on lost server connections Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/b11a1de3f33620ce9eb103df3278903efb6b107d Author: BPanther Date: 2023-07-26 (Wed, 26 Jul 2023) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 1 + data/locale/english.locale | 1 + src/gui/mediaplayer_setup.cpp | 6 ++++++ src/gui/movieplayer.cpp | 8 ++++---- src/neutrino.cpp | 2 ++ src/system/locals.h | 1 + src/system/locals_intern.h | 1 + src/system/settings.h | 1 + 8 files changed, 17 insertions(+), 4 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index ff80fbdc7..925ac0aea 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -2291,6 +2291,7 @@ movieplayer.bookmarkname_hint1 Neues Lesezeichen movieplayer.bookmarkname_hint2 Geben Sie den Namen für das neue Lesezeichen ein movieplayer.chapters Kapitel movieplayer.display_playtime Zeige Spielzeit im VFD/LCD +movieplayer.eof_cnt EOF-Wiederholungen nach Serverabbruch (WebTV/WebRadio) movieplayer.fileplayback_audio Multiformat-Audiowiedergabe movieplayer.fileplayback_video Multiformat-Videowiedergabe movieplayer.head Movieplayer diff --git a/data/locale/english.locale b/data/locale/english.locale index df9aea6e8..8384380ca 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -2291,6 +2291,7 @@ movieplayer.bookmarkname_hint1 New bookmark movieplayer.bookmarkname_hint2 Enter a name for your new bookmark movieplayer.chapters Chapters movieplayer.display_playtime Show playtime in VFD +movieplayer.eof_cnt EOF repetitions after lost server connection (WebTV/WebRadio) movieplayer.fileplayback_audio Multiformat audio playback movieplayer.fileplayback_video Multiformat video playback movieplayer.head Movieplayer diff --git a/src/gui/mediaplayer_setup.cpp b/src/gui/mediaplayer_setup.cpp index 90ee87139..70e30539b 100644 --- a/src/gui/mediaplayer_setup.cpp +++ b/src/gui/mediaplayer_setup.cpp @@ -133,6 +133,12 @@ int CMediaPlayerSetup::showMediaPlayerSetup() mc->setHint("", LOCALE_MENU_HINT_MOVIEPLAYER_TIMEOSD_WHILE_SEARCHING); mediaSetup->addItem(mc); + mediaSetup->addItem(GenericMenuSeparator); + + CMenuOptionNumberChooser *ef = new CMenuOptionNumberChooser(LOCALE_MOVIEPLAYER_EOF_CNT, &g_settings.movieplayer_eof_cnt, true, 1, 10, NULL); +// ef->setHint("", LOCALE_MENU_HINT_MOVIEPLAYER_EOF_CNT); + mediaSetup->addItem(ef); + int res = mediaSetup->exec(NULL, ""); selected = mediaSetup->getSelected(); delete mediaSetup; diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index e194dff9f..d150093fe 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1001,10 +1001,7 @@ void* CMoviePlayerGui::bgPlayThread(void *arg) mutex.unlock(); int eof = 0, pos = 0; - int eof_max = mp->isWebChannel ? 1 : 5; -#if defined (BOXMODEL_VUPLUS_ARM) - eof_max = 0; -#endif + int eof_max = mp->isWebChannel ? g_settings.movieplayer_eof_cnt : 5; while(webtv_started) { if (mp->playback->GetPosition(mp->position, mp->duration, mp->isWebChannel)) { @@ -1012,7 +1009,10 @@ void* CMoviePlayerGui::bgPlayThread(void *arg) printf("CMoviePlayerGui::bgPlayThread: position %d duration %d (%d)\n", mp->position, mp->duration, mp->duration-mp->position); #endif if (pos == mp->position && mp->duration > 0) + { eof++; + printf("CMoviePlayerGui::bgPlayThread: eof counter: %d\n", eof); + } else eof = 0; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index b31dffe34..808760603 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -1210,6 +1210,7 @@ int CNeutrinoApp::loadSetup(const char *fname) // movieplayer g_settings.movieplayer_bisection_jump = configfile.getInt32("movieplayer_bisection_jump", 5); g_settings.movieplayer_display_playtime = configfile.getInt32("movieplayer_display_playtime", g_info.hw_caps->display_type == HW_DISPLAY_LED_NUM); + g_settings.movieplayer_eof_cnt = configfile.getInt32("movieplayer_eof_cnt", 1); g_settings.movieplayer_repeat_on = configfile.getInt32("movieplayer_repeat_on", CMoviePlayerGui::REPEAT_OFF); #if HAVE_CST_HARDWARE g_settings.movieplayer_select_ac3_atype0 = configfile.getBool("movieplayer_select_ac3_atype0", false); @@ -2098,6 +2099,7 @@ void CNeutrinoApp::saveSetup(const char *fname) // movieplayer configfile.setInt32("movieplayer_bisection_jump", g_settings.movieplayer_bisection_jump); configfile.setInt32("movieplayer_display_playtime", g_settings.movieplayer_display_playtime); + configfile.setInt32("movieplayer_eof_cnt", g_settings.movieplayer_eof_cnt); configfile.setInt32("movieplayer_repeat_on", g_settings.movieplayer_repeat_on); #if HAVE_CST_HARDWARE configfile.setBool("movieplayer_select_ac3_atype0", g_settings.movieplayer_select_ac3_atype0); diff --git a/src/system/locals.h b/src/system/locals.h index 8b2e3b584..106795e1c 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -2318,6 +2318,7 @@ typedef enum LOCALE_MOVIEPLAYER_BOOKMARKNAME_HINT2, LOCALE_MOVIEPLAYER_CHAPTERS, LOCALE_MOVIEPLAYER_DISPLAY_PLAYTIME, + LOCALE_MOVIEPLAYER_EOF_CNT, LOCALE_MOVIEPLAYER_FILEPLAYBACK_AUDIO, LOCALE_MOVIEPLAYER_FILEPLAYBACK_VIDEO, LOCALE_MOVIEPLAYER_HEAD, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index b3ff6545f..a04f727b7 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -2318,6 +2318,7 @@ const char * locale_real_names[] = "movieplayer.bookmarkname_hint2", "movieplayer.chapters", "movieplayer.display_playtime", + "movieplayer.eof_cnt", "movieplayer.fileplayback_audio", "movieplayer.fileplayback_video", "movieplayer.head", diff --git a/src/system/settings.h b/src/system/settings.h index 62a8385a5..a9694b737 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -1013,6 +1013,7 @@ struct SNeutrinoSettings // movieplayer int movieplayer_bisection_jump; int movieplayer_display_playtime; + int movieplayer_eof_cnt; int movieplayer_repeat_on; #if HAVE_CST_HARDWARE bool movieplayer_select_ac3_atype0;