[MPlayer-dev-eng] [PATCH] Make aa video output a bit more workable

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Mar 7 22:03:50 CET 2011



On 7 Mar 2011, at 10:32, Clément Bœsch <ubitux at gmail.com> wrote:

> On Mon, Mar 07, 2011 at 10:48:30AM +0200, Alessio Ababilov wrote:
>> The old test method for "linux" aa driver checks file named like
>> /dev/vcsa01. Now udev names such files like /dev/vsca1. The problem is
>> fixed by checking both /dev/vsca1 and /dev/vcsa01. The old method of
>> checking if the file is writable uses fopen(fname, "w+"). It causes
>> /dev/vcsaXX to be created if it doesn't presents and the user can write
>> to /dev. The new method is to use open(fname, O_WRONLY).
> 
> I don't really see the point of replacing fopen with open, but I don't
> really care.

Yes, that really doesn't belong in that patch.

> 
>> diff -Naur mplayer-b/libvo/vo_aa.c mplayer-c/libvo/vo_aa.c
>> --- mplayer-b/libvo/vo_aa.c    2011-03-07 10:40:02.000000000 +0200
>> +++ mplayer-c/libvo/vo_aa.c    2011-03-07 10:37:25.000000000 +0200
>> @@ -678,6 +678,9 @@
>> 
>>         /* initializing of aalib */
>> 
>> +    if (monitor_pixel_aspect == 1.0) {
>> +    monitor_pixel_aspect = 0.5;
>> +    }
> 
> nit: extra braces. But I don't care either :)

That's not a good idea anyway really. With the right resolution characters can be square.
_ideally_ monitor_pixel_aspect would be initialised to some invalid value like -1, and the vo would unconditionally set a monitor_pixel_aspect_default value. aspect.c would then figure out which to use.
Like that there would be no strange behaviours with some -monitor-pixel-aspect arguments and it would also work if for example the monitor pixel aspect would change between files, e.g. because the files have different values for -xineramascreen (only relevant once vo xv for example tries to auto-detect the value).


More information about the MPlayer-dev-eng mailing list