movieplayer: move code to display movie-info to an own public function

Origin commit data
------------------
Branch: ni/coolstream
Commit: 69458b5610
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-07-22 (Sun, 22 Jul 2018)

Origin message was:
------------------
- movieplayer: move code to display movie-info to an own public function

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2018-07-22 23:27:23 +02:00
parent 2c912b4b54
commit c1216df34f
2 changed files with 28 additions and 21 deletions

View File

@@ -1891,28 +1891,8 @@ void CMoviePlayerGui::PlayFileLoop(void)
} else if (msg == CRCInput::RC_info) {
if (fromInfoviewer)
{
disableOsdElements(NO_MUTE);
if (g_settings.movieplayer_display_playtime)
updateLcd(false); // force title
#ifdef ENABLE_LUA
if (isLuaPlay && haveLuaInfoFunc)
{
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);
}
else
#endif
g_EpgData->show_mp(p_movie_info,GetPosition(),GetDuration());
showMovieInfo();
fromInfoviewer = false;
enableOsdElements(NO_MUTE);
}
else
callInfoViewer();
@@ -2053,6 +2033,32 @@ void CMoviePlayerGui::set_vzap_it(bool up)
//printf("CMoviePlayerGui::%s: vzap_it: %d\n", __func__, (int)(vzap_it - filelist.begin()));
}
void CMoviePlayerGui::showMovieInfo()
{
disableOsdElements(NO_MUTE);
if (g_settings.movieplayer_display_playtime)
updateLcd(false); // force title
#ifdef ENABLE_LUA
if (isLuaPlay && haveLuaInfoFunc)
{
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);
}
else
#endif
g_EpgData->show_mp(p_movie_info,GetPosition(),GetDuration());
enableOsdElements(NO_MUTE);
}
void CMoviePlayerGui::callInfoViewer(bool init_vzap_it)
{
if (init_vzap_it)