diff -Nru mythtv-0.28.1+fixes.20170712.457a417/debian/changelog mythtv-0.28.1+fixes.20170713.eef6a48/debian/changelog --- mythtv-0.28.1+fixes.20170712.457a417/debian/changelog 2017-07-12 08:05:46.000000000 +0000 +++ mythtv-0.28.1+fixes.20170713.eef6a48/debian/changelog 2017-07-13 08:04:28.000000000 +0000 @@ -1,18 +1,19 @@ -mythtv (2:0.28.1+fixes.20170712.457a417-0ubuntu0mythbuntu1) artful; urgency=medium +mythtv (2:0.28.1+fixes.20170713.eef6a48-0ubuntu0mythbuntu1) artful; urgency=medium * Scripted Build from fixes git packaging [bdfb8d8] - * Packaging changes between 20160325 and 20170712: + * Packaging changes between 20160325 and 20170713: * [dd75c01] use init script to be more compatible to systemd/upstart in backports * [b7c38ab] make sure to set buildroot * [7a4983b] cover one more pro file for mysql5.7 fix * [8d19bc0] let mysql-server-5.7 resolve things * [35b1bba] Add in support to compile against mysql 5.7 (LP: #1528583) - * Automated Build: New upstream checkout (457a417) - * >>Upstream changes since last upload (1c2863c): - * [457a417] Services: Fix exception messages + * Automated Build: New upstream checkout (eef6a48) + * >>Upstream changes since last upload (457a417): + * [eef6a48] Fix bugs that occur when using a different video mode for + playback. - -- Mythbuntu Automated Package Builder Wed, 12 Jul 2017 01:04:52 -0700 + -- Mythbuntu Automated Package Builder Thu, 13 Jul 2017 01:03:44 -0700 mythtv (2:0.28.0+fixes.20160325.2520617-0ubuntu3) xenial; urgency=medium diff -Nru mythtv-0.28.1+fixes.20170712.457a417/debian/DESCRIBE mythtv-0.28.1+fixes.20170713.eef6a48/debian/DESCRIBE --- mythtv-0.28.1+fixes.20170712.457a417/debian/DESCRIBE 2017-07-12 08:04:48.000000000 +0000 +++ mythtv-0.28.1+fixes.20170713.eef6a48/debian/DESCRIBE 2017-07-13 08:03:39.000000000 +0000 @@ -1,2 +1,2 @@ BRANCH="fixes/0.28" -SOURCE_VERSION="v0.28.1-37-g457a417" +SOURCE_VERSION="v0.28.1-38-geef6a48" diff -Nru mythtv-0.28.1+fixes.20170712.457a417/mythtv/libs/libmythtv/tv_play.cpp mythtv-0.28.1+fixes.20170713.eef6a48/mythtv/libs/libmythtv/tv_play.cpp --- mythtv-0.28.1+fixes.20170712.457a417/mythtv/libs/libmythtv/tv_play.cpp 2017-07-12 08:04:39.000000000 +0000 +++ mythtv-0.28.1+fixes.20170713.eef6a48/mythtv/libs/libmythtv/tv_play.cpp 2017-07-13 08:03:36.000000000 +0000 @@ -2601,15 +2601,21 @@ { if (!ctx->IsPIP()) GetMythUI()->DisableScreensaver(); - MythMainWindow *mainWindow = GetMythMainWindow(); - mainWindow->setBaseSize(player_bounds.size()); - mainWindow->setMinimumSize( - (db_use_fixed_size) ? player_bounds.size() : QSize(16, 16)); - mainWindow->setMaximumSize( - (db_use_fixed_size) ? player_bounds.size() : - QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX)); - mainWindow->setGeometry(player_bounds); - mainWindow->ResizePainterWindow(player_bounds.size()); + bool switchMode = gCoreContext->GetNumSetting("UseVideoModes", 0); + // player_bounds is not applicable when switching modes so + // skip this logic in that case. + if (!switchMode) + { + MythMainWindow *mainWindow = GetMythMainWindow(); + mainWindow->setBaseSize(player_bounds.size()); + mainWindow->setMinimumSize( + (db_use_fixed_size) ? player_bounds.size() : QSize(16, 16)); + mainWindow->setMaximumSize( + (db_use_fixed_size) ? player_bounds.size() : + QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX)); + mainWindow->setGeometry(player_bounds); + mainWindow->ResizePainterWindow(player_bounds.size()); + } // PGB Do not disable the GUI when using openmax renderer, // to ensure that space next to letterbox pictures // is painted. @@ -9868,7 +9874,11 @@ mctx->UnlockDeletePlayer(__FILE__, __LINE__); ReturnPlayerLock(mctx); - if (!db_use_gui_size_for_tv || !db_use_fixed_size) + // player_bounds is not applicable when switching modes so + // skip this logic in that case. + bool switchMode = gCoreContext->GetNumSetting("UseVideoModes", 0); + if (!switchMode + && (!db_use_gui_size_for_tv || !db_use_fixed_size)) { mwnd->setMinimumSize(QSize(16, 16)); mwnd->setMaximumSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX)); diff -Nru mythtv-0.28.1+fixes.20170712.457a417/mythtv/libs/libmythtv/videoout_opengl.cpp mythtv-0.28.1+fixes.20170713.eef6a48/mythtv/libs/libmythtv/videoout_opengl.cpp --- mythtv-0.28.1+fixes.20170712.457a417/mythtv/libs/libmythtv/videoout_opengl.cpp 2017-07-12 08:04:39.000000000 +0000 +++ mythtv-0.28.1+fixes.20170713.eef6a48/mythtv/libs/libmythtv/videoout_opengl.cpp 2017-07-13 08:03:36.000000000 +0000 @@ -363,7 +363,24 @@ if (!gl_context) return false; - const QRect dvr = window.GetDisplayVisibleRect(); + QRect dvr = window.GetDisplayVisibleRect(); + + MythMainWindow *mainWin = GetMythMainWindow(); + QSize mainSize = mainWin->size(); + + // If the Video screen mode has vertically less pixels + // than the GUI screen mode - OpenGL coordinate adjustments + // must be made to put the video at the top of the display + // area instead of at the bottom. + if (dvr.height() < mainSize.height()) + dvr.setTop(dvr.top()-mainSize.height()+dvr.height()); + + // If the Video screen mode has horizontally less pixels + // than the GUI screen mode - OpenGL width must be set + // as the higher GUI width so that the Program Guide + // invoked from playback is not cut off. + if (dvr.width() < mainSize.width()) + dvr.setWidth(mainSize.width()); if (video_codec_id == kCodec_NONE) { diff -Nru mythtv-0.28.1+fixes.20170712.457a417/mythtv/libs/libmythtv/videooutwindow.cpp mythtv-0.28.1+fixes.20170713.eef6a48/mythtv/libs/libmythtv/videooutwindow.cpp --- mythtv-0.28.1+fixes.20170712.457a417/mythtv/libs/libmythtv/videooutwindow.cpp 2017-07-12 08:04:39.000000000 +0000 +++ mythtv-0.28.1+fixes.20170713.eef6a48/mythtv/libs/libmythtv/videooutwindow.cpp 2017-07-13 08:03:36.000000000 +0000 @@ -93,6 +93,12 @@ gCoreContext->GetNumSetting("yScanDisplacement", 0)); db_use_gui_size = gCoreContext->GetNumSetting("GuiSizeForTV", 0); + populateGeometry(); +} + +void VideoOutWindow::populateGeometry(void) +{ + qApp->processEvents(); QDesktopWidget *desktop = NULL; if (qobject_cast(qApp)) desktop = QApplication::desktop(); @@ -489,6 +495,8 @@ AspectOverrideMode new_aspectoverride, AdjustFillMode new_adjustfill) { + // Refresh the geometry in case the video mode has changed + populateGeometry(); display_visible_rect = db_use_gui_size ? new_display_visible_rect : screen_geom; diff -Nru mythtv-0.28.1+fixes.20170712.457a417/mythtv/libs/libmythtv/videooutwindow.h mythtv-0.28.1+fixes.20170713.eef6a48/mythtv/libs/libmythtv/videooutwindow.h --- mythtv-0.28.1+fixes.20170712.457a417/mythtv/libs/libmythtv/videooutwindow.h 2017-07-08 08:01:24.000000000 +0000 +++ mythtv-0.28.1+fixes.20170713.eef6a48/mythtv/libs/libmythtv/videooutwindow.h 2017-07-13 08:03:36.000000000 +0000 @@ -68,6 +68,7 @@ void SetNeedRepaint(bool needRepaint) { needrepaint = needRepaint; } + void populateGeometry(void); // Gets bool IsVideoScalingAllowed(void) const { return db_scaling_allowed; } /// \brief Returns if videooutput is embedding