[Mplayer-dev-eng] libvo2 design

Arpi arpi at thot.banki.hu
Fri May 25 13:43:19 CEST 2001


Hi,

I'm thinking (and working) about new libvo interface and design.

The base concept:

code will be split to 2 main part: common 'general' stuff (inside libvo2)
and driver-dependent stuff (in driver plugins).

drivers won't do image conversion and copy, just initialize and setup device
and allow accessing the surface directly.

draw_frame,draw_slice,osd renderer etc will be implemented in the libvo
general stuff. this way we reduce redundant code, and share features like
software scaling, conversion etc between drivers.

additionaly this design allows direct rendering (decoding directly to the
surface (XImage, Xv buffer, SDL surface, video mem etc)
it's _very_ fast, but doesn't work together with double buffering.

So, in the new design, libvo2 drivers will have these functions:
- init() - to open device and get features, supported modes, screen res. etc
- control()  - to set/get/query driver-dependent features, parameters
- query() - get information/features about a given pixel format, like:
              - hw scaling supported
              - surface in system or video ram
              - which buffering methods are supported
- start() - open window/switch mode etc, so get ready for drawing the frames
- get_surface() - get pointers, stride, pixel format for the device
- flip_image() - to do blitting, buffer swapping
- stop() - close window/restore vidmode etc.

I also want to add support for 3 buffering method:
0: copy: single temporary buffer (can be modified by driver)
1: direct avi: single static buffer (must be reserved, read-only by the driver)
2: direct mpeg: 2 static and 1 temp buffer (for Pf,Pb,B frames)
(Double buffering doesn't allow single static buffer)
Normally it's enough to implement type 0 (current libvo implements only this),
but for direct rendering 1 and/or 2 is required.

Comments? SUggestions?
I'll commit my initial sample code today (to CVS/main/libvo2).


A'rpi / Astral & ESP-team

--
mailto:arpi at thot.banki.hu
http://esp-team.scene.hu

_______________________________________________
Mplayer-dev-eng mailing list
Mplayer-dev-eng at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-dev-eng



More information about the MPlayer-dev-eng mailing list