Opened 7 years ago

Closed 2 years ago

Last modified 18 months ago

#11363 closed Patch - Bug Fix (Duplicate)

Automatic change of display resolution for OpenGL video playback does not resize x11 window correctly

Reported by: o.mangold@… Owned by: Peter Bennett
Priority: minor Milestone: 0.27.7
Component: MythTV - Video Playback Version: Master Head
Severity: high Keywords:
Cc: Ticket locked: no

Description

When I set output to OpenGL and enable different resolutions for GUI and video, when playing video the X11 window stays on the size of the gui window. The video is displayed in the bottom left corner of the x11 window.

I tried to figured out what the problem is, and I identified 2 issues:

  • in MythRenderOpenGL::MoveResizeWindow?(), the call to QWindget::setGeometry() does not actually change the X11 window size. I do not know, why this is the case
  • when I fix that, the original window size is not restored when switching back to GUI. I didn't find the code, where this is supposed to happen. So, as a hack, I added the needed code to VideoOutputOpenGL::~VideoOutputOpenGL()

This solved the problem for me. You can find my patch attached.

I'm using QT 4.8.4, mesa 9.0.1, xorg 1.13.1, kernel 3.6.11 and Intel HD graphics with latest i915 driver.

Attachments (1)

0001-quick-n-dirty-fix-for-OpenGL-window-resize-problem.patch (2.5 KB) - added by o.mangold@… 7 years ago.
Quick'n dirty fix

Download all attachments as: .zip

Change History (13)

Changed 7 years ago by o.mangold@…

Quick'n dirty fix

comment:1 Changed 7 years ago by o.mangold@…

One more detail, I figured out:

QWidget::setGeometry() does not work, because the video window which is set here, is not a toplevel window, but a child of the main GUI window. parent->isWindow() return false, thus Qt expects the widget to be not an X11 window, thus no call to XMoveResizeWindow() is done. So resizing the X11 directly via Xlib instead of Qt might actually be the right solution.

comment:2 Changed 7 years ago by danielk

Milestone: unknown0.26.1
Owner: set to danielk
Status: newaccepted

comment:3 Changed 6 years ago by paulh

Milestone: 0.26.10.27
Type: Bug Report - GeneralPatch - Bug Fix

comment:4 Changed 4 years ago by Stuart Auchterlonie

Milestone: 0.270.27.6

comment:5 Changed 4 years ago by Stuart Auchterlonie

Owner: danielk deleted
Status: acceptednew

comment:6 Changed 4 years ago by Karl Egly

Milestone: 0.27.60.27.7

Reschedule all tickets planned for, but not solved in time for, 0.27.6 to 0.27.7.

comment:7 Changed 2 years ago by Peter Bennett

Owner: set to Peter Bennett
Status: newaccepted

comment:8 Changed 2 years ago by Peter Bennett <pbennett@…>

Resolution: fixed
Status: acceptedclosed

In 7388b5a60c54d5e812a535bf5212295e512c5c3f/mythtv:

Fix bugs that occur when using a different video mode for playback.

Fixes these cases where the code does not cater for the video mode
changing between GUI and playback.

  • Playback using xv-blit and maybe others is shown in the wrong size and position.
  • Playback using OpenGL is displaced downward.
  • LiveTV using OpenGL is the wrong size.
  • Program Guide and other screens selected from within LiveTV when using OpenGL

are cut off on the right.

Fixes #7408
Fixes #11363
Fixes #13054

comment:9 Changed 2 years ago by Peter Bennett <pbennett@…>

In eef6a480b0eca5201eec785b0ce57f9a6f4b7fdd/mythtv:

Fix bugs that occur when using a different video mode for playback.

Fixes these cases where the code does not cater for the video mode
changing between GUI and playback.

  • Playback using xv-blit and maybe others is shown in the wrong size and position.
  • Playback using OpenGL is displaced downward.
  • LiveTV using OpenGL is the wrong size.
  • Program Guide and other screens selected from within LiveTV when using OpenGL

are cut off on the right.

Fixes #7408
Fixes #11363
Fixes #13054

(cherry picked from commit 7388b5a60c54d5e812a535bf5212295e512c5c3f)

comment:10 Changed 2 years ago by Steven Ellis <support@…>

Resolution: fixed
Status: closednew

See ticket:13054#comment:12 for details as issue is still occurring with OpenGL

comment:11 Changed 2 years ago by Peter Bennett

Resolution: Duplicate
Status: newclosed

Duplicate of #13054

comment:12 Changed 18 months ago by Peter Bennett

Owner: changed from Peter Bennett to Peter Bennett
Note: See TracTickets for help on using tickets.