I'm writing a custom video player for Raspberry Pi that uses ffmpeg for decoding the video and OpenGL on top of GDB and DRM to render it.
To decode video on Raspberry Pi, ffmpeg has to be compiled with MMAL enabled as that's the recommended API for HW accelerated video decoding.
The problem:
Almost all libraries are located in standard path, except MMAL, which is located in /opt/vc/lib/libmmal.so
.
Sure, the first thing that everybody thinks of is, just add -L/opt/vc/lib
, but it's not that simple:
- I'm also using
/usr/lib/libEGL.so
in my program, provided by Mesa. - There's also
/opt/vc/lib/libEGL.so
which I don't want to use because it's the legacy implementation that doesn't work for my case.
If I add -L/opt/vc/lib
, it will prioritize that path and pick up the wrong library /opt/vc/lib/libEGL.so
.
Is there a way to do something like -L/opt/vc/lib
but only for one specific library, while for other libraries it keeps using the standard path? Or is there any other way to solve this problem?
I tried stuff like -l/opt/vc/lib/libmmal.so
and that didn't work and I wasn't able find much help, since this is a very specific problem.
Bonus points to anyone, who also knows how to do the same thing in CMake.