gBroutin / gstreamer-java

Automatically exported from code.google.com/p/gstreamer-java
0 stars 0 forks source link

Internal data stream error #67

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
Request for help should be placed on the gstreamer-java group, not as an issue.

Original comment by tsha...@gmail.com on 21 Dec 2010 at 10:42