This example works as there is already a customer-lib named libsample_process.so.
Now i want to create my own customer-lib for manipulating the frames in different ways.
Is there somewhere an example or documentation how to compile your own .so file and which functions it must contain for that purpose?
Probably the biggest hurdle is if you want to use something with a namespace, e.g., from C++. If so, keep in mind the idea of a factory design pattern, where the library code and a factory function are in the library, with new objects in your program using the factory to create the object. Otherwise it is fairly straight-forward.
The problem is not to create an arbitrary .so file.
But I don’t know which functions get called by the nvivafilter element and what the input/output of those functions does look like. I couldn’t find any informations about this. If I use the nvivafilter with an arbitrary .so (even an non existing one) it also seems to work. I cannot see any difference in the video output when I compare this line of code (lib=libsample_process.so):
The only different thing I see is that in the console output of the first gst pipeline there are some messages appearing stating cuGraphicsEGLRegisterImage failed: 304
These are missing when I use the second gst pipeline.
So I guess the first pipeline is doing something (I don’t know what) while the second isn’t.
What I want to do is to manipulate the frames of the videooutput of the camera. And my first guess was that the nvivafilter could be the right element for doing this. But I’m not sure :/
I do not know how customer-lib-name is used in gst-launch. There could be a number of ways it looks for libraries, including through the system’s linker (in which case ld…the linker…would have to have the library in its path), or by some specific gst-launch directory setting.