Reputation: 133
I have executed AudioPlayer.java example posted by open source community link
I got the following exception
Exception in thread "main" java.lang.IllegalArgumentException: No such Gstreamer factory: playbin
at org.gstreamer.ElementFactory.makeRawElement(ElementFactory.java:180)
at org.gstreamer.Element.makeRawElement(Element.java:92)
at org.gstreamer.elements.PlayBin.<init>(PlayBin.java:119)
at org.gstreamer.example.AudioPlayer.main(AudioPlayer.java:56)
Can anyone give me the solution for this problem?
Thanks in advance.
Upvotes: 1
Views: 5389
Reputation: 2734
This is due to path variables being not set correctly.
If you are using NetBeans 6.9+ then follow these steps
Note: I am assuming that you are working in Windows XP/Vista/7, etc.
In NetBeans Right click "project" -> "properties". Go to "VM Options" in "run" type
-Djna.library.path="[your gstream OSS build classpath1 to bin]:[your gstream OSS build classpath2 to lib]"
Similarly you may need to provide classpath to java here too
-Djava.library.path="[your gstream OSS build classpath1 to bin]:[your gstream OSS build classpath2 to lib]"
Note: You must know where your OSS gstreamer dlls are installed. Typically under "OSSbuild" directory in "Program Files".
Upvotes: 1
Reputation: 334
You need change
PlayBin playbin = new PlayBin("AudioPlayer");
for
PlayBin2 playbin = new PlayBin2("AudioPlayer");
with the version 1.5
Upvotes: 2