mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
Merge branch 'ni/tuxbox' into ni/mp/tuxbox
Conflicts:
configure.ac
Origin commit data
------------------
Branch: ni/coolstream
Commit: 43ef78ee44
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-02-02 (Thu, 02 Feb 2017)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -90,6 +90,7 @@ extern cVideo * videoDecoder;
|
||||
extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */
|
||||
|
||||
extern CVolume* g_volume;
|
||||
extern CTimeOSD *FileTimeOSD;
|
||||
|
||||
#define TIMESHIFT_SECONDS 3
|
||||
#define ISO_MOUNT_POINT "/media/iso"
|
||||
@@ -225,8 +226,6 @@ void CMoviePlayerGui::Init(void)
|
||||
blockedFromPlugin = false;
|
||||
m_screensaver = false;
|
||||
m_idletime = time(NULL);
|
||||
m_mode = CTimeOSD::MODE_HIDE;
|
||||
m_restore = false;
|
||||
}
|
||||
|
||||
void CMoviePlayerGui::cutNeutrino()
|
||||
@@ -328,6 +327,10 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey)
|
||||
ClearFlags();
|
||||
ClearQueue();
|
||||
|
||||
FileTimeOSD->kill();
|
||||
FileTimeOSD->setMode(CTimeOSD::MODE_HIDE);
|
||||
time_forced = false;
|
||||
|
||||
if (actionKey == "tsmoviebrowser") {
|
||||
isMovieBrowser = true;
|
||||
moviebrowser->setMode(MB_SHOW_RECORDS);
|
||||
@@ -517,11 +520,6 @@ void CMoviePlayerGui::enableOsdElements(bool mute)
|
||||
|
||||
CInfoClock::getInstance()->enableInfoClock(true);
|
||||
CInfoIcons::getInstance()->enableInfoIcons(true); //NI InfoIcons
|
||||
|
||||
if (m_restore) {
|
||||
FileTime.setMode(m_mode);
|
||||
FileTime.update(position, duration);
|
||||
}
|
||||
}
|
||||
|
||||
void CMoviePlayerGui::disableOsdElements(bool mute)
|
||||
@@ -531,11 +529,6 @@ void CMoviePlayerGui::disableOsdElements(bool mute)
|
||||
|
||||
CInfoClock::getInstance()->enableInfoClock(false);
|
||||
CInfoIcons::getInstance()->enableInfoIcons(false); //NI InfoIcons
|
||||
|
||||
m_mode = FileTime.getMode();
|
||||
m_restore = FileTime.IsVisible();
|
||||
if (m_restore)
|
||||
FileTime.kill();
|
||||
}
|
||||
|
||||
void CMoviePlayerGui::makeFilename()
|
||||
@@ -1268,8 +1261,8 @@ bool CMoviePlayerGui::PlayFileStart(void)
|
||||
speed = -1;
|
||||
playback->SetSpeed(-1);
|
||||
playstate = CMoviePlayerGui::REW;
|
||||
if (!FileTime.IsVisible() && !time_forced) {
|
||||
FileTime.switchMode(position, duration);
|
||||
if (!FileTimeOSD->IsVisible() && !time_forced) {
|
||||
FileTimeOSD->switchMode(position, duration);
|
||||
time_forced = true;
|
||||
}
|
||||
} else if (timeshift == TSHIFT_MODE_OFF || !g_settings.timeshift_pause) {
|
||||
@@ -1365,7 +1358,7 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
||||
|
||||
if ((playstate >= CMoviePlayerGui::PLAY) && (timeshift != TSHIFT_MODE_OFF || (playstate != CMoviePlayerGui::PAUSE))) {
|
||||
if (playback->GetPosition(position, duration)) {
|
||||
FileTime.update(position, duration);
|
||||
FileTimeOSD->update(position, duration);
|
||||
if (duration > 100)
|
||||
file_prozent = (unsigned char) (position / (duration / 100));
|
||||
|
||||
@@ -1400,7 +1393,7 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
||||
if (playstate == CMoviePlayerGui::STOPPED)
|
||||
at_eof = true;
|
||||
|
||||
FileTime.update(position, duration);
|
||||
FileTimeOSD->update(position, duration);
|
||||
}
|
||||
showSubtitle(0);
|
||||
|
||||
@@ -1475,7 +1468,7 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
||||
} else if (msg == (neutrino_msg_t) g_settings.mpkey_play) {
|
||||
if (time_forced) {
|
||||
time_forced = false;
|
||||
FileTime.kill();
|
||||
FileTimeOSD->kill();
|
||||
}
|
||||
if (playstate > CMoviePlayerGui::PLAY) {
|
||||
playstate = CMoviePlayerGui::PLAY;
|
||||
@@ -1541,7 +1534,7 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
||||
clearSubtitle();
|
||||
update_lcd = true;
|
||||
} else if (msg == (neutrino_msg_t) g_settings.mpkey_time) {
|
||||
FileTime.switchMode(position, duration);
|
||||
FileTimeOSD->switchMode(position, duration);
|
||||
} else if (msg == (neutrino_msg_t) g_settings.mbkey_cover) {
|
||||
makeScreenShot(false, true);
|
||||
} else if (msg == (neutrino_msg_t) g_settings.key_screenshot) {
|
||||
@@ -1563,8 +1556,8 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
||||
updateLcd();
|
||||
}
|
||||
|
||||
if (!FileTime.IsVisible() && !time_forced) {
|
||||
FileTime.switchMode(position, duration);
|
||||
if (!FileTimeOSD->IsVisible() && !time_forced) {
|
||||
FileTimeOSD->switchMode(position, duration);
|
||||
time_forced = true;
|
||||
}
|
||||
if (timeshift == TSHIFT_MODE_OFF)
|
||||
@@ -1640,8 +1633,8 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
||||
update_lcd = true;
|
||||
clearSubtitle();
|
||||
} else if (timeshift != TSHIFT_MODE_OFF && (msg == CRCInput::RC_text || msg == CRCInput::RC_epg || msg == NeutrinoMessages::SHOW_EPG)) {
|
||||
bool restore = FileTime.IsVisible();
|
||||
FileTime.kill();
|
||||
bool restore = FileTimeOSD->IsVisible();
|
||||
FileTimeOSD->kill();
|
||||
|
||||
if (msg == CRCInput::RC_epg )
|
||||
g_EventList->exec(CNeutrinoApp::getInstance()->channelList->getActiveChannel_ChannelID(), CNeutrinoApp::getInstance()->channelList->getActiveChannelName());
|
||||
@@ -1654,15 +1647,15 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
||||
frameBuffer->paintBackground();
|
||||
}
|
||||
if (restore)
|
||||
FileTime.show(position);
|
||||
FileTimeOSD->show(position);
|
||||
#if 0
|
||||
} else if (msg == CRCInput::RC_red) {
|
||||
bool restore = FileTime.IsVisible();
|
||||
FileTime.kill();
|
||||
bool restore = FileTimeOSD->IsVisible();
|
||||
FileTimeOSD->kill();
|
||||
CStreamInfo2 streaminfo;
|
||||
streaminfo.exec(NULL, "");
|
||||
if (restore)
|
||||
FileTime.show(position);
|
||||
FileTimeOSD->show(position);
|
||||
update_lcd = true;
|
||||
#endif
|
||||
} else if (msg == NeutrinoMessages::SHOW_EPG) {
|
||||
@@ -1693,12 +1686,12 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
||||
} else if (msg == (neutrino_msg_t) CRCInput::RC_setup) {
|
||||
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::SHOW_MAINMENU, 0);
|
||||
} else if (msg == CRCInput::RC_red || msg == CRCInput::RC_green || msg == CRCInput::RC_yellow || msg == CRCInput::RC_blue ) {
|
||||
//maybe move FileTime.kill to Usermenu to simplify this call
|
||||
bool restore = FileTime.IsVisible();
|
||||
FileTime.kill();
|
||||
//maybe move FileTimeOSD->kill to Usermenu to simplify this call
|
||||
bool restore = FileTimeOSD->IsVisible();
|
||||
FileTimeOSD->kill();
|
||||
CNeutrinoApp::getInstance()->usermenu.showUserMenu(msg);
|
||||
if (restore)
|
||||
FileTime.show(position);
|
||||
FileTimeOSD->show(position);
|
||||
update_lcd = true;
|
||||
} else {
|
||||
if (CNeutrinoApp::getInstance()->handleMsg(msg, data) & messages_return::cancel_all) {
|
||||
@@ -1733,7 +1726,7 @@ void CMoviePlayerGui::PlayFileEnd(bool restore)
|
||||
{
|
||||
printf("%s: stopping, this %p thread %p\n", __func__, this, CMoviePlayerGui::bgPlayThread);fflush(stdout);
|
||||
if (filelist_it == filelist.end())
|
||||
FileTime.kill();
|
||||
FileTimeOSD->kill();
|
||||
clearSubtitle();
|
||||
|
||||
playback->SetSpeed(1);
|
||||
@@ -2259,7 +2252,7 @@ void CMoviePlayerGui::UpdatePosition()
|
||||
if (playback->GetPosition(position, duration)) {
|
||||
if (duration > 100)
|
||||
file_prozent = (unsigned char) (position / (duration / 100));
|
||||
FileTime.update(position, duration);
|
||||
FileTimeOSD->update(position, duration);
|
||||
#ifdef DEBUG
|
||||
printf("CMoviePlayerGui::%s: spd %d pos %d/%d (%d, %d%%)\n", __func__, speed, position, duration, duration-position, file_prozent);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user