Lyn-Tech / gstreamer-java

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

Making gstreamer-java work with binaries from gstreamer.com #104

Open GoogleCodeExporter opened 8 years ago

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

Original issue reported on code.google.com by john.hen...@gmail.com on 22 Jun 2012 at 11:42

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

Original comment by sha...@companysocia.com on 23 Jun 2012 at 7:48

GoogleCodeExporter commented 8 years ago
Did you tried with Python to make it work, under windows? Give a try.

Original comment by sha...@companysocia.com on 23 Jun 2012 at 7:49

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

Original comment by cow...@bbs.darktech.org on 27 Jun 2012 at 3:12

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
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).

Original comment by waldheinz@gmail.com on 3 Jul 2012 at 2:51

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

Original comment by cow...@bbs.darktech.org on 3 Jul 2012 at 2:57

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

Original comment by neilcsmi...@googlemail.com on 3 Jul 2012 at 3:26

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

Original comment by john.hen...@gmail.com on 3 Jul 2012 at 6:15

GoogleCodeExporter commented 8 years ago
Sorry, forgot to mention this was for libgsta52dec.dll -- others give similar 
results.

Original comment by john.hen...@gmail.com on 3 Jul 2012 at 6:15

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

Original comment by waldheinz@gmail.com on 4 Jul 2012 at 7:00

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

Original comment by john.hen...@gmail.com on 4 Jul 2012 at 7:58

GoogleCodeExporter commented 8 years ago
(I achieved this by simply copying the IESHIMS.DLL into the bin folder of the 
gstreamer distribution).

Original comment by john.hen...@gmail.com on 4 Jul 2012 at 7:59

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

Original comment by waldheinz@gmail.com on 4 Jul 2012 at 8:26

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

Original comment by cow...@bbs.darktech.org on 4 Jul 2012 at 1:40

GoogleCodeExporter commented 8 years ago
Using 1.5 via Maven.  I'll try it on a different system soon, perhaps something 
is wrong on my normal dev machine.

Original comment by john.hen...@gmail.com on 4 Jul 2012 at 2:13

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

Original comment by Michael....@gmail.com on 9 Jun 2013 at 8:20

GoogleCodeExporter commented 8 years ago
may i close this as not a bug?

Original comment by lfar...@lfarkas.org on 25 Jun 2013 at 3:47

GoogleCodeExporter commented 8 years ago
I vote yes.

Original comment by Michael....@gmail.com on 26 Jun 2013 at 5:11

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

Original comment by shankari...@gmail.com on 18 Jul 2013 at 5:53

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

Original comment by shankari...@gmail.com on 18 Jul 2013 at 6:00