Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#4162 closed patch (fixed)

mythgallery aspect ratio patch

Reported by: kielogl@… Owned by: danielk
Priority: minor Milestone: 0.21
Component: mythgallery Version: 0.20.2
Severity: medium Keywords: mythgallery aspect
Cc: Ticket locked: no


As per my post on the mythtv-dev list ( mythgallery is stretching images horizontally on my 16:9 screen which has 1024x768 (non-square) pixels.

I found a couple of related tickets, but one was closed as a duplicate, and the other (#2154) was closed as invalid.

So please find attached patch that fixes my problem on 0.20.2, hopefully addressing the comments raised previously by danielk on #2154. (The patch also seems ok on 0.21.)

Cheers, Mark.

Attachments (2)

mythgallery16x9.diff (4.5 KB) - added by kielogl@… 13 years ago.
mythgallery aspect ratio patch
mythfrontend.log (5.9 KB) - added by elkin@… 13 years ago.
output of mythfrontend -v most

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by kielogl@…

Attachment: mythgallery16x9.diff added

mythgallery aspect ratio patch

comment:1 Changed 13 years ago by danielk

Owner: changed from Isaac Richards to danielk

comment:2 Changed 13 years ago by danielk

Resolution: fixed
Status: newclosed

(In [14950]) Fixes #4162. Adjusts images in mythgallary to the correct aspect ratio.

This adds a function to util.h MythGetPixelAspectRatio?() which returns the aspect ratio of the default screen's pixel aspect ratio and uses this to adjust the display of the image. This will not work properly if there are multiple screens with different pixel aspect ratios, and it only works on X11 platforms (but this would not be too difficult to port).

To support the util.h function three functions have been added to util-x11.h, MythXGetDisplaySize() which determines a screen's size in pixels, MythXGetDisplayDimensions(), which returns a sreen's size in millimeters, and MythXGetPixelAspectRatio() which determines a screen's pixel aspect ratio using those two functions. These functions accept a Display* and a screen number, but when called without them use MythXOpenDisplay() to open the correct display and use DefaultScreen?() to select the screen number.DisplayResX and videoout_xv.cpp now use these functions to query the screen rather than duplicating the code.

comment:3 Changed 13 years ago by elkin@…

I am unable to get the aspect ratio on mythgallery to work. My screen runs at 960x544 and at 1024x768 since it is a projector (Sanyo z1). I can switch between an 1024x768 LCD and the 1024x768 via a VGA switch. I used to be able (0.20.1) to just restart mythfrontend and the aspect ratio of both tv and mythgallery would work fine. I think, after this patch it stopped working. At 1024x768 everything is fine, at 960x544 I an only get TV + Recordings to honor the aspect ratio calling "mythfrontend --geometry 960x544 -O XineramaMonitorAspectRatio?=1.7777 -O GuiVidModeResolution?=960x544 -O TVVidModeResolution=960x544 -O TVVidModeForceAspect=1.77777777777 -O GuiWidth?=960 -O GuiHight?=544". With any of these missing the TV + Recordings will also be unwatchable.

I will not reopen the ticket as I seem to be the only one with this issue. I will attach the output of mythfrontend -v most.

Changed 13 years ago by elkin@…

Attachment: mythfrontend.log added

output of mythfrontend -v most

Note: See TracTickets for help on using tickets.