[MPlayer-dev-eng] Questions about vo driver implementation
Arpi
arpi at thot.banki.hu
Mon Jul 5 14:03:39 CEST 2010
Hi,
> I'm trying to rewrite vo_directfb according to current changes
> in directfb and mplayer. There are some points inside mplayer
> which are not clear for me.
>
> 1) flag MP_IMGFLAG_SWAPPED - means swapped Cr and Cb planes in
> mpi->planes/stride
>
> question - flag should be set or honored by get_image ?
no
> - is flag also active in put_image (eg. don't
> ignore it) ?
it's informal thing. you don't have to use it, nor set it.
it's set for colorspaces with swapped plane order than usual - so for i420
yuv and rgb (normal is bgr). it can simplify your code if you have to handle
normal and swapped case, so you don't have to check for colorspace fourcc
but this flag... but all this is optional, and currently not used at all
> 2) in put_image (VOCTRL_DRAW_IMAGE - hmm could we use same
> identification for this in libvo.txt, libmpcodecs ...)
>
> how to detect if I have image already in my buffer (previously
> exported in get_image & dr active)
> and thus I just only return VO_TRUE?
> Is flag MP_IMGFLAG_DIRECT sufficient for this
> purpose?
yes.
anyway most drivers needs to start some blitting or finish buffering even
with direct rendering - this is the reason of this call is done for DR too.
if you don't want to do something when image is rendered, just return
VO_TRUE.
> flag MP_IMGFLAG_DRAW_CALLBACK - is this flag useful/significant
> for vo driver or just ignore it?
if you don't implement draw_slice() at all, or don't want it to be called,
then you have to reset (clear) this flag in get_image.
normally if teh codec and vo both has slice support, and no DR available,
then draw_slice is used for partial per-slice blitting...
the ideal case:
- draw_slice and VOCTRL_DRAW_IMAGE and _GET_IMAGE are implemented
A'rpi / Astral & ESP-team
--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
More information about the MPlayer-dev-eng
mailing list