From 69673d1f63bf3ad71a34d671f843c9cd2942751c Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 25 Feb 2018 23:23:39 +0100 Subject: [PATCH] movieplayer: revert to good ol' vfd-handling; ... show playstate in vfd and avoid mode changes Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/e39622105f9e8d107f18d18ffb203f3362e9f961 Author: vanhofen Date: 2018-02-25 (Sun, 25 Feb 2018) Origin message was: ------------------ - movieplayer: revert to good ol' vfd-handling; ... show playstate in vfd and avoid mode changes --- src/gui/movieplayer.cpp | 38 ++++++-------------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index cb5b3ff67..f5f595155 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -84,10 +84,10 @@ //NI InfoIcons #include -#ifndef HAVE_COOL_HARDWARE -#define LCD_MODE CVFD::MODE_MOVIE -#else +#if HAVE_COOL_HARDWARE || HAVE_ARM_HARDWARE #define LCD_MODE CVFD::MODE_MENU_UTF8 +#else +#define LCD_MODE CVFD::MODE_MOVIE #endif extern cVideo * videoDecoder; @@ -458,8 +458,6 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey) } while(!isHTTP && !isUPNP && SelectFile()) { - CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); - CVFD::getInstance()->showServicename(file_name.c_str()); if (timeshift != TSHIFT_MODE_OFF) { CVFD::getInstance()->ShowIcon(FP_ICON_TIMESHIFT, true); PlayFile(); @@ -474,7 +472,6 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey) } while (repeat_mode || filelist_it != filelist.end()); } - CVFD::getInstance()->showServicename(CVFD::getInstance()->getServicename()); bookmarkmanager->flush(); @@ -1461,7 +1458,6 @@ void CMoviePlayerGui::PlayFileLoop(void) bool first_start = true; bool update_lcd = true; neutrino_msg_t lastmsg = 0; - int ss,mm,hh; #if HAVE_COOL_HARDWARE int eof = 0; int eof2 = 0; @@ -1534,18 +1530,6 @@ void CMoviePlayerGui::PlayFileLoop(void) CVFD::getInstance()->showPercentOver(file_prozent); - if (g_info.hw_caps->display_xres > 8) - { - ss = position/1000; - hh = ss/3600; - ss -= hh * 3600; - mm = ss/60; - ss -= mm * 60; - std::string Value = to_string(hh/10) + to_string(hh%10) + ":" + to_string(mm/10) + to_string(mm%10) + ":" + to_string(ss/10) + to_string(ss%10); - CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8); - CVFD::getInstance()->showMenuText(0, Value.c_str(), -1, true); - } - playback->GetSpeed(speed); /* at BOF lib set speed 1, check it */ if ((playstate != CMoviePlayerGui::PLAY) && (speed == 1)) { @@ -1868,10 +1852,10 @@ void CMoviePlayerGui::PlayFileLoop(void) } else if (msg == (neutrino_msg_t) g_settings.mpkey_goto) { bool cancel = true; playback->GetPosition(position, duration); - ss = position/1000; - hh = ss/3600; + int ss = position/1000; + int hh = ss/3600; ss -= hh * 3600; - mm = ss/60; + int mm = ss/60; ss -= mm * 60; std::string Value = to_string(hh/10) + to_string(hh%10) + ":" + to_string(mm/10) + to_string(mm%10) + ":" + to_string(ss/10) + to_string(ss%10); CTimeInput jumpTime (LOCALE_MPKEY_GOTO, &Value, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, NULL, &cancel); @@ -2067,7 +2051,6 @@ void CMoviePlayerGui::callInfoViewer(bool init_vzap_it) std::string key = trim(keys[i]); if (movie_info.epgTitle.empty() && !strcasecmp("title", key.c_str())) { movie_info.epgTitle = isUTF8(values[i]) ? values[i] : convertLatin1UTF8(values[i]); - CVFD::getInstance()->showServicename(movie_info.epgTitle.c_str()); continue; } if (movie_info.channelName.empty() && !strcasecmp("artist", key.c_str())) { @@ -2104,22 +2087,13 @@ void CMoviePlayerGui::callInfoViewer(bool init_vzap_it) if (channelName.empty()) channelName = pretty_name; - std::string channelTitle = mi->epgTitle; - if (channelTitle.empty()) - channelTitle = pretty_name; - - CVFD::getInstance()->ShowText(channelTitle.c_str()); - g_InfoViewer->showMovieTitle(playstate, mi->epgId >>16, channelName, mi->epgTitle, mi->epgInfo1, duration, position, repeat_mode, init_vzap_it ? 0 /*IV_MODE_DEFAULT*/ : 1 /*IV_MODE_VIRTUAL_ZAP*/); - unlink("/tmp/cover.jpg"); return; } /* not moviebrowser => use the filename as title */ - CVFD::getInstance()->ShowText(pretty_name.c_str()); g_InfoViewer->showMovieTitle(playstate, 0, pretty_name, info_1, info_2, duration, position, repeat_mode); - unlink("/tmp/cover.jpg"); } bool CMoviePlayerGui::getAudioName(int apid, std::string &apidtitle)