[mythtv] [PATCH] OSD glitch - starts as 4:3 and corrects to 16:9
devel at mrwire.co.uk
Thu May 24 22:39:05 UTC 2007
On Fri, 2007-05-25 at 08:21 +1000, Matt Doran wrote:
> Daniel Kristjansson wrote:
> > On Thu, 2007-05-24 at 23:45 +1000, Matt Doran wrote:
> >> It wasn't the constructor. It took me a while to figure out how the
> >> video playback process works ... but I got there eventually. :) In a
> >> method in NuppelVideoPlayer called OpenDummy which sets up the dummy
> >> video while waiting for the channel to tune.... it sets the video size
> >> arbitrarily to 720x576 and aspect of 1.3333. At this point we don't
> >> have access to the display size. We don't know that until in the
> >> InitVideo method.
> >> So my fix was to set the force the video aspect to the display aspect if
> >> we're in dummy mode. It works very nicely. Now when I start to watch
> >> live tv, the OSD appears at the full width (16:9). I don't get the
> >> ugliness of switching from the default 4:3 to 16:9 when the video starts.
> >> The patch was only a couple of lines, and it results in much more
> >> polished results. :)
> >> What do you think?
> > It looks like a decent enough hack. It will still chose the
> > wrong video aspect ratio whenever you view a non-16:9 stream
> > on a 16:9 screen, but at least it will default to filling the
> > screen for 16:9 screens so it's an improvement. What I would
> > like to see down the road is some intelligent guessing as to
> > the aspect ratio. If we are about to view channel X and the
> > last time we viewed it the resolution and aspect ratio were Y,
> > then we should start with Y when we start on channel X. If we
> > are using xrandr we really want to minimize these changes.
> > Can you open a ticket with your hack?
> Will do.
> I realise it was a bit of a hack. When the dummy video is setup we
> don't have access to the display dimentions, so had to adjust the aspect
> when we're initialising the video.
> My theory was that it's no worse than we've got now. It's also a hack
> to assume you have 4:3 display, so I figured we may as well use the
> aspect of the display as a best guess. I'm in Australia, where all our
> DVB broadcasts are 16:9. So this works nicely for me.
> I realise it could be smarter, but it's a start. ;)
Maybe a better option would be to add a database setting for screen
aspect ratio. Would have to be a per-frontend setting but I can't
imagine it changing very often once it's set.
More information about the mythtv-dev