mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
movieplayer: show timeosd when set position
Origin commit data
------------------
Branch: ni/coolstream
Commit: 19079a930c
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-01-03 (Wed, 03 Jan 2018)
Origin message was:
------------------
- movieplayer: show timeosd when set position
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1482,6 +1482,7 @@ bool CMoviePlayerGui::SetPosition(int pos, bool absolute)
|
||||
playback->SetSpeed(speed);
|
||||
}
|
||||
StartSubtitles(true);
|
||||
FileTimeOSD_tmp = 0;
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -1553,6 +1554,8 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
||||
int bisection_loop = -1;
|
||||
int bisection_loop_max = 5;
|
||||
|
||||
FileTimeOSD_tmp = -1;
|
||||
|
||||
while (playstate >= CMoviePlayerGui::PLAY)
|
||||
{
|
||||
if (update_lcd) {
|
||||
@@ -1586,9 +1589,25 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
||||
if (bisection_loop > bisection_loop_max)
|
||||
bisection_loop = -1;
|
||||
|
||||
if (FileTimeOSD_tmp > -1)
|
||||
FileTimeOSD_tmp++;
|
||||
|
||||
if ((playstate >= CMoviePlayerGui::PLAY) && (timeshift != TSHIFT_MODE_OFF || (playstate != CMoviePlayerGui::PAUSE))) {
|
||||
if (playback->GetPosition(position, duration)) {
|
||||
FileTimeOSD->update(position, duration);
|
||||
|
||||
if (FileTimeOSD_tmp > -1 && !FileTimeOSD->IsVisible())
|
||||
{
|
||||
FileTimeOSD->setMode(CTimeOSD::MODE_TMP);
|
||||
FileTimeOSD->show(position);
|
||||
}
|
||||
if (FileTimeOSD_tmp > bisection_loop_max)
|
||||
{
|
||||
FileTimeOSD_tmp = -1;
|
||||
if (FileTimeOSD->getMode() == CTimeOSD::MODE_TMP)
|
||||
FileTimeOSD->kill();
|
||||
}
|
||||
|
||||
if (duration > 100)
|
||||
file_prozent = (unsigned char) (position / (duration / 100));
|
||||
|
||||
@@ -1866,6 +1885,7 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
||||
FileTimeOSD->switchMode(position, duration);
|
||||
time_forced = false;
|
||||
FileTimeOSD->setMpTimeForced(false);
|
||||
FileTimeOSD_tmp = -1;
|
||||
} else if (msg == (neutrino_msg_t) g_settings.mbkey_cover) {
|
||||
makeScreenShot(false, true);
|
||||
} else if (msg == (neutrino_msg_t) g_settings.key_screenshot) {
|
||||
|
@@ -107,6 +107,7 @@ class CMoviePlayerGui : public CMenuTarget
|
||||
std::string currentaudioname;
|
||||
bool playing;
|
||||
bool time_forced;
|
||||
int FileTimeOSD_tmp;
|
||||
CMoviePlayerGui::state playstate;
|
||||
int keyPressed;
|
||||
bool isLuaPlay;
|
||||
|
@@ -139,6 +139,7 @@ void CTimeOSD::update(int position, int duration)
|
||||
{
|
||||
switch(m_mode) {
|
||||
case MODE_ASC:
|
||||
case MODE_TMP:
|
||||
show(position, false);
|
||||
break;
|
||||
case MODE_DESC:
|
||||
@@ -156,6 +157,7 @@ void CTimeOSD::switchMode(int position, int duration)
|
||||
{
|
||||
switch (m_mode) {
|
||||
case MODE_ASC:
|
||||
case MODE_TMP:
|
||||
InfoIcons->enableInfoIcons(false); //NI InfoIcons
|
||||
m_mode = MODE_DESC;
|
||||
CComponents::kill();
|
||||
|
@@ -37,6 +37,7 @@ class CTimeOSD : public CComponentsFrmClock
|
||||
MODE_ASC,
|
||||
MODE_DESC,
|
||||
MODE_BAR,
|
||||
MODE_TMP,
|
||||
MODE_HIDE
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user