jvcleave / ofxOMXPlayer

OpenMax accelerated video player for openFrameworks on the Raspberry Pi 0-3. Does not work with RPI4
GNU General Public License v2.0
180 stars 61 forks source link

can't get drawCropped to work #154

Closed robin-price closed 5 years ago

robin-price commented 5 years ago

I don't seem to be able get drawCropped to produce anything but black output even when using the bunny mov.

jvcleave commented 5 years ago

Do you have textures enabled? I am pretty sure drawCropped only works in direct mode

robin-price commented 5 years ago

I'll try turning it off and working from the direct mode example.

jvcleave commented 5 years ago

with texture mode you should be able to use drawSubsection

omxPlayer.getTextureReference().drawSubsection(0, 0, 100, 100);
jvcleave commented 5 years ago

Didn't test the above but check this

https://openframeworks.cc//documentation/gl/ofTexture/#!show_drawSubsection

robin-price commented 5 years ago

Thanks. Just got it working in the direct mode example.... and yup works in application! Thanks.

Might try the subsection tip but I think I can get away without needing textures, was just considering whether to to run it through a shader and resample it but that looks a lot easier.