Blog Image

MikeK's software notebook

What you will find

This used to be the place where I wrote stuff I was thinking about while working on the Mozilla project.

Maybe in the near future I'll start to update it again as I'm involved in a couple of new open-source projects - updates pending...

Happy me ;)

GStreamer Posted on 16 Apr, 2009 22:17:06

So why am I happy ? – well, first of all I went to the dentist today, so I don’t have to think about dentists until next winter 🙂 – and secondly because after several working days of going around in small circles and trying to figure out the buildsystem, GStreamer etc. I now have my own source plugin, that registers with the GStreamer framework and most importantly can be created by the gstreamer factory call like:

GstElement *streamerSource = gst_element_factory_make(“nsGStreamSource”, nsnull);

I think I with this passed an important step in the process smiley

I also did some changes for improved error handling and preparing the code that I build on top of for multiple video sources running silmuntanously – and last but not least fixed the cleanup code so it nicely releases the resources that it has aquired.

I’ll try to make a GStreamer plugins for dummies page while I still remember what I did 🙂

Happy,
MikeK



undefined reference to `gst_push_src_get_type’

GStreamer Posted on 16 Apr, 2009 09:36:20

I’m extending the GstPushSrc source for an integration of GStreamer with the Necko network library.

Creating an extension is not as trivial as inheritance in C++ as GStreamer uses the GObject object model, but anyway looking at the documentation and examples I made an attempt – hit compile, and got the above linker error.

Trying to investigate what went wrong I tried to do a project wide search for the function, it was found in the header file Gstpushsrc.h and no-where else, and just as the prototype “GType gst_push_src_get_type(void);”

Looking some more at the code I found that the “GST_BOILERPLATE” macro I was using generated the *_get_type function for my class and did a call to the base class’ *_get_type function – and viola – there were a “GST_BOILERPLATE_FULL” function in Gstpushsrc.c also generating a *_get_type function.

I was now wondering – I have the prototype, and the implementation, why is the code then not linking? Well I knew that the file holding the implementation was not included in the build – so for a while I was considering adding it to my build, but it kind of felt like ceating and indeed it is not the way to do it.

The GstPushSrc is not part of the core GStreamer library, its part of the base plug-in library. The core library gstreamer-0.10 was allready added to configure.in in the root of the build directory, so this was probably a good place to add the base library too.

The remaining problem was then to find the name of the library… I’ll spare you the story of my search – and note that it is: gstreamer-base-0.10, adding this to my configure.in file fixed the linking issues, and I’m now ready to continue 🙂