[MPlayer-dev-eng] aspect ratio with OSD

D Richard Felker III dalias at aerifal.cx
Sun Jan 23 18:06:47 CET 2005


On Sun, Jan 23, 2005 at 05:33:57PM +0100, Csillag Kristof wrote:
> 2005-01-23, v keltezéssel 14.36-kor Csillag Kristof ezt írta:
> > The problem is that we render the subtitles _before_ the scaling up at
> > playback time, and we have no idea about what size (or more importantly)
> > aspect will it be scaled to. Of course the information is available
> > somewhere in mplayer's dataspace, but the vobsub rendering module is
> > obviously not aware of it.
> So.
> 
> Basically, the problem is that aspect ratio is not passed to the OSD
> level by the VO drivers; every function call exported from the
> OSD level only takes two parameters, width and height, and because the
> VO drivers can do rescaling (like Xv), we can not calculate the aspect
> from this.
> 
>  * * *
> 
> If we want to render OSD elements (both text subtitles and VOBsub
> subtitles) with correct aspect rate, we must get the necessary
> information from the VO drivers.
> 
> So, we have to opinions:
> 
> 1. To modify every OSD call in every VO driver,
> 	to include this one extra parameter besides
> 	the width and the height. (~70 lines.)
> 
> 2. To save this aspect rate (as displayed on the monitor) somewhere
> 	when we set up the VO driver in vf_vo, and later use this value
> 	from the OSD layer.
> 
> (2) would require much less work, but is ugly, because until now, all
> information from vf_vo level to the OSD level was flowing via the actual
> VO drivers (like X11, xv, etc.), so smugling this information directly
> to the OSD layer (bypassing the VO drivers) would go agains the design
> principles... but this would not stop it from working.
> (And the codebase already looks like a haystack, anyway.:)
> 
>   * * *
> 
> Someone with authority should tell me: which opinion should I take?

I vote for option 1. MPlayer already has too many bad hacks with
global vars.

Rich




More information about the MPlayer-dev-eng mailing list