This is the code I wrote in J2SE with Native java wrapper for Gstreamer. But alas it does not work in Web Browser, I am very upset what I can do now, I have no alternative to end this project.
IS it impossible to use audio/video with Java Applet for Gstreamer or To build a CD/DVD quality audio? (this is not targeted for world wide web, only web browsers between peer to peer or peer to 10 peer).
ex: working sample as j2SE but same code does not ever work with java applet from browser.
package audio;
/* Audio, Global class */
import org.gstreamer.*;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
// Used via applet:
// <applet code="sipphone.MainApplet" width=600 height=600 archive="Audio.jar" >
public class MyGst
{
public static void runit()
{
Gst.init();
Pipeline pipe = new Pipeline("MyGst");
Element src = ElementFactory.make("autoaudiosrc", "Source");
Element sink = ElementFactory.make("autoaudiosink", "Destination");
pipe.addMany(src, sink);
src.link(sink);
pipe.setState(State.PLAYING);
Gst.main();
pipe.setState(State.NULL);
}
}
Note: Follow up: In any web browser this native way works, when you have java. So JAVA applet works in any browser. Those who are like me, faced this problem, do not get confused.