Include ofxOMXPlayer on Raspberry Pi, not on regular Linux, addons.make


#1

Hi! I am facing an issue here. When using addons.make. Compile on Linux 64bit crashes, because ofxOMXPlayer is not for it. It is needed by Raspberry Pi Linux though. How to make it compile on both?


#2

You could include the ofxOMXPlayer only if you are on the raspberry pi

#ifdef TARGET_RASPBERRY_PI
    #include ofxOMXPlayer
#endif

Keep in mind that ofxOMXPlayer is not 100% drop in replacement for the ofVideoPlayer so you’ll have to put a lot of #ifdef all over your code…

If you want to keep compatibility on both platform I suggest using ofVideoPlayer instead of ofxOMXPlayer.
There is a trick to activate hardware acceleration described here :
play-video-controlling-speed-and-direction raspberry pi

Happy coding.


#3

Thanks @gilmar! Yes, hardware acceleration might be exactly what I would need from ofVideoPlayer. Will try.


#4

Gstreamer can already use the hardware acceleration, openmax technology.