Issue 104 in gstreamer-java: Making gstreamer-java work with binaries from gstreamer.com

132 views
Skip to first unread message

gstream...@googlecode.com

unread,
Jun 22, 2012, 7:42:17 PM6/22/12
to gstream...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 104 by john.hen...@gmail.com: Making gstreamer-java work with
binaries from gstreamer.com
http://code.google.com/p/gstreamer-java/issues/detail?id=104

I recently found http://www.gstreamer.com/ which offer what appears to be
Windows binaries for gstreamer that are not over a year old. It gives me
some new hope of integrating gstreamer in my program (as the ossbuild
binaries crash too often).

I'm trying to get this to work with gstreamer-java.

The first thing I noticed is that their main dll is
called "libgstreamer-0.10-0.dll". GStreamer-java doesn't pick this up,
renaming it to "libgstreamer-0.10.dll" works, but then I get this output:

(javaw.exe:6692): GStreamer-WARNING **: Failed to load
plugin 'C:\Local\GStreamer\2012.5\x86\lib\gstreamer-0.10\libgsta52dec.dll':
`C:\Local\GStreamer\2012.5\x86\lib\gstreamer-0.10\libgsta52dec.dll': The
specified module could not be found.

(javaw.exe:6692): GStreamer-WARNING **: Failed to load
plugin 'C:\Local\GStreamer\2012.5\x86\lib\gstreamer-0.10\libgstadder.dll':
`C:\Local\GStreamer\2012.5\x86\lib\gstreamer-0.10\libgstadder.dll': The
specified module could not be found.

(and 50 orso more for all the other plugins).

The files are in the location it says they are, but it doesn't want to load
them apparently. Any idea what this could be?

Neil C Smith

unread,
Jun 23, 2012, 7:09:48 AM6/23/12
to gstream...@googlegroups.com
Hi,

That sounds odd - pretty sure the GStreamer-Java code looks for the
"-0" suffix already?! I'm not sure how DLL's reference each other,
but if by name that might explain the error with the plugins.

Slightly OT, but I've recently forked Andres work on library loading
from Processing for Praxis. It would be good to get a generic version
of that that works with the gstreamer.com binaries, and I would be
happy to contribute to that. Could / should it be part of the
GStreamer-Java code base or a separate library on here?

Best wishes,

Neil

--
Neil C Smith
Artist : Technologist : Adviser
http://neilcsmith.net


Praxis - open-source intermedia system for live creative play -
http://code.google.com/p/praxis

OpenEye - specialist web solutions for the cultural, education,
charitable and local government sectors - http://openeye.info
> --
> You received this message because you are subscribed to the Google Groups
> "gstreamer-java" group.
> To post to this group, send email to gstream...@googlegroups.com.
> To unsubscribe from this group, send email to
> gstreamer-jav...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/gstreamer-java?hl=en.
>

gstream...@googlecode.com

unread,
Jun 23, 2012, 3:48:50 PM6/23/12
to gstream...@googlegroups.com

Comment #1 on issue 104 by sha...@companysocia.com: Making gstreamer-java
+1 i can reduce the problem too. Gstreamer-java should get sync with latest
Gstreamer updates. (Gstreamer 1.0 was also not working, and there Gstreamer
SDK also).

gstream...@googlecode.com

unread,
Jun 23, 2012, 3:49:51 PM6/23/12
to gstream...@googlegroups.com

Comment #2 on issue 104 by sha...@companysocia.com: Making gstreamer-java
Did you tried with Python to make it work, under windows? Give a try.

gstream...@googlecode.com

unread,
Jun 26, 2012, 11:12:34 PM6/26/12
to gstream...@googlegroups.com

Comment #3 on issue 104 by cow...@bbs.darktech.org: Making gstreamer-java
The unit tests are throwing the following warnings/exceptions:

1. BusTest.errorMessage() prints:

---------
Running org.gstreamer.BusTest
(java.exe:9568): GLib-WARNING **: (gerror.c:496):g_error_copy: runtime
check failed: (error->domain != 0)
(java.exe:9568): GLib-WARNING **: (gerror.c:497):g_error_copy: runtime
check failed: (error->message != NULL)
---------

2. ElementFactoryTest.filterList() fails
with "java.lang.UnsatisfiedLinkError: Error looking up
function 'g_list_append': The specified procedure could not be found."

3. RegistryTest.listPlugins() fails with "IllegalArgumentException: No such
Gstreamer factory: playbin".

4. StreamInfoTest.testGetMute() fails with "IllegalArgumentException: No
such Gstreamer factory: playbin"

Any ideas?

gstream...@googlecode.com

unread,
Jul 3, 2012, 10:47:23 AM7/3/12
to gstream...@googlegroups.com

Comment #4 on issue 104 by wald...@gmail.com: Making gstreamer-java work
For me, removing the "-0" suffix on the dll caused no good. What works
pretty well is just patching the GstNative.java file, line 42 in current
trunk, like this:

> GNative.loadLibrary(libraryName + "-0.10-0", interfaceClass, options);

(added the -0 suffix there). This way everything I'm using works so far.
Maybe it's worth to do the library loading in a try block, and check the
alternative name in it's catch block? This is a bit hackish, but on the
other hand it would enable the use of recent windows builds. Assuming that
gstreamer.com lasts for a while; I surely hope so.

gstream...@googlecode.com

unread,
Jul 3, 2012, 10:51:24 AM7/3/12
to gstream...@googlegroups.com

Comment #5 on issue 104 by wald...@gmail.com: Making gstreamer-java work
For the record: the "no good" mentioned in my last comment were messages
like

> cannot register existing type `GstObject'

when calling Gst.init(). I did not succeed in resolving this, at least
using 32-bit Java / Gstreamer on 64-bit Windows 7 (don't ask why).

gstream...@googlecode.com

unread,
Jul 3, 2012, 10:58:05 AM7/3/12
to gstream...@googlegroups.com

Comment #6 on issue 104 by cow...@bbs.darktech.org: Making gstreamer-java
Sounds to me like you guys are flying blind. Run this through a debugger or
add println() statements and you will see that the library is being found.

My guess is something else is going wrong. If the library really refuses to
load maybe the actual library is being found but one of its dependencies is
not? Open it up using the "depends" tool which will check for all
transitive dependencies.

gstream...@googlecode.com

unread,
Jul 3, 2012, 11:26:51 AM7/3/12
to gstream...@googlegroups.com

Comment #7 on issue 104 by neilcsmi...@gmail.com: Making gstreamer-java
@waldheinz GNative already has code in it to search for the "-0" suffix and
I'm pretty sure that earlier Windows binaries I've used were named like
this. If changing that line in GstNative really fixes this issue for you,
sounds like something else is up. If you swap the order of the array in
GNative
(http://code.google.com/p/gstreamer-java/source/browse/trunk/gstreamer-java/src/org/gstreamer/lowlevel/GNative.java#74)
so that the suffix is searched first, does that also fix it? Maybe that
array now needs "%s-0" adding to it (does anything have the suffix without
lib on the front)?

gstream...@googlecode.com

unread,
Jul 3, 2012, 2:15:12 PM7/3/12
to gstream...@googlegroups.com

Comment #8 on issue 104 by john.hen...@gmail.com: Making gstreamer-java
I did try depends.

I don't know what to do with the results:

Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing
export function in a delay-load dependent module.

Error opening file IESHIMS.DLL (some internet explorer DLL -- no idea why
Gstreamer would need this).




gstream...@googlecode.com

unread,
Jul 3, 2012, 2:16:12 PM7/3/12
to gstream...@googlegroups.com

Comment #9 on issue 104 by john.hen...@gmail.com: Making gstreamer-java
Sorry, forgot to mention this was for libgsta52dec.dll -- others give
similar results.

gstream...@googlecode.com

unread,
Jul 4, 2012, 3:00:26 AM7/4/12
to gstream...@googlegroups.com

Comment #10 on issue 104 by wald...@gmail.com: Making gstreamer-java work
@Neil: You are right, the naming schemes in GNative are sufficient.
the "lib%s-0" rule picks up everything needed for me. I don't know why this
works for me now while it failed yesterday. I assume it has something to do
with old gstreamer libraries that were not really removed from the system
until I restarted the computer when I got to work today.

So, the current gstreamer-java 1.5 release works for me with the gstreamer
windows builds from gstreamer.com (version 2012.5).

gstream...@googlecode.com

unread,
Jul 4, 2012, 3:58:51 AM7/4/12
to gstream...@googlegroups.com

Comment #11 on issue 104 by john.hen...@gmail.com: Making gstreamer-java
@Wald: Any chance I could get the sample code for this? I still cannot get
it to work without renaming the main dll.

I managed to get a bit further though, but now I get this:

Exception in thread "main" java.lang.IllegalArgumentException: No such
Gstreamer factory: playbin2
at org.gstreamer.ElementFactory.makeRawElement(ElementFactory.java:219)
at org.gstreamer.Element.makeRawElement(Element.java:90)
at org.gstreamer.elements.PlayBin2.<init>(PlayBin2.java:123)
at Test20120625GStreamer.main(Test20120625GStreamer.java:37)

gstream...@googlecode.com

unread,
Jul 4, 2012, 3:59:51 AM7/4/12
to gstream...@googlegroups.com

Comment #12 on issue 104 by john.hen...@gmail.com: Making gstreamer-java
(I achieved this by simply copying the IESHIMS.DLL into the bin folder of
the gstreamer distribution).

gstream...@googlecode.com

unread,
Jul 4, 2012, 4:26:46 AM7/4/12
to gstream...@googlegroups.com

Comment #13 on issue 104 by wald...@gmail.com: Making gstreamer-java work
@John: I can't really provide any useful code for this matter, as for me it
was blowing up on Gst.init() already. The currently state is that it "just
works", if the path to the gstreamer-sdk "bin" folder is added to the PATH
env. variable. For me this is:

> C:\gstreamer-sdk\2012.5\x86\bin

This is with a completely vanilla installation of the gstreamer-sdk
runtime. Now I'm bitten by bug 109, but this should be resolvable and is
unrelated to this bug.

gstream...@googlecode.com

unread,
Jul 4, 2012, 9:40:24 AM7/4/12
to gstream...@googlegroups.com

Comment #14 on issue 104 by cow...@bbs.darktech.org: Making gstreamer-java
I've seen exceptions similar to what John has mentioned when using trunk
(not version 1.5!) against the SDK. There is definitely work to do to get
trunk working against the SDK.

gstream...@googlecode.com

unread,
Jul 4, 2012, 10:13:29 AM7/4/12
to gstream...@googlegroups.com

Comment #15 on issue 104 by john.hen...@gmail.com: Making gstreamer-java
Using 1.5 via Maven. I'll try it on a different system soon, perhaps
something is wrong on my normal dev machine.

gstream...@googlecode.com

unread,
Jun 9, 2013, 4:20:38 AM6/9/13
to gstream...@googlegroups.com

Comment #16 on issue 104 by Michael....@gmail.com: Making gstreamer-java
To provide insight on the issues with the unit tests (inline)

The unit tests are throwing the following warnings/exceptions:

1. BusTest.errorMessage() prints:
---------
Running org.gstreamer.BusTest
(java.exe:9568): GLib-WARNING **: (gerror.c:496):g_error_copy: runtime
check failed: (error->domain != 0)
(java.exe:9568): GLib-WARNING **: (gerror.c:497):g_error_copy: runtime
check failed: (error->message != NULL)
---------

Newer versions of glib, I believe > 2.30, now have this check. It is not
critical, and is a direct result of initializing an empty GError and having
gstreamer post the message, see lines 137-138, 163-165.

For the most part gstreamer-java will not be generating these messages but
one could add g_error_new into the GlibAPI if needed.


2. ElementFactoryTest.filterList() fails
with "java.lang.UnsatisfiedLinkError: Error looking up
function 'g_list_append': The specified procedure could not be found."

Should be fixed in r600.

3. RegistryTest.listPlugins() fails with "IllegalArgumentException: No such
Gstreamer factory: playbin".

Gstreamer-sdk does not include the playbin element, nor the decodebin
element. Try running "gst-inspect-0.10 playbin" from a prompt.

4. StreamInfoTest.testGetMute() fails with "IllegalArgumentException: No
such Gstreamer factory: playbin"

Gstreamer-sdk does not include the playbin element, nor the decodebin
elemen. Try running "gst-inspect-0.10 playbin" from a prompt.

Playbin, decodebin, and some other I can't recall off the top of my head
are deprecated plugins. I supposed gstreamer-sdk did not want them in there?

Some other thoughts, there was no need to copy IESHIMS.DLL into the bin
folder on any of our installs, simply adding the path to the bin folder on
my path.

If you have any other glib/gtk installs, those libs might get picked up
first. Try adding the bin location to the front of your path.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

gstream...@googlecode.com

unread,
Jun 25, 2013, 11:47:50 AM6/25/13
to gstream...@googlegroups.com

Comment #17 on issue 104 by lfar...@lfarkas.org: Making gstreamer-java work
may i close this as not a bug?

gstream...@googlecode.com

unread,
Jun 26, 2013, 1:12:06 PM6/26/13
to gstream...@googlegroups.com

Comment #18 on issue 104 by Michael....@gmail.com: Making gstreamer-java
I vote yes.

gstream...@googlecode.com

unread,
Jul 18, 2013, 1:53:48 AM7/18/13
to gstream...@googlegroups.com

Comment #19 on issue 104 by shankari...@gmail.com: Making gstreamer-java
hi first i got UnSATISFIED LINK ERROR...i resolved it by adding all the dll
files..
Now i get this error
Exception in thread "main" java.lang.IllegalArgumentException: No such
Gstreamer factory: playbin2

anyone can help me out???

gstream...@googlecode.com

unread,
Jul 18, 2013, 2:01:08 AM7/18/13
to gstream...@googlegroups.com

Comment #20 on issue 104 by shankari...@gmail.com: Making gstreamer-java
Moreover i tried a simplepipeline code..it throws me tis repeatedly..
(javaw.exe:5800): GLib-GObject-WARNING **: cannot register existing type
`GstObject'

(javaw.exe:5800): GLib-GObject-CRITICAL **: g_type_register_static:
assertion `parent_type > 0' failed

(javaw.exe:5800): GLib-GObject-CRITICAL **: g_type_register_static:
assertion `parent_type > 0' failed
Reply all
Reply to author
Forward
0 new messages