[MPlayer-G2-dev] libvo2 api/design problem

Arpi arpi at thot.banki.hu
Mon Jul 7 23:14:00 CEST 2003


Hi,

There is soem design issue with the X11 and non-X11 vo2 drivers.
As we decided & implemented, vo drivers doesnt have window management
code, they receive display (at preinit) and window (via control) IDs
and render the image there. I won't plan to change this!

The only problem, is that it isn't visible from outside if a given vo
driver uses X11 or not. So currently (in pre33) every vo driver gets
an X11 window (even -vo null)...

The original idea was that open X11 if available (vo_x11_init()), and
pass teh display ID/handle to vo's preinit() function, so drivers
supporting X11 can access the connection (and check device/driver caps,
like Xv, DGA or GLX availability).

But we have to know if the given driver actually uses that X11 handle,
or ignored it. Currently this is not solved.

Now when a vo driver is configured, vo->event_callback is called
wiht VO_EVENT_CONFIG, so the event handler can open a window and set
it via the VOCTRL_SET_WINDOW control().

I 2 possible solutions:
1. assume that every vo device with name beginning wiht char 'x' is x11
   device. so xv, xmga, xvidix, xgl...
   it sounds quite lame, but this is the only way to know if a driver is
   x11 or non-x11 driver, before calling preinit(). it may be interesting
   for a GUI or even for a CLI app to know which drivers require X11 or
   which drivers won't use X11 (if the GUI has embedded winde, liek a
   browser plugin).
2. instead of using VO_EVENT_CONFIG to requiest teh window, we could
   define VO_EVENT_SET_WINDOW or so, so x11 drivers can ask for a
   window (at config()) if not yet set (via control()).


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