Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on 32 bit windows #11

Closed
lancevalour opened this issue Apr 5, 2016 · 5 comments
Closed

Not working on 32 bit windows #11

lancevalour opened this issue Apr 5, 2016 · 5 comments

Comments

@lancevalour
Copy link

Video freezes at the first frame when running on 32 bit windows. Works fine on 64 bit windows.

I am using gst1-java-core-0.9-SNAPSHOT.jar and jna-3.4.0.jar, and GStreamer 1.0 32 bit. GStreamer command line works fine too.

Did anyone see this and how to solve it? Thanks.

@woglinde
Copy link
Contributor

woglinde commented Apr 7, 2016

Try to run your application from cmdline or yout IDE with GST_DEBUG=3 set. Here is an overview about all enviroment variables you can set. https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gst-running.html

@neilcsmith-net
Copy link
Member

Please can you provide a bit more information -

  • What exactly are you running - Pipeline.launch(), the example, something more complex?
  • What date is the snapshot jar?
  • Are you really running JNA 3.4.0? I'm surprised that works at all as gst1-java-core uses features added in JNA 3.5. Please try with an up-to-date JNA.
  • Which actual version of GStreamer 1.x are you using?

Thanks, Neil

@lancevalour
Copy link
Author

  • Code I am running:
private static void loadGStreamerLibraries() {
    String binpath = "C:\\Users\\ZhangY\\Desktop\\gstreamer\\1.0\\x86\\bin";

    File dir = new File(binpath);
    for (File f : dir.listFiles()) {
        if (f.toString().endsWith(".dll")) {
            try {
                Native.loadLibrary(f.toString(), DummyLibrary.class);       
            }
            catch (Exception e) {

            }
        }
    }
}

public static void main(String[] args) {

    loadGStreamerLibraries();

    Gst.init("Test", args);

    final Bin bin = Bin.launch("autovideosrc ! videoconvert ! capsfilter caps=video/x-raw,width=640,height=480", true);

    final Pipeline pipe = new Pipeline();

    SwingUtilities.invokeLater(new Runnable() {
                @Override
        public void run() {
            SimpleVideoComponent vc = new SimpleVideoComponent();
            vc.setLayout(null);

            pipe.addMany(bin, vc.getElement());
            Pipeline.linkMany(bin, vc.getElement());

            JFrame f = new JFrame("Camera Test");
            JPanel panel = new JPanel();
            panel.add(vc);

            f.add(panel);
                        vc.setPreferredSize(new Dimension(640, 480));
            f.pack();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

            pipe.setState(State.PLAYING);

            f.setVisible(true);
        }
    });
        Gst.main();
    pipe.setState(State.NULL);

}

@lancevalour
Copy link
Author

Btw, I am using JRE 1.8.0_77 32 bit. And my machine is Windows 7 64 bit.

@neilcsmith-net
Copy link
Member

However, when I use the JNA 4.2.2, it is working.

In which case, I'd guess you're triggering a bug in JNA that's been fixed. Sorry, but if it works with latest JNA then I'm going to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants