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

John Patrick Poet john at BlueSkyTours.com
Mon Mar 21 03:46:56 UTC 2005


John Patrick Poet wrote:

> Daniel Thor Kristjansson wrote:
>
>> 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.
>>
>
> Hi Daniel,
>
> Finally had some time to compile this up.  Found one problem in 
> globalsettings.cpp: line 2964 is not protected by USING_XRANDR, but 
> VideoModeSettings is.
>
> My system is recording right now, so it will be a bit before I install 
> it.  I will try and let you know how it works out later on tonight.
>
> John


First time I ran mythfrontend with this patch in place, it picked a GUI 
resolution that my TV *barely* supported.   The picture was "rolling" 
pretty good.  I was finally able to fumble around enough to get 
"Separate video modes..." turned off.  I was then able restart 
mythfrontend and get to that setup screen and actually, almost, see what 
I was doing.  I typically run my GUI at 888x500 and that setup screen no 
longer fits on the display at that resolution.

After getting everything configured the way I wanted, I "finished" with 
the Appearances section, and the display was re-sized.  Something was 
off, however, because I ended up with a small window in the upper left 
hand corner of the screen, instead of a full screen.

I then tried to go in and watch a recording, but my list of recordings 
was corrupt!  That was scary enough that I did a full abort and 
re-install the previous CVS version I had been running from 16Mar05.  
After going back to 16Mar05, my list of recordings are fine.  I have not 
tried re-installing the 20Mar05 CVS without your patch to see if that 
causes the program listings to become corrupt again, but I assume it would.

I just realized that in my fumbling around in the first step, that I 
managed to get "run in window" selected.  That is probably why I ended 
up with the small screen in the upper left hand corner.

For someone already using "Separate video modes...", the fact that it 
picks a different default video mode for the GUI can be a problem.  I 
*think* it picked 320x200 which is a mode that X must have 
auto-generated, since it is not listed in my xorg.conf file.  I am not 
sure what to do about that.

The next time I try it, I need to remember to turn off "Separate video 
modes..." before I run the patched version of mythfrontend.  
Unfortunately, I probably will not have time to play with it anymore 
until Friday.

John



More information about the mythtv-dev mailing list