[mythtv-commits] mythtv commit: r14950 - in trunk by danielk

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Sun Nov 25 16:23:56 UTC 2007


      Author: danielk
        Date: 2007-11-25 16:23:54 +0000 (Sun, 25 Nov 2007)
New Revision: 14950
   Changeset: http://cvs.mythtv.org/trac/changeset/14950

Modified:

   trunk/mythplugins/mythgallery/mythgallery/galleryutil.cpp
   trunk/mythplugins/mythgallery/mythgallery/galleryutil.h
   trunk/mythplugins/mythgallery/mythgallery/gltexture.cpp
   trunk/mythplugins/mythgallery/mythgallery/singleview.cpp
   trunk/mythtv/libs/libmyth/DisplayResX.cpp
   trunk/mythtv/libs/libmyth/mythcontext.h
   trunk/mythtv/libs/libmyth/util-x11.cpp
   trunk/mythtv/libs/libmyth/util-x11.h
   trunk/mythtv/libs/libmyth/util.cpp
   trunk/mythtv/libs/libmyth/util.h
   trunk/mythtv/libs/libmythtv/videoout_xv.cpp

Log:

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.




More information about the mythtv-commits mailing list