Sorry maybe stupid question but i dont know how control playbin i start
gstremer playbin as thred and then i would like use method like .. get,set like
... setvolume, play, stop ect. But I don't know how ? Can anybody help me?
eg. if I stop thred ... gstremer still playing ... definitly I doing someting
wrong but I don't know what.
here is my simple code?
public class AudioPlayer implements Runnable{
Thread tr1 = null;
public AudioPlayer() {
tr1 = new Thread(this);
tr1.start();
}
public void run(){
Gst.init();
String mp3 = System.getProperty("user.dir") + "/data/audio/music.mp3";
PlayBin playbin = new PlayBin("AudioPlayer");
playbin.setVideoSink(ElementFactory.make("fakesink", "videosink"));
playbin.setInputFile(new File(mp3));
playbin.setState(State.PLAYING);
Gst.main();
}
public static void main(String[] args) {
AudioPlayer pb = new AudioPlayer();
Thread thread = Thread.currentThread();
System.out.println(thread.getId()+" "+ thread.getName());
}
}
Original issue reported on code.google.com by Michal.S...@gmail.com on 19 Dec 2010 at 10:26
Original issue reported on code.google.com by
Michal.S...@gmail.com
on 19 Dec 2010 at 10:26