Closed VolodiaPG closed 3 years ago
Yes, it's there as a safety net for unmapped things, or where you want to provide a subclass for a built-in element.
I can't check for sure right now, but IIRC I think the problem is that the file should be called org.freedesktop.gstreamer.glib.NativeObject$TypeProvider
. This is something that works so much better with Java modules!
Also, be careful about your hierarchy - you should be extending Clock here I think? Type hierarchies should match between Java and GStreamer.
Thank you! That was exactly it.
I went a bit crazy testing things and simplified the hierarchy in the process.
So now everything is working except for the function I am trying to bind gst_ntp_clock_new which gives me an UnsatisfiedLinkError
. This particular function is located inside gstpbutils-1.0.lib
. I have seen that in GstNative
the libs seem to be loaded by format (*-1.0). Is it loading all the libraries or can I add somewhere the libraries I want gst1-java to load ?
You'll need to use the overload of GstNative::load that takes the library name then. Default is (lib)gstreamer. See eg. AppAPI.
Your help has been so valuable, thank you (again)!
I surely was a bit tired not to see the overload of the method that I was debugging in, sorry for that...
Everything is now working like a charm, and looking so clean & easy to do!
P.S. For posterity's sake:
gst_ntp_clock_new
is actually located inside gstnet
.
No problem. Do sign up for / use the mailing list if you have any follow up queries. I generally prefer to do support there as the answers get to a wider audience. I realise this particular feature could do with more documentation, although it is partly an escape hatch - and do be aware that relying on lowlevel APIs might break between versions.
Hello,
While implementing my pipeline, I came across a missing function in the Clock part of these bindings. The NTP clock is not present. Which should not be a big deal because I spotted a mechanism to add new bindings from the exterior thanks to the use of the service loader to register bindings.
So I went on and implemented the following code:
And in
resources/META-INF/services/org.freedesktop.gstreamer.glib.NativeObject.TypeProvider
I havecom.toto.types.Types
, which is the path to my implementation of the TypeProvider interface.What I have understood is that this should be sufficient to be registered by gst1-java.
The issue is that as far as I have tested, nothing happens. The service provider doesn't seem to be able to find this service. (I also tested with a small test, with the interface defined only in my maven module, and this particular case works).
My conclusions are that either:
Thank you for your consideration,
P.S. I also tried the following after some debugging in the library showed that nothing happened
And it doesn't write anything on stdout.