Beginner problems.

127 views
Skip to first unread message

Onots

unread,
Nov 29, 2007, 7:02:57 AM11/29/07
to gstreamer-java
Hello all,

I've just started using gstreamer and gstreamer-java. It seems most of
you get it to work. Since I have no JNA experience I had some trouble.
First, it wasn't that straightforward to install gstreamer under
windows (vista). The install complained about the GTK runtime,
pointing me to a GIMP install which would include this. But even after
installing GIMP (which worked) the gstreamer install didn't see the
gtk runtime and failed. I finally fixed that by downloading the GTK
runtime from somewhere. (I could dig up where if anyone needs it).
Then Native.loadLibrary kept throwing an UnsatisfiedLinkError because
it couldn't find the library. The simple fix was to set
jna.library.path to point to the location of libgstreamer-0.10.dll.
Now the initTest runs, and returns:

** (javaw.exe:5572): CRITICAL **: file E:\devel-release\src_releases
\gstreamer\gst\gstinfo.c: line 413: assertion `category != NULL'
failed
Gstreamer initialized!

No clue what the critical error means. It sure as hell doesn't refer
to a local file. There is no E:\devel-release etc on my workstation.
So other than this CRITICALly failed assertion it seems Gstreamer does
initialize.

Next I tried the SwingVideoTest:

** (javaw.exe:3516): CRITICAL **: file E:\devel-release\src_releases
\gstreamer\gst\gstinfo.c: line 413: assertion `category != NULL'
failed
Creating MainLoop
Creating pipeline
Pipeline created
Creating videotestsrc
Exception in thread "main" java.lang.IllegalArgumentException: No such
Gstreamer factory: videotestsrc
at org.gstreamer.ElementFactory.makeRawElement(ElementFactory.java:
123)
at org.gstreamer.ElementFactory.make(ElementFactory.java:115)
at example.SwingVideoTest.main(SwingVideoTest.java:57)

Hmm, seems like I'm missing something... SwingPlayer has a similar
result, except it's missing factory: playbin. I tried installing all
gstreamer plugins, but that didn't help. For now I'm stuck. What
should I change to get the examples from gstreamer-java to work?

Onots

unread,
Nov 30, 2007, 5:40:14 AM11/30/07
to gstreamer-java
I've been messing around with the paths and finally got jna to load
all required libraries. But still that's not enough. Most examples do
not run. InitTest does. ElementTest works too. Both still produce the
failed assertion:

** (javaw.exe:5572): CRITICAL **: file E:\devel-release\src_releases
\gstreamer\gst\gstinfo.c: line 413: assertion `category != NULL'
failed
Gstreamer initialized!

All other example throw an exception and exit or crash the vm. For
example FakeSrcTest:

** (javaw.exe:4264): CRITICAL **: file E:\devel-release\src_releases
\gstreamer\gst\gstinfo.c: line 413: assertion `category != NULL'
failed

(javaw.exe:4264): GLib-GObject-WARNING **: specified instance size for
type `VideoSink' is smaller than the parent type's `GstBaseSink'
instance size

(javaw.exe:4264): GLib-GObject-CRITICAL **: g_object_new: assertion
`G_TYPE_IS_OBJECT (object_type)' failed
Exception in thread "main" java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:
879)
at org.gstreamer.NativeObject.<init>(NativeObject.java:41)
at org.gstreamer.GObject.<init>(GObject.java:38)
at org.gstreamer.GstObject.<init>(GstObject.java:48)
at org.gstreamer.GstObject.<init>(GstObject.java:30)
at org.gstreamer.Element.<init>(Element.java:39)
at org.gstreamer.BaseSink.<init>(BaseSink.java:34)
at org.gstreamer.CustomSink.<init>(CustomSink.java:59)
at org.gstreamer.swing.GstVideoComponent
$VideoSink.<init>(GstVideoComponent.java:284)
at
org.gstreamer.swing.GstVideoComponent.<init>(GstVideoComponent.java:
66)
at example.FakeSrcTest.main(FakeSrcTest.java:57)


What am I doing wrong here?

Wayne Meissner

unread,
Dec 2, 2007, 2:31:49 AM12/2/07
to gstream...@googlegroups.com
On 30/11/2007, Onots <jlho...@gmail.com > wrote:

I've been messing around with the paths and finally got jna to load
all required libraries. But still that's not enough. Most examples do


Can you document what you had to do to get gstreamer-java working on windows?  It might help others who come across the same problems.
 

not run. InitTest does. ElementTest works too. Both still produce the
failed assertion:

** (javaw.exe:5572): CRITICAL **: file E:\devel-release\src_releases
\gstreamer\gst\gstinfo.c: line 413: assertion `category != NULL'
failed
Gstreamer initialized!


I'm not sure what the "CRITICAL..." error is, but I saw it pop up last time I test on windows, and everything still worked after it,so I didn't bother trying to track it down.

The other errors below should be "fixed" in trunk - I rolled the code back to an earlier version that used to work on windows.

Unfortunately, I neither develop on, nor test on windows on a regular basis, so I can't test or fix windows related bugs myself, so I rely on reports & debugging done by others ( i.e. you guys) to get things fixed if it does break there.

Onots

unread,
Dec 3, 2007, 5:48:41 AM12/3/07
to gstreamer-java
Ok, with latest from trunk I get no more exceptions. When building
gstreamer-java one of the unit tests fails:

[junit] Testcase: eosListener(org.gstreamer.BusTest): FAILED
[junit] EOS not received
[junit] junit.framework.AssertionFailedError: EOS not received
[junit] at org.gstreamer.BusTest.eosListener(BusTest.java:75)
[junit] Test org.gstreamer.BusTest FAILED

I think this one is not going to be critical for me, but you never
know.

On 2 dec, 08:31, "Wayne Meissner" <wmeiss...@gmail.com> wrote:
> On 30/11/2007, Onots <jlhol...@gmail.com> wrote:
>
>
>
> > I've been messing around with the paths and finally got jna to load
> > all required libraries. But still that's not enough. Most examples do
>
> Can you document what you had to do to get gstreamer-java working on
> windows? It might help others who come across the same problems.
>
> not run. InitTest does. ElementTest works too. Both still produce the
>
> > failed assertion:
>
> > ** (javaw.exe:5572): CRITICAL **: file E:\devel-release\src_releases
> > \gstreamer\gst\gstinfo.c: line 413: assertion `category != NULL'
> > failed
> > Gstreamer initialized!
>
> I'm not sure what the "CRITICAL..." error is, but I saw it pop up last time
> I test on windows, and everything still worked after it,so I didn't bother
> trying to track it down.
>
> The other errors below should be "fixed" in trunk - I rolled the code back
> to an earlier version that used to work on windows.
>
> Unfortunately, I neither develop on, nor test on windows on a regular basis,
> so I can't test or fix windows related bugs myself, so I rely on reports &
> debugging done by others (i.e. you guys) to get things fixed if it does

Wayne Meissner

unread,
Dec 3, 2007, 6:17:04 PM12/3/07
to gstream...@googlegroups.com
You can safely ignore that one on windows at the moment - it relies on /dev/null - which is a unix-ism.  I'll add some code to disable that test on windows.

> >         at org.gstreamer.GObject .<init>(GObject.java:38)

> >         at org.gstreamer.GstObject.<init>(GstObject.java:48)
> >         at org.gstreamer.GstObject.<init>(GstObject.java:30)
> >         at org.gstreamer.Element .<init>(Element.java:39)

> >         at org.gstreamer.BaseSink.<init>(BaseSink.java:34)
> >         at org.gstreamer.CustomSink.<init>(CustomSink.java:59)
> >         at org.gstreamer.swing.GstVideoComponent
> > $VideoSink.<init>(GstVideoComponent.java:284)
> >         at
> > org.gstreamer.swing.GstVideoComponent.<init>(GstVideoComponent.java:
> > 66)
> >         at example.FakeSrcTest.main (FakeSrcTest.java:57)

recallj...@gmail.com

unread,
Dec 6, 2007, 12:01:38 PM12/6/07
to gstreamer-java
Hi Onots,

I am also meet same error message by using gstreamer-java under
windows xp.
Even more, I can not run my project successfully. Please kindly give
me more advise to avoid the problem. Thanks.

Following are error messages on my side:

** (javaw.exe:3664): CRITICAL **: file E:\devel-release\src_releases
\gstreamer\gst\gstinfo.c: line 413: assertion `category != NULL'
failed

(javaw.exe:3664): GLib-GObject-CRITICAL **: gtype.c:2242:
initialization assertion failed, use g_type_init() prior to this
function

(javaw.exe:3664): GLib-GObject-CRITICAL **: gtype.c:2242:
initialization assertion failed, use g_type_init() prior to this
function

(javaw.exe:3664): GLib-GObject-CRITICAL **: gtype.c:2242:
initialization assertion failed, use g_type_init() prior to this
function

(javaw.exe:3664): GLib-GObject-CRITICAL **: gtype.c:2242:
initialization assertion failed, use g_type_init() prior to this
function

(javaw.exe:3664): GLib-GObject-CRITICAL **: gtype.c:2242:
initialization assertion failed, use g_type_init() prior to this
function

(javaw.exe:3664): GLib-GObject-CRITICAL **: g_object_new: assertion
`G_TYPE_IS_OBJECT (object_type)' failed

** (javaw.exe:3664): CRITICAL **: file E:\devel-release\src_releases
\gstreamer\gst\gstobject.c: line 320: assertion `object != NULL'
failed

(javaw.exe:3664): GLib-GObject-CRITICAL **: gtype.c:2242:
initialization assertion failed, use g_type_init() prior to this
function

** (javaw.exe:3664): CRITICAL **: file E:\devel-release\src_releases
\gstreamer\gst\gstobject.c: line 377: assertion `GST_IS_OBJECT
(object)' failed

(javaw.exe:3664): GLib-GObject-CRITICAL **: gtype.c:2242:
initialization assertion failed, use g_type_init() prior to this
function

(javaw.exe:3664): GLib-GObject-CRITICAL **: gtype.c:2242:
initialization assertion failed, use g_type_init() prior to this
function

** (javaw.exe:3664): CRITICAL **: file E:\devel-release\src_releases
\gstreamer\gst\gstregistry.c: line 617: assertion `GST_IS_REGISTRY
(registry)' failed

** (javaw.exe:3664): CRITICAL **: file E:\devel-release\src_releases
\gstreamer\gst\gstinfo.c: line 413: assertion `category != NULL'
failed

** (javaw.exe:3664): CRITICAL **: file E:\devel-release\src_releases
\gstreamer\gst\gstinfo.c: line 413: assertion `category != NULL'
failed
Exception in thread "AWT-EventQueue-0"
java.lang.IllegalArgumentException: No such Gstreamer factory: playbin
at org.gstreamer.ElementFactory.makeRawElement(ElementFactory.java:
123)
at org.gstreamer.PlayBin.<init>(PlayBin.java:31)
at org.gstreamer.swing.GstVideoPlayer.<init>(GstVideoPlayer.java:44)

BRs,
JeffChang.

Onots

unread,
Dec 7, 2007, 2:39:25 AM12/7/07
to gstreamer-java
Can you use gstreamer-inspect-0.10 and gstreamer-launch-0.10 from the
commandline? Try openening a console and issuing the following
command:

gst-inspect-0.10 playbin
gst-inspect-0.10 fakesrc

These commands should return a lot of info about both elements. If
they don't, something is probably wrong with your gstreamer
installation, and I suggest reinstalling it.

To test functionality more try launching a pipeline:

gst-launch-0.10 filesrc location=d:\test.mp3 ! decodebin !
audioconvert ! autoaudiosink

Note that to play mp3 you need to have the "ugly" plugins installed.

On 6 dec, 18:01, "recalljeffch...@gmail.com"

recallj...@gmail.com

unread,
Dec 7, 2007, 8:51:11 PM12/7/07
to gstreamer-java
Yes, I can execute "gst-inspect-0.10 playbin" and "gst-inspect-0.10
fakesrc" without warnings.
I am now focusing on another issue, I think there are something
dependence.

I can not successfully compile SwingPlayer.java with following error
messages, please kindly help:

...
SwingPlayer.java:22: package org.gstreamer.media does not exist
import org.gstreamer.media.MediaPlayer;
^
SwingPlayer.java:23: package org.gstreamer.media.event does not exist
import org.gstreamer.media.event.EndOfMediaEvent;
^
SwingPlayer.java:24: package org.gstreamer.media.event does not exist
import org.gstreamer.media.event.MediaAdapter;
^
SwingPlayer.java:55: cannot find symbol
symbol: class MediaAdapter
player.getMediaPlayer().addMediaListener(new
MediaAdapter() {
^
SwingPlayer.java:55: cannot find symbol
symbol : method getMediaPlayer()
location: class org.gstreamer.swing.GstVideoPlayer
player.getMediaPlayer().addMediaListener(new
MediaAdapter() {

...

org.gstreamer.Gst can be found during compiling, but
org.gstreamer.media.MediaPlayer can't. I have uncompress gstreamer-
java-20071022-r125.jar and found there is no folder name "media" under
"gstreamer-java-20071022-r125\org\gstreamer". I think that's why the
error occur.

Wayne Meissner

unread,
Dec 8, 2007, 3:19:44 AM12/8/07
to gstream...@googlegroups.com
The compilation problem is because you used SwingPlayer.java from an svn checkout of trunk, and tried to compile it against the older binary release of the gstreamer-java code. 

If you want the same version of SwingPlayer.java that matches with the binary release, you need to checkout revision r125 of the tree.

Otherwise, if you're using trunk code, it has to be compiled against gstreamer-java from trunk.

The errors in your previous mail could be because you didn't call Gst.init() before any other gstreamer method - this includes allocating objects.

Always have Gst.init() before any other code if possible.

> > ** ( javaw.exe:3664): CRITICAL **: file E:\devel-release\src_releases

> > \gstreamer\gst\gstinfo.c: line 413: assertion `category != NULL'
> > failed
>
> > (javaw.exe:3664): GLib-GObject-CRITICAL **: gtype.c:2242:
> > initialization assertion failed, use g_type_init() prior to this
> > function
>
> > (javaw.exe:3664): GLib-GObject-CRITICAL **: gtype.c:2242:
> > initialization assertion failed, use g_type_init() prior to this
> > function
>
> > (javaw.exe:3664): GLib-GObject-CRITICAL **: gtype.c:2242:
> > initialization assertion failed, use g_type_init() prior to this
> > function
>
> > ( javaw.exe:3664): GLib-GObject-CRITICAL **: gtype.c:2242:

> > initialization assertion failed, use g_type_init() prior to this
> > function
>
> > (javaw.exe:3664): GLib-GObject-CRITICAL **: gtype.c:2242:
> > initialization assertion failed, use g_type_init() prior to this
> > function
>
> > (javaw.exe:3664): GLib-GObject-CRITICAL **: g_object_new: assertion
> > `G_TYPE_IS_OBJECT (object_type)' failed
>
> > ** (javaw.exe:3664): CRITICAL **: file E:\devel-release\src_releases
> > \gstreamer\gst\gstobject.c: line 320: assertion `object != NULL'
> > failed
>
> > (javaw.exe :3664): GLib-GObject-CRITICAL **: gtype.c:2242:
> > initialization assertion failed, use g_type_init() prior to this
> > function
>
> > ** (javaw.exe:3664): CRITICAL **: file E:\devel-release\src_releases
> > \gstreamer\gst\gstobject.c: line 377: assertion `GST_IS_OBJECT
> > (object)' failed
>
> > (javaw.exe:3664): GLib-GObject-CRITICAL **: gtype.c:2242:
> > initialization assertion failed, use g_type_init() prior to this
> > function
>
> > (javaw.exe:3664): GLib-GObject-CRITICAL **: gtype.c:2242:
> > initialization assertion failed, use g_type_init() prior to this
> > function
>
> > ** ( javaw.exe:3664): CRITICAL **: file E:\devel-release\src_releases
Reply all
Reply to author
Forward
0 new messages