[gst-devel] static plugin

Ben "The Big" Demboski BenD at wildseed.com
Fri Jun 16 04:12:20 CEST 2006


It's defined with GST_GNUC_CONSTRUCTOR which gives it a compiler attribute
that causes it to be executed before entering the main() routine of your
application.

 

  _____  

From: gstreamer-devel-bounces at lists.sourceforge.net
[mailto:gstreamer-devel-bounces at lists.sourceforge.net] On Behalf Of
Christophe Dehais
Sent: Thursday, June 15, 2006 2:24 PM
To: gstreamer-devel at lists.sourceforge.net
Subject: [gst-devel] static plugin

 

Hello,

First what I wanted to do worked, I'm just trying to better understand how
gstreamer works.

I was trying to figure out the best way to organise my code for an
application and a static plugin (not compiled as .so) 

I used the plugin template to generate gstmyplugin.[ch] and I just replaced
the GST_PLUGIN_DEFINE by
the GST_PLUGIN_DEFINE_STATIC in gstmyplugin.c.

Looking at the definition of the GST_PLUGIN_DEFINE_STATIC macro, it creates
a function: 
_gst_plugin_static_init__my_plugin_init ()
that simply fills a GstPluginDesc structure and then call
_gst_plugin_register_static ().

So my question is: when is this function called when I execute my
application ? I had nothing to change to the app code, just had it linked
with the produced gstmyplugin.o and gstreamer is able to find my custom
plugin (gst_factory_make( 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20060615/59354bd7/attachment.htm>


More information about the gstreamer-devel mailing list