[gst-devel] GStreamer as Mozilla plugin

Wim Taymans wim.taymans at chello.be
Thu Mar 1 17:45:46 CET 2001


>sss I'm attempting to write a plugin for Mozilla that uses GStreamer to
> play audio and video files. I should have the basics of my plugin
> working except for a couple issues. The first thing I want to be able to

wow cool!

> do is simply play an mp3 using the plugin, so I based my code on the
> helloworld sample included with the GStreamer distribution. Here are the
> problems I am having:

> - The call to gst_init() requires argc and argv. Since I am in a plugin
> I don't have a main() function so I just created my own argc and argv:
>ssssss int argc = 2;
>sssssss char *argv[] = { "test", "test" };
>sssssss gst_init( &argc, &argv );
>sss This causes a compile error
>sssssssssss passing `char ** (*)[2]' as argument 2 of `gst_init(int *,
>char ***)'
>sss I got around this with a cast to make it compile but I'm sure that
> will come back and bite me in the ass later.

you can safely pass two NULL pointers to the gst_init function.

>- Once I've got things compiling when I run the plugin I get
>sssssss ** WARNING **: gstplugin: registry needs rebuild

running gstreamer-register will fix this warning. It will create an
XML registry of all the available plugins, this is both faster and
avoids some symbol conflicts.

>sssssss ./mozilla-bin: error in loading shared libraries:
> /usr/local/lib/gst/libgsttypes.so: undefined symbol: gst_plugin_new

it looks like the libgst.so library is not loaded. Did you verify that you
link your plugin against libgst.so since this is where the symbol ought to
be defined?

>sss I think once these two issues are worked out I should (knock on
> wood) be able to play an mp3 using the plugin. So if anyone reading this
> knows the solution to either or both of the above problems please let me
> know.
> Thanks,
> Steve Crouse

Wim Taymans

More information about the gstreamer-devel mailing list