mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
lua: Fix InfoFunc for displaying information in the movieplayer
- Fix for commit7c29c4029e
- Set Lua api version to 1.66 Origin commit data ------------------ Branch: ni/coolstream Commit:1aee964c14
Author: Michael Liebmann <tuxcode.bbg@gmail.com> Date: 2016-12-01 (Thu, 01 Dec 2016) ------------------ This commit was generated by Migit
This commit is contained in:
@@ -4,4 +4,4 @@
|
|||||||
* to luainstance.h changes
|
* to luainstance.h changes
|
||||||
*/
|
*/
|
||||||
#define LUA_API_VERSION_MAJOR 1
|
#define LUA_API_VERSION_MAJOR 1
|
||||||
#define LUA_API_VERSION_MINOR 65
|
#define LUA_API_VERSION_MINOR 66
|
||||||
|
@@ -1524,13 +1524,38 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
|||||||
SetPosition(1000 * (hh * 3600 + mm * 60 + ss), true);
|
SetPosition(1000 * (hh * 3600 + mm * 60 + ss), true);
|
||||||
|
|
||||||
} else if (msg == CRCInput::RC_help || msg == CRCInput::RC_info) {
|
} else if (msg == CRCInput::RC_help || msg == CRCInput::RC_info) {
|
||||||
if (fromInfoviewer)
|
#ifdef ENABLE_LUA
|
||||||
{
|
if (isLuaPlay && haveLuaInfoFunc) {
|
||||||
g_EpgData->show_mp(p_movie_info,GetPosition(),GetDuration());
|
CTimeOSD::mode m_mode = FileTime.getMode();
|
||||||
fromInfoviewer = false;
|
bool restore = FileTime.IsVisible();
|
||||||
|
if (restore)
|
||||||
|
FileTime.kill();
|
||||||
|
CInfoClock::getInstance()->enableInfoClock(false);
|
||||||
|
|
||||||
|
int xres = 0, yres = 0, aspectRatio = 0, framerate = -1;
|
||||||
|
if (!videoDecoder->getBlank()) {
|
||||||
|
videoDecoder->getPictureInfo(xres, yres, framerate);
|
||||||
|
if (yres == 1088)
|
||||||
|
yres = 1080;
|
||||||
|
aspectRatio = videoDecoder->getAspectRatio();
|
||||||
|
}
|
||||||
|
CLuaInstVideo::getInstance()->execLuaInfoFunc(luaState, xres, yres, aspectRatio, framerate);
|
||||||
|
|
||||||
|
CInfoClock::getInstance()->enableInfoClock(true);
|
||||||
|
if (restore) {
|
||||||
|
FileTime.setMode(m_mode);
|
||||||
|
FileTime.update(position, duration);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
#endif
|
||||||
|
if (fromInfoviewer) {
|
||||||
|
g_EpgData->show_mp(p_movie_info,GetPosition(),GetDuration());
|
||||||
|
fromInfoviewer = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
callInfoViewer();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
callInfoViewer();
|
|
||||||
update_lcd = true;
|
update_lcd = true;
|
||||||
clearSubtitle();
|
clearSubtitle();
|
||||||
} else if (timeshift != TSHIFT_MODE_OFF && (msg == CRCInput::RC_text || msg == CRCInput::RC_epg || msg == NeutrinoMessages::SHOW_EPG)) {
|
} else if (timeshift != TSHIFT_MODE_OFF && (msg == CRCInput::RC_text || msg == CRCInput::RC_epg || msg == NeutrinoMessages::SHOW_EPG)) {
|
||||||
@@ -2139,27 +2164,14 @@ void CMoviePlayerGui::handleMovieBrowser(neutrino_msg_t msg, int /*position*/)
|
|||||||
cMovieInfo.saveMovieInfo(*p_movie_info); /* save immediately in xml file */
|
cMovieInfo.saveMovieInfo(*p_movie_info); /* save immediately in xml file */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (msg == NeutrinoMessages::SHOW_EPG && (p_movie_info || (isLuaPlay && haveLuaInfoFunc))) {
|
} else if (msg == NeutrinoMessages::SHOW_EPG && p_movie_info) {
|
||||||
CTimeOSD::mode m_mode = FileTime.getMode();
|
CTimeOSD::mode m_mode = FileTime.getMode();
|
||||||
bool restore = FileTime.IsVisible();
|
bool restore = FileTime.IsVisible();
|
||||||
if (restore)
|
if (restore)
|
||||||
FileTime.kill();
|
FileTime.kill();
|
||||||
CInfoClock::getInstance()->enableInfoClock(false);
|
CInfoClock::getInstance()->enableInfoClock(false);
|
||||||
|
|
||||||
if (isLuaPlay && haveLuaInfoFunc) {
|
g_EpgData->show_mp(p_movie_info, position, duration);
|
||||||
int xres = 0, yres = 0, aspectRatio = 0, framerate = -1;
|
|
||||||
if (!videoDecoder->getBlank()) {
|
|
||||||
videoDecoder->getPictureInfo(xres, yres, framerate);
|
|
||||||
if (yres == 1088)
|
|
||||||
yres = 1080;
|
|
||||||
aspectRatio = videoDecoder->getAspectRatio();
|
|
||||||
}
|
|
||||||
#ifdef ENABLE_LUA
|
|
||||||
CLuaInstVideo::getInstance()->execLuaInfoFunc(luaState, xres, yres, aspectRatio, framerate);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else if (p_movie_info)
|
|
||||||
g_EpgData->show_mp(p_movie_info, position, duration);
|
|
||||||
|
|
||||||
CInfoClock::getInstance()->enableInfoClock(true);
|
CInfoClock::getInstance()->enableInfoClock(true);
|
||||||
if (restore) {
|
if (restore) {
|
||||||
|
Reference in New Issue
Block a user