[mythtv] [PATCH] Fix (now broken) screen settings

Matt Johnson matt at brushfiretech.com
Fri Mar 11 23:40:32 UTC 2005


After applying this patch to mythtv, which worked, I went to compile a clean
mythvideo and it failed because it couldn't find DisplayRes.h and
DisplayResScreen.h in /usr/include/mythtv.  I copied them from the source
libs/libmyth and then all compiled fine.

Just thought you should know.

-Matt



-----Original Message-----
From: mythtv-dev-bounces at mythtv.org [mailto:mythtv-dev-bounces at mythtv.org]
On Behalf Of Daniel Thor Kristjansson
Sent: Thursday, March 10, 2005 1:15 PM
To: Development of mythtv
Subject: Re: [mythtv] [PATCH] Fix (now broken) screen settings

On Thu, 10 Mar 2005, Nigel Pearson wrote:
]	I think the Xv and XVMC videoout stuff is identical
]in the geometry respect (being a derivative work), and I
]did made the same change to both, so both should be good?

I've attached a patch that makes the XVideo and XvMC video out stuff 
work. But you might have to do some work on DisplayResOSX.cpp.

This actually started out as just a patch to improve DisplayRes, so I'll 
describe that first.

At the moment you need to spin in an X and Y resolution for the GUI, 
playback, and the video specific overrides. I've added a GetVideoModes() 
method to DisplayRes that returns all the possible resolutions and the 
valid refresh rates at each resolution. This allows us to just flip 
through the valid resolutions, and I've also modified DisplayRes so 
that you can ask for a specific refresh rate, so you can specify a 60 
Hz refresh rate for playback, while using 85 Hz for the GUI. I've also 
used GetVideoModes() to avoid showing that configuration screen if you 
do not have a system supported by DisplayRes (i.e. non-MacOSX or 
non-XRandR capabable systems). I also made setting the aspect ratio
of the display simpler, by letting the user choose "4:3", "16:9", or 
native, rather than "Alt/Non-Alt"

I made the needed changes to DisplayResOSX, and flushed out that
implementation by implementing GetDisplaySize(). But I don't have
a MacOSX system to compile on so this may not even compile. There
are also a couple calls that I wasn't clear on from reading the
spec, these are marked with my question and "-- dtk"

As far as XVideo and XvMC, the code in tv_play and videoout_xv[mc] was 
assuming that if you were using XRandR you wanted the playback to be 
fullscreen. I've removed that assumption, so "GuiSizeForTV" is still 
respected. Also when switching back from fullscreen the gui was not 
returned to the location it was at before going full screen. I've added
a QRect called saved_gui_bounds to tv_play which allows us to return to 
the original location after running fullscreen for playback.

While I was at it I added initializers for all the instance variables
in tv_play to the constructor. (I encountered a crash due to an 
uninitialized pointer in the TV class, so...)

PS I left in some backward compatible methods in DisplayRes, and did not 
   fully switch videout_xv, and videout_xvmc to the new methods. This is 
   because I have a patch for these in the works and want to minimize 
   rejects...




More information about the mythtv-dev mailing list