movieplayer: revert to good ol' vfd-handling; ...

show playstate in vfd and avoid mode changes


Origin commit data
------------------
Commit: e39622105f
Author: vanhofen <vanhofen@gmx.de>
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
This commit is contained in:
vanhofen
2018-02-25 23:23:39 +01:00
parent 8101310919
commit 69673d1f63

View File

@@ -84,10 +84,10 @@
//NI InfoIcons //NI InfoIcons
#include <gui/infoicons.h> #include <gui/infoicons.h>
#ifndef HAVE_COOL_HARDWARE #if HAVE_COOL_HARDWARE || HAVE_ARM_HARDWARE
#define LCD_MODE CVFD::MODE_MOVIE
#else
#define LCD_MODE CVFD::MODE_MENU_UTF8 #define LCD_MODE CVFD::MODE_MENU_UTF8
#else
#define LCD_MODE CVFD::MODE_MOVIE
#endif #endif
extern cVideo * videoDecoder; extern cVideo * videoDecoder;
@@ -458,8 +458,6 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey)
} }
while(!isHTTP && !isUPNP && SelectFile()) { while(!isHTTP && !isUPNP && SelectFile()) {
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
CVFD::getInstance()->showServicename(file_name.c_str());
if (timeshift != TSHIFT_MODE_OFF) { if (timeshift != TSHIFT_MODE_OFF) {
CVFD::getInstance()->ShowIcon(FP_ICON_TIMESHIFT, true); CVFD::getInstance()->ShowIcon(FP_ICON_TIMESHIFT, true);
PlayFile(); PlayFile();
@@ -474,7 +472,6 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey)
} }
while (repeat_mode || filelist_it != filelist.end()); while (repeat_mode || filelist_it != filelist.end());
} }
CVFD::getInstance()->showServicename(CVFD::getInstance()->getServicename());
bookmarkmanager->flush(); bookmarkmanager->flush();
@@ -1461,7 +1458,6 @@ void CMoviePlayerGui::PlayFileLoop(void)
bool first_start = true; bool first_start = true;
bool update_lcd = true; bool update_lcd = true;
neutrino_msg_t lastmsg = 0; neutrino_msg_t lastmsg = 0;
int ss,mm,hh;
#if HAVE_COOL_HARDWARE #if HAVE_COOL_HARDWARE
int eof = 0; int eof = 0;
int eof2 = 0; int eof2 = 0;
@@ -1534,18 +1530,6 @@ void CMoviePlayerGui::PlayFileLoop(void)
CVFD::getInstance()->showPercentOver(file_prozent); 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); playback->GetSpeed(speed);
/* at BOF lib set speed 1, check it */ /* at BOF lib set speed 1, check it */
if ((playstate != CMoviePlayerGui::PLAY) && (speed == 1)) { if ((playstate != CMoviePlayerGui::PLAY) && (speed == 1)) {
@@ -1868,10 +1852,10 @@ void CMoviePlayerGui::PlayFileLoop(void)
} else if (msg == (neutrino_msg_t) g_settings.mpkey_goto) { } else if (msg == (neutrino_msg_t) g_settings.mpkey_goto) {
bool cancel = true; bool cancel = true;
playback->GetPosition(position, duration); playback->GetPosition(position, duration);
ss = position/1000; int ss = position/1000;
hh = ss/3600; int hh = ss/3600;
ss -= hh * 3600; ss -= hh * 3600;
mm = ss/60; int mm = ss/60;
ss -= mm * 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); 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); 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]); std::string key = trim(keys[i]);
if (movie_info.epgTitle.empty() && !strcasecmp("title", key.c_str())) { if (movie_info.epgTitle.empty() && !strcasecmp("title", key.c_str())) {
movie_info.epgTitle = isUTF8(values[i]) ? values[i] : convertLatin1UTF8(values[i]); movie_info.epgTitle = isUTF8(values[i]) ? values[i] : convertLatin1UTF8(values[i]);
CVFD::getInstance()->showServicename(movie_info.epgTitle.c_str());
continue; continue;
} }
if (movie_info.channelName.empty() && !strcasecmp("artist", key.c_str())) { if (movie_info.channelName.empty() && !strcasecmp("artist", key.c_str())) {
@@ -2104,22 +2087,13 @@ void CMoviePlayerGui::callInfoViewer(bool init_vzap_it)
if (channelName.empty()) if (channelName.empty())
channelName = pretty_name; 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, 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*/); duration, position, repeat_mode, init_vzap_it ? 0 /*IV_MODE_DEFAULT*/ : 1 /*IV_MODE_VIRTUAL_ZAP*/);
unlink("/tmp/cover.jpg");
return; return;
} }
/* not moviebrowser => use the filename as title */ /* 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); 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) bool CMoviePlayerGui::getAudioName(int apid, std::string &apidtitle)