[MPlayer-G2-dev] pre34 & vf/vo resize problem
Arpi
arpi at thot.banki.hu
Sun Jul 13 01:23:04 CEST 2003
Hi,
pre34:
- networking enabled again (STREAMING -> MPLAYER_NETWORK rename)
although mms/mmst seems to be broken :(
- initial subtitle support patch by Albeu
- 'flags' field added to module_info_t
- some compiler warnings fixed
- (x11) event handling docimented in libvo2.txt in more detail
- obsolete 'flags' removed from vo2's config() parameters
- VO_MODULE_CAPS_* defined
- some cleanup of x11_common.c, renamed to x11_helper.c and event.c
and introducing yet another problem for discussion, mayeb you have
better ideas than me:
there are several vo drivers without scaling ability.
(and there are some with limited scaling, left them for now).
in g1 we included swscaler support in all of them to workaround this.
of course it isn't acceptable in g2.
i found 2 ways to solve:
1. simple, g1-like but cleaner method: include swscaler support into
vf_vo2, the vf->vo wrapper. so if it receives scaling request, but
vo is not capable of scaling, it will use swscaler instead of memcpy.
advantages: easy to implement, less errors possible
disadvantage: doesnt use filters, so even if there is scale in the
filter path, it wont be used but yet another swscaler.
(vf_scale right before vf_vo2 may be workarounded by ugly hacks)
2. complex but very interesting solution:
add controls to filters changing size and/or aspect to convert
between src/dst sizes (both direction).
so when the user resizes the window to X*Y, this control would be
launched from vd to get the resulting image sized to X*Y.
Ok it isnt so simple to implement, imho you need at least 2 controls:
one to calculate the d_width/d_height for first vf to get X*Y at the
end of filter path, and one to setup scaling/resizing in filters.
(maybe the second one can be (shoudl be?) replaced by config() re-call?)
advantages: utilizes vfilters. allows not only scaling, but for example
crop/expand and other resizing filters to be used to change window size.
Can use scale before other filters, for example -vop expand=0:-100,scale
will scale the iamge up when you resize the window, but always keep the
constant 100 pixel height black band under the image for the subtitles.
disadvantages: very complex, requires new/extra code in many vf_*
any better idea?
or ideas how to implement 2. ?
(my control/config method is even too complex to describe here...
i'm thinking on it for 2 days already, but always find new problems)
A'rpi / Astral & ESP-team
--
Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu
More information about the MPlayer-G2-dev
mailing list