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

Windows platform issues #8

Closed
GoogleCodeExporter opened this issue Apr 23, 2015 · 5 comments
Closed

Windows platform issues #8

GoogleCodeExporter opened this issue Apr 23, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

Finally I'm running the SwingPlayer example in the Windows platform, but
with some changes. I also get random crashes but it seems to be a problem
in the gstreamer libraries because I have the same crashes with
gst-launch-0.10.exe. 

I write here the problems and changes to make it run in Windows:

****************
Library loading
****************
I installed the windows binaries from the gstreamer site
(http://gstreamer.freedesktop.org/pkg/windows/releases/ , the setup ones),
and the gtk libraries from the gimp.org site. With this libraries the jna
native library loading fails because some libraries start with libXXX.dll
and others with libXXX-0.dll. To solve this problem I changed the
com.sun.jna.NativeLibrary constructor and added after the first "handle =
open(libraryPath);"

        if (handle == 0) {
            libraryPath = "lib"+findLibraryPath(libraryName, searchPath);
            handle = open(libraryPath);

        }
        if (handle == 0) {
            libraryPath = "lib"+findLibraryPath(libraryName+"-0", searchPath);
            handle = open(libraryPath);         
        }

****************
File playing
****************
In windows the method org.gstreamer.PlayBin receives the URI with an path
that starts with a slash "/C:/myfiles/..." and changes it to
"///C:/myfile/..." which results in a URI "file:///C:/myfile/..." which is
an invalid URI for gstreamer. To solve this problem in Windows I changed
the method with this check:

    public void setURI(URI uri) {
        String uriString = uri.toString();

        // Need to fixup file:/ to be file:/// for gstreamer
        if ("file".equals(uri.getScheme())) {
            if(uri.getPath().startsWith("/")) uriString = "file:/" +
uri.getPath();
            else uriString = "file://" + uri.getPath(); 
        }
        set("uri", uriString);
    }



Original issue reported on code.google.com by dcondev...@gmail.com on 14 Aug 2007 at 4:55

@GoogleCodeExporter
Copy link
Author

Thanks a lot for the bug report.  I hadn't bothered with windows before, since I
couldn't get the gstreamer builds to work on it.

I've done a slightly different implementation of those two fixes, and it seems 
to
work on windows now.

Please do a svn update and rebuild and retry on windows.

Original comment by wmeiss...@gmail.com on 15 Aug 2007 at 2:15

@GoogleCodeExporter
Copy link
Author

Great job! the example.SwingPlayer now works with the svn version in Windows.

The example.Player example still crashes. It seems that in org.gstreamer.Bus in 
the
constructor Bus(Pointer ptr, boolean needRef, boolean ownsHandle) the call to
NativeLibrary.getInstance() fails to load the gstreamer library because it 
hasn't the
check of the different naming convention in Windows libXXX.dll and libXXX-0.dll

Original comment by dcondev...@gmail.com on 15 Aug 2007 at 10:50

@GoogleCodeExporter
Copy link
Author

Ok, I've checked in a fix for that too.

Original comment by wmeiss...@gmail.com on 15 Aug 2007 at 6:26

@GoogleCodeExporter
Copy link
Author

Fixed.
Thanks.

Original comment by dcondev...@gmail.com on 17 Aug 2007 at 7:07

@GoogleCodeExporter
Copy link
Author

Marking as fixed

Original comment by wmeiss...@gmail.com on 18 Aug 2007 at 1:19

  • Changed state: Fixed

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

No branches or pull requests

1 participant