basic problem with clock

60 views
Skip to first unread message

robw

unread,
Dec 30, 2008, 7:03:52 PM12/30/08
to gstreamer-java
Hi,
sorry for another nooby question:

still making first steps with gstreamer, before I want to go on with
video and effects, i wanted to set up a basic audio-player. Using
playbin as in the tutorials works fine, but I'd like to make a custom
pipeline. Here's what I tried according to the examples from the
repository:

import org.gstreamer.Element;...

/**class to set up an own pipeline for playing audio-files**/

public class MyAudioPipePlayer {

public static void main(String[] args){

//handle no file situation with msg + exit
if(args.length<1){
System.out.println("start with path to audiofile as argument!");
System.exit(0);
}

args = Gst.init("AudioPipeline", args);

Pipeline pipe = new Pipeline("AudioPipeline");

Element src = ElementFactory.make("filesrc", "source");

//beeing unsure if the set-method is right, I also
tried
//"((FileSrc)src).setLocation(args[0]);" which changed
nothing (appearently)
src.set("location", args[0]);

Element sink = ElementFactory.make("alsasink", "output");
pipe.addMany(src, sink);

src.link(sink);

pipe.setState(State.PLAYING);
Gst.main();
pipe.setState(State.NULL);
}
}

I get the following error message in eclipse:
"(AudioPipeline:31211): GStreamer-CRITICAL **:
gst_clock_set_calibration: assertion `internal <=
gst_clock_get_internal_time (clock)' failed
"
I am still working through the gstreamer aplication development
manual, but the chapter on clocks didn't really help me...

another question: where can I find information on the names of the
specific elements for the java binding. what I mean is, I figured out
from the examples in the repository that i can use "fakesrc" and
"filesrc", "audioresample" or "audioconvert" as params, when creating
elemets with ElementFactory.make(...); is there a list, which string
names are available and what element they correspond to? I didn't find
something in the api on that..

thanks a lot for any hints for the clock problem and/or where I can
find the needed information!

happy 2009!

rob

Tal Shalif

unread,
Dec 31, 2008, 2:50:38 AM12/31/08
to gstream...@googlegroups.com
As a rule of thumb, if possible,  you need to make sure your pipeline work  from the command line (using gst-launch) before trying to make it work via Java. Then you can copy your pipeline as-is and and use Pipeline.launch() and incrementally change it afterwards.

2008/12/31 robw <robwi...@googlemail.com>



--
Tal Shalif
+81-90-9688-2696
Reply all
Reply to author
Forward
0 new messages