Closed czaurel closed 3 years ago
Thanks. Be interesting to see exactly where that's failing. If that fixes things for you then please feel free to add in https://github.com/gstreamer-java/gst1-java-core/blob/master/src/org/freedesktop/gstreamer/Gst.java#L670 There's one type provider per package, to keep the constructors package private. It should be listed there - that's a mistake. In general usage it's falling back to the old behaviour at https://github.com/gstreamer-java/gst1-java-core/blob/master/src/org/freedesktop/gstreamer/glib/NativeObject.java#L188
Hopefully now fixed by #220 but not sure how best to test this issue. Please check with master before 1.3 release if you can - will close but can reopen if further issues seen. And if you have thoughts on a useful test, please suggest. Thanks!
The facedetect plugin from gst-plugins-bad posts bus messages about detected faces which contain value lists of structures.
Trying to get the values via
Structure.getValues(Class<T> type, String fieldName)
results in an exception:My current workaround was to use
register(TypeRegistration<?> registration)
for adding a registration like this:Natives.<Structure>registration(Structure.class, "GstStructure", Structure::new)
. This requires using a non-public API though.If there is no other reason for omitting it,
Gst.init()
should probably register a type adapter like this inGst.loadAllClasses()
. I'm not exactly sure whichTypeProvider
should provide it though.If this seems like a good idea, I'll throw together a PR.