Hi all,
I was trying to playback an avi file by using the following code
public static void main(String[] args) {
System.setProperty("jna.library.path", "C:\\Program Files\\OSSBuild\\GStreamer\\v0.10.6\\bin\\");
Gst.init("sampleplay", args);
final Core core = new Core();
core.pipeline = new Pipeline("sample");
core.src = ElementFactory.make("filesrc", "sample_src");
core.demux = ElementFactory.make("avidemux", "demux");
core.vqueue = ElementFactory.make("queue", "vqueue");
core.decodebin = ElementFactory.make("decodebin", "decodebin");
core.color = ElementFactory.make("ffmpegcolorspace","color");
core.scale = ElementFactory.make("videoscale","scale");
core.src.set("location", "C:\\sample.avi");
core.pipeline.getBus().connect(new Bus.ERROR() {
public void errorMessage(GstObject source, int code, String message) {
System.out.println("Error occurred: " + message);
// Gst.quit();
}
});
SwingUtilities.invokeLater(new Runnable() {
public void run() {
VideoComponent videoComponent = new VideoComponent();
core.sink = videoComponent.getElement();
JFrame frame = new JFrame("Swing Video Test");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(videoComponent, BorderLayout.CENTER);
videoComponent.setPreferredSize(new Dimension(720, 576));
frame.pack();
frame.setVisible(true);
core.pipeline.addMany(core.src,core.demux,core.vqueue,core.decodebin,core.color,core.scale,core.sink);
Element.linkMany(core.src,core.demux,core.vqueue,core.decodebin,core.color,core.scale,core.sink);
core.pipeline.setState(State.PLAYING);
}
});
}
and once i tun it i get an error from the bus "Error occurred: Internal data
stream error". I have run this video through gst-launch with no issues. Could
you please tell me what i might be doing wrong here ?
Original issue reported on code.google.com by satish.s...@gmail.com on 19 Dec 2010 at 9:01
Original issue reported on code.google.com by
satish.s...@gmail.com
on 19 Dec 2010 at 9:01