Opened 13 years ago

Closed 13 years ago

#2154 closed enhancement (invalid)

Patch to make mythgallery scale according to screen aspect ratio

Reported by: drdaz7@… Owned by: danielk
Priority: minor Milestone: 0.21
Component: mythgallery Version: head
Severity: low Keywords: aspect ratio
Cc: Ticket locked: no

Description

I'm using a widescreen CRT with myth and mythgallery does not adjust picture aspect ratio according to the DisplaySize? defined in xorg.conf.

This patch is based on the patch found in this thread: http://www.gossamer-threads.com/lists/mythtv/dev/72998?search_string=mythgallery%20on%2016%3A9%20screens;#72998

There is one minor addition to the patch referenced in that link, as using that patch left rotated images with the wrong aspect again. This patch corrects the problem.

I used the svn diff command to generate this patch... I hope this is appropriate for submission.

/drdaz

Attachments (2)

mythgalleryAR.diff (2.0 KB) - added by drdaz7@… 13 years ago.
Aspect Ratio patch for mythgallery
mythgallery_patches.tar.bz2 (1.3 KB) - added by danielk 13 years ago.
Copied patch over from #2792.

Download all attachments as: .zip

Change History (8)

Changed 13 years ago by drdaz7@…

Attachment: mythgalleryAR.diff added

Aspect Ratio patch for mythgallery

comment:1 Changed 13 years ago by danielk

Milestone: 0.21
Owner: changed from Isaac Richards to danielk
Severity: highlow
Type: patchenhancement
Version: head

comment:2 Changed 13 years ago by drdaz7

I'm a little confused by the classification of this patch as a new enhancement. The manner in which mythgallery displays pictures is wrong for users who don't have 4:3 displays. Surely that should be considered a bug? If I've got my definitions messed up, then I'd be interested to see the correct definitions of the terms.

FWIW I'm using this without issue on an otherwise untouched 0.19-fixes version of mythgallery.

/drdaz

comment:3 Changed 13 years ago by danielk

Resolution: invalid
Status: newclosed

The patch no longer applies.

But more importantly, it looks like it only fixes this for glsingleview.cpp not singleview.cpp. Also, the aspect detection code should be in a utility class like GalleryUtil?, not in glsingleview.cpp.

comment:4 Changed 13 years ago by episani@…

Resolution: invalid
Status: closedreopened

Hi,

I have created some code to make mythgallery display the pictures ok when using a widescreen.

The patches are attached.

comment:5 Changed 13 years ago by episani@…

Patches are attached on ticket 2792. Could not add attachments here.

Regards,

Edgar Pisani

Changed 13 years ago by danielk

Attachment: mythgallery_patches.tar.bz2 added

Copied patch over from #2792.

comment:6 Changed 13 years ago by danielk

Resolution: invalid
Status: reopenedclosed

The XOpenDisplay calls don't specify the display to open, have a look how videoout_xv.cpp sets the display_aspect variable wrt to Xinerama and use MythXOpenDisplay so that you open the correct display.

Also there are several potential divide by zero possibilities in getScaleFactorW() and getScaleFactorH(). Please avoid these coredumps and replace with these single function GetDisplayAspect?() to match the video output code.

Formatting, 4 spaces for intentation, "if" is not a function, don't use K&R bracing, 80 chars per line max, etc. See the formatting guidelines linked to from the TicketHowTo.

Note: See TracTickets for help on using tickets.