Fix videosystem auto mode / osd mode switch in movie player

This commit is contained in:
M. Liebmann
2017-03-22 07:27:12 +01:00
parent 0cac85205b
commit 2a858c628a
2 changed files with 22 additions and 0 deletions

View File

@@ -37,6 +37,7 @@
#include <gui/epgview.h> #include <gui/epgview.h>
#include <gui/eventlist.h> #include <gui/eventlist.h>
#include <gui/movieplayer.h> #include <gui/movieplayer.h>
#include <gui/osd_helpers.h>
#include <gui/infoviewer.h> #include <gui/infoviewer.h>
#include <gui/timeosd.h> #include <gui/timeosd.h>
#include <gui/widget/helpbox.h> #include <gui/widget/helpbox.h>
@@ -147,6 +148,8 @@ void CMoviePlayerGui::Init(void)
{ {
playing = false; playing = false;
stopped = true; stopped = true;
currentVideoSystem = -1;
currentOsdResolution = 0;
frameBuffer = CFrameBuffer::getInstance(); frameBuffer = CFrameBuffer::getInstance();
@@ -223,6 +226,12 @@ void CMoviePlayerGui::cutNeutrino()
if (playing) if (playing)
return; return;
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
COsdHelpers *coh = COsdHelpers::getInstance();
currentVideoSystem = coh->getVideoSystem();
currentOsdResolution = coh->getOsdResolution();
#endif
playing = true; playing = true;
/* set g_InfoViewer update timer to 1 sec, should be reset to default from restoreNeutrino->set neutrino mode */ /* set g_InfoViewer update timer to 1 sec, should be reset to default from restoreNeutrino->set neutrino mode */
if (!isWebTV) if (!isWebTV)
@@ -247,6 +256,17 @@ void CMoviePlayerGui::restoreNeutrino()
if (!playing) if (!playing)
return; return;
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
if ((currentVideoSystem > -1) && (g_settings.video_Mode == VIDEO_STD_AUTO)) {
COsdHelpers *coh = COsdHelpers::getInstance();
if (currentVideoSystem != coh->getVideoSystem()) {
coh->setVideoSystem(currentVideoSystem, false);
coh->changeOsdResolution(currentOsdResolution, false, true);
}
currentVideoSystem = -1;
}
#endif
playing = false; playing = false;
if (isUPNP) if (isUPNP)

View File

@@ -118,6 +118,8 @@ class CMoviePlayerGui : public CMenuTarget
int startposition; int startposition;
int position; int position;
int duration; int duration;
int currentVideoSystem;
uint32_t currentOsdResolution;
unsigned short numpida; unsigned short numpida;
unsigned short vpid; unsigned short vpid;