mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 07:28:53 +00:00
docs/manual/advanced-dataaccess.xml: Fix 'Embedding static elements' section to use
Original commit message from CVS: Patch by: Philip Jägenstedt <philip at lysator liu se> * docs/manual/advanced-dataaccess.xml: Fix 'Embedding static elements' section to use GST_PLUGIN_DEFINE_STATIC (#345607).
This commit is contained in:
parent
e779589a0b
commit
33d4367def
2 changed files with 22 additions and 23 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2006-06-22 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
Patch by: Philip Jägenstedt <philip at lysator liu se>
|
||||||
|
|
||||||
|
* docs/manual/advanced-dataaccess.xml:
|
||||||
|
Fix 'Embedding static elements' section to use
|
||||||
|
GST_PLUGIN_DEFINE_STATIC (#345607).
|
||||||
|
|
||||||
2006-06-21 Tim-Philipp Müller <tim at centricular dot net>
|
2006-06-21 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* tests/check/pipelines/simple-launch-lines.c: (test_stop_from_app):
|
* tests/check/pipelines/simple-launch-lines.c: (test_stop_from_app):
|
||||||
|
|
|
@ -311,15 +311,17 @@ main (gint argc,
|
||||||
<function>plugin_init</function>) that will be called right after that.
|
<function>plugin_init</function>) that will be called right after that.
|
||||||
It's purpose is to register the elements provided by the plugin with
|
It's purpose is to register the elements provided by the plugin with
|
||||||
the &GStreamer; framework. If you want to embed elements directly in
|
the &GStreamer; framework. If you want to embed elements directly in
|
||||||
your application, the only thing you need to do is to manually run
|
your application, the only thing you need to do is to replace
|
||||||
this structure using <function>_gst_plugin_register_static
|
<function>GST_PLUGIN_DEFINE ()</function> with
|
||||||
()</function>. The initialization will then be called, and the elements
|
<function>GST_PLUGIN_DEFINE_STATIC ()</function>. This will cause the
|
||||||
will from then on be available like any other element, without
|
elements to be registered when your application loads, and the elements
|
||||||
them having to be dynamically loadable libraries. In the example below,
|
will from then on be available like any other element, without them
|
||||||
you would be able to call <function>gst_element_factory_make
|
having to be dynamically loadable libraries. In the example below, you
|
||||||
("my-element-name", "some-name")</function> to create an instance
|
would be able to call <function>gst_element_factory_make
|
||||||
of the element.
|
("my-element-name", "some-name")</function> to create an instance of the
|
||||||
|
element.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
/*
|
/*
|
||||||
* Here, you would write the actual plugin code.
|
* Here, you would write the actual plugin code.
|
||||||
|
@ -334,28 +336,17 @@ register_elements (GstPlugin *plugin)
|
||||||
GST_RANK_NONE, MY_PLUGIN_TYPE);
|
GST_RANK_NONE, MY_PLUGIN_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstPluginDesc plugin_desc = {
|
GST_PLUGIN_DEFINE_STATIC (
|
||||||
GST_VERSION_MAJOR,
|
GST_VERSION_MAJOR,
|
||||||
GST_VERSION_MINOR,
|
GST_VERSION_MINOR,
|
||||||
"my-private-plugins",
|
"my-private-plugins",
|
||||||
"Private elements of my application",
|
"Private elements of my application",
|
||||||
register_elements,
|
register_elements,
|
||||||
"0.0.1",
|
VERSION,
|
||||||
"LGPL",
|
"LGPL",
|
||||||
"my-application",
|
"my-application",
|
||||||
"http://www.my-application.net/",
|
"http://www.my-application.net/"
|
||||||
GST_PADDING_INIT
|
)
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Call this function right after calling gst_init ().
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
my_elements_init (void)
|
|
||||||
{
|
|
||||||
_gst_plugin_register_static (&plugin_desc);
|
|
||||||
}
|
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</sect1>
|
</sect1>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
Loading…
Reference in a new issue