jvcleave / ofxOMXPlayer

OpenMax accelerated video player for openFrameworks on the Raspberry Pi 0-3. Does not work with RPI4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

draw rectangle without texture mode

micha1pu opened this issue · comments

Is it possible to draw in direct video mode? Omxplayer can set video render layer number via --layer. When I run sketch with direct video mode I can see for 0.5s "bottom" layer with my rectangle, but rectangle is being overdraw by video. Texture mode is not fast for 1080p video.

There is an omxPlayer.setLayerbut I haven't tested it much

Yeah - As mentioned in the Readme, texture mode works best at 720p

I'm getting Segmentation fault when omxPlayer.setLayer(1) in setup. But anyway i don't think it will force video layer to bottom and OF will draw on top of it, they will be still on same layer i think.

the layer property is probably something that should be passed via settings to make sure the player is ready to accept it. in the meantime you should be able to set it in draw() to avoid the exception

I was messing with it a bit and was able to change it but had to tweak the window settings in order to layer things properly. I'll post an example once I get some things worked out

I added a layer option to ofxOMXPlayerSettings and example-direct-mode-advanced

I put everything in one file as it is important to see the window setup code in main()

This also requires a mod to OF so see the note

It's working perfectly, thank you.

commented

that's really great!