Freej / FreejScriptingWhishlist / ViewPort
ViewPort() - Open up many output Windows on any X screen. It uses a XVideo Surface. This provides us with zooming (and smoothing) with no CPU costs!
Every GPU supports at least one Xv surface per screen and some with RGBA input! However the XvAttributes like colour correction, hue etc. don't work.
try { vp = new ViewPort(300,200,":0"); echo("OK:" + vp); add_layer(vp); } catch (e) { echo("Shit: " + e); // maybe the port is busy }
press @ in freej console to enable black matte, but some movies and images on the stage. move the ViewPort through the layers! Use ctrl-a to set zoom and position.
tested GPU:
- ATI: gpl driver RGBA is broken (distorted), there are some fixes in the latest xorg git but cropping still broken
- ATI: fglrx don't know, can't detect the DVI/VGA outputs ...
- (RV350)
- VIA Unichrome (beTV): one RGBA surface, works good!
- nvidia gpl driver: no Xv support.
nvidia with proprietary driver: nice support! >100 surfaces on one screen possible. I guess they did it with opengl.
- matrox: gpl driver: Xv support, but no RGBA. Also, the dual head needs binary only module. (G4??)
Useful tools to play with:
- xvinfo queries card, should show
Number of image formats: 8 id: 0x41424752 (ABGR) guid: 52474241-0000-0010-8000-00aa00389b71 bits per pixel: 32 number of planes: 1 type: RGB (packed) depth: 32 red, green, blue masks: 0xff0000, 0xff00, 0xff The ABGR is a bug in the xvinfo tool should be RGBA ... ppc
- xvattr get and set values ... maybe expose some to JS
bugs / todo
- no XEvent handling, freej crashes when XV window will be closed
Xevents like keys,resize ... -> JS Controller()
- automate resize/zoom (via JS ;))
- apply filter chain