StreamVolume.getType() only returns null #295
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
java
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
java-gi/java-gi#295
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I am currently trying to use Gstreamers Bin.getByInterface method to obtain an object which implements StreamVolume
from my pipeline. This method takes a org.gnome.glib.Type as an argument.
However, if I try to obtain this by calling StreamVolume.getType(), it always returns null even though
it is a static method. I currently use jars built from main.
This happens when the native library hasn't been loaded. Add this line at the start of your app:
All classes in the GstAudio module have this line in a static initializer block, so this is triggered automatically by Java's classloader. But interfaces don't support static initializers, so when you use an interface (before a class), you need to manually force the initialization.
Ok, good to know. Thanks.