merged elementdetails docs into elementfactory docs inlined both

Original commit message from CVS:
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstelementdetails.sgml:
* docs/gst/tmpl/gstelementfactory.sgml:
* gst/gst.c:
* gst/gstbus.c:
* gst/gstelementfactory.c:
* gst/gstelementfactory.h:
merged elementdetails docs into elementfactory docs
inlined both
This commit is contained in:
Stefan Kost 2005-09-02 17:23:06 +00:00
parent 1b38cd4afa
commit 407c5a4116
10 changed files with 95 additions and 229 deletions

View file

@ -1,3 +1,17 @@
2005-09-02 Stefan Kost <ensonic@users.sf.net>
* docs/gst/gstreamer-docs.sgml:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstelementdetails.sgml:
* docs/gst/tmpl/gstelementfactory.sgml:
* gst/gst.c:
* gst/gstbus.c:
* gst/gstelementfactory.c:
* gst/gstelementfactory.h:
merged elementdetails docs into elementfactory docs
inlined both
2005-09-02 Andy Wingo <wingo@pobox.com> 2005-09-02 Andy Wingo <wingo@pobox.com>
* gst/gstelement.h: Add magical pixie dust to make glib-mkenums * gst/gstelement.h: Add magical pixie dust to make glib-mkenums

View file

@ -16,7 +16,6 @@
--> -->
<!ENTITY GstConfig SYSTEM "xml/gstconfig.xml"> <!ENTITY GstConfig SYSTEM "xml/gstconfig.xml">
<!ENTITY GstElement SYSTEM "xml/gstelement.xml"> <!ENTITY GstElement SYSTEM "xml/gstelement.xml">
<!ENTITY GstElementDetails SYSTEM "xml/gstelementdetails.xml">
<!ENTITY GstElementFactory SYSTEM "xml/gstelementfactory.xml"> <!ENTITY GstElementFactory SYSTEM "xml/gstelementfactory.xml">
<!ENTITY GstError SYSTEM "xml/gsterror.xml"> <!ENTITY GstError SYSTEM "xml/gsterror.xml">
<!ENTITY GstEvent SYSTEM "xml/gstevent.xml"> <!ENTITY GstEvent SYSTEM "xml/gstevent.xml">
@ -113,7 +112,6 @@
&GstClock; &GstClock;
&GstConfig; &GstConfig;
&GstElement; &GstElement;
&GstElementDetails;
&GstElementFactory; &GstElementFactory;
&GstError; &GstError;
&GstEvent; &GstEvent;

View file

@ -523,20 +523,13 @@ gst_element_flags_get_type
</SECTION> </SECTION>
<SECTION>
<FILE>gstelementdetails</FILE>
<TITLE>GstElementDetails</TITLE>
GstElementDetails
<SUBSECTION Standard>
GST_ELEMENT_DETAILS
GST_IS_ELEMENT_DETAILS
</SECTION>
<SECTION> <SECTION>
<FILE>gstelementfactory</FILE> <FILE>gstelementfactory</FILE>
<TITLE>GstElementFactory</TITLE> <TITLE>GstElementFactory</TITLE>
GstElementFactory GstElementFactory
GstElementDetails
GST_ELEMENT_DETAILS
GST_IS_ELEMENT_DETAILS
gst_element_register gst_element_register
gst_element_factory_find gst_element_factory_find
gst_element_factory_get_element_type gst_element_factory_get_element_type

View file

@ -15,6 +15,8 @@ gstchildproxy.sgml
gstcollectpads.sgml gstcollectpads.sgml
gstcompat.sgml gstcompat.sgml
gstconfig.sgml gstconfig.sgml
gstelementdetails.sgml
gstelementfactory.sgml
gstevent.sgml gstevent.sgml
gsterror.sgml gsterror.sgml
gstfakesrc.sgml gstfakesrc.sgml

View file

@ -1,30 +0,0 @@
<!-- ##### SECTION Title ##### -->
GstElementDetails
<!-- ##### SECTION Short_Description ##### -->
Defines public information about a #GstElement
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GstElementDetails ##### -->
<para>
This struct is used to define public information about the element. It
describes the element, mostly for the benefit of editors.
</para>
@longname:
@klass:
@description:
@author:

View file

@ -1,180 +0,0 @@
<!-- ##### SECTION Title ##### -->
GstElementFactory
<!-- ##### SECTION Short_Description ##### -->
Create GstElements from a factory
<!-- ##### SECTION Long_Description ##### -->
<para>
GstElementFactory is used to create instances of elements. A GstElementfactory
can be added to a #GstPlugin as it is also a #GstPluginFeature.
</para>
<para>
Use gst_element_factory_new() to create a new factory which can be added to a plugin
with gst_plugin_add_feature().
</para>
<para>
gst_element_factory_add_pad_template() is used to add a padtemplate to the factory.
This function will enable the application to query for elementfactories that handle
a specific media type.
</para>
<para>
Use the gst_element_factory_find() and gst_element_factory_create() functions
to create element instances or use gst_element_factory_make() as a convenient
shortcut.
</para>
<para>
The following code example shows you how to create a GstFileSrc element.
</para>
<para>
<programlisting role="C">
#include &lt;gst/gst.h&gt;
GstElement *src;
GstElementFactory *srcfactory;
gst_init(&amp;argc,&amp;argv);
srcfactory = gst_element_factory_find("filesrc");
g_return_if_fail(srcfactory != NULL);
src = gst_element_factory_create(srcfactory,"src");
g_return_if_fail(src != NULL);
...
</programlisting>
</para>
<para>
An elementfactory can be assigned a rank with gst_element_factory_set_rank()
so that the autopluggers can select a plugin more appropriatly
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
#GstElement, #GstPlugin, #GstPluginFeature, #GstPadTemplate.
</para>
<!-- ##### SECTION Stability_Level ##### -->
<!-- ##### STRUCT GstElementFactory ##### -->
<para>
</para>
<!-- ##### FUNCTION gst_element_register ##### -->
<para>
</para>
@plugin:
@name:
@rank:
@type:
@Returns:
<!-- # Unused Parameters # -->
@elementname:
<!-- ##### FUNCTION gst_element_factory_find ##### -->
<para>
</para>
@name:
@Returns:
<!-- ##### FUNCTION gst_element_factory_get_element_type ##### -->
<para>
</para>
@factory:
@Returns:
<!-- ##### FUNCTION gst_element_factory_get_longname ##### -->
<para>
</para>
@factory:
@Returns:
<!-- ##### FUNCTION gst_element_factory_get_klass ##### -->
<para>
</para>
@factory:
@Returns:
<!-- ##### FUNCTION gst_element_factory_get_description ##### -->
<para>
</para>
@factory:
@Returns:
<!-- ##### FUNCTION gst_element_factory_get_author ##### -->
<para>
</para>
@factory:
@Returns:
<!-- ##### FUNCTION gst_element_factory_get_num_pad_templates ##### -->
<para>
</para>
@factory:
@Returns:
<!-- ##### FUNCTION gst_element_factory_get_uri_type ##### -->
<para>
</para>
@factory:
@Returns:
<!-- ##### FUNCTION gst_element_factory_get_uri_protocols ##### -->
<para>
</para>
@factory:
@Returns:
<!-- ##### FUNCTION gst_element_factory_create ##### -->
<para>
</para>
@factory:
@name:
@Returns:
<!-- ##### FUNCTION gst_element_factory_make ##### -->
<para>
</para>
@factoryname:
@name:
@Returns:

View file

@ -46,7 +46,7 @@
* *
* <example> * <example>
* <title>Initializing the gstreamer library</title> * <title>Initializing the gstreamer library</title>
* <programlisting> * <programlisting language="c">
* int * int
* main (int argc, char *argv[]) * main (int argc, char *argv[])
* { * {

View file

@ -57,8 +57,7 @@
* elements) again and again. One way to implement it is having one watch with a * elements) again and again. One way to implement it is having one watch with a
* low priority (see gst_add_watch_full()) that pops all messages. * low priority (see gst_add_watch_full()) that pops all messages.
* *
* Every #GstElement has its own bus. * Every #GstPipeline has one bus.
*
*/ */
#include <errno.h> #include <errno.h>

View file

@ -20,6 +20,49 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
/**
* SECTION:gstelementfactory
* @short_description: Create GstElements from a factory
* @see_also: #GstElement, #GstPlugin, #GstPluginFeature, #GstPadTemplate.
*
* GstElementFactory is used to create instances of elements. A GstElementfactory
* can be added to a #GstPlugin as it is also a #GstPluginFeature.
*
* Use gst_element_factory_new() to create a new factory which can be added to a
* plugin with gst_plugin_add_feature().
*
* gst_element_factory_add_pad_template() is used to add a padtemplate to the factory.
* This function will enable the application to query for elementfactories that handle
* a specific media type.
*
* Use the gst_element_factory_find() and gst_element_factory_create() functions
* to create element instances or use gst_element_factory_make() as a convenient
* shortcut.
*
* The following code example shows you how to create a GstFileSrc element.
*
* <example>
* <title>Using an element factory</title>
* <programlisting language="c">
* #include &lt;gst/gst.h&gt;
*
* GstElement *src;
* GstElementFactory *srcfactory;
*
* gst_init(&amp;argc,&amp;argv);
*
* srcfactory = gst_element_factory_find("filesrc");
* g_return_if_fail(srcfactory != NULL);
*
* src = gst_element_factory_create(srcfactory,"src");
* g_return_if_fail(src != NULL);
* ...
* </programlisting>
* </example>
*
* An elementfactory can be assigned a rank with gst_element_factory_set_rank()
* so that the autopluggers can select a plugin more appropriatly
*/
#include "gst_private.h" #include "gst_private.h"

View file

@ -38,21 +38,48 @@ G_BEGIN_DECLS
typedef struct _GstElementDetails GstElementDetails; typedef struct _GstElementDetails GstElementDetails;
/**
* GstElementDetails:
* @longname: long, english name
* @klass: type of element, as hierarchy
* @description: what the element is about
* @author: who wrote this thing?
*
* This struct defines the public information about a #GstElement. It contains
* meta-data about the element that is mostly for the benefit of editors.
*/
/* FIXME: need translatable stuff in here (how handle in registry)? */ /* FIXME: need translatable stuff in here (how handle in registry)? */
struct _GstElementDetails struct _GstElementDetails
{ {
/*< public > */ /*< public > */
gchar *longname; /* long, english name */ gchar *longname;
gchar *klass; /* type of element, as hierarchy */ gchar *klass;
gchar *description; /* insights of one form or another */ gchar *description;
gchar *author; /* who wrote this thing? */ gchar *author;
/*< private > */ /*< private > */
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
}; };
/**
* GST_ELEMENT_DETAILS:
* @longname: long, english name
* @klass: type of element, as hierarchy
* @description: what the element is about
* @author: who wrote this thing?
*
* Macro to initialize #GstElementDetails.
*/
#define GST_ELEMENT_DETAILS(longname,klass,description,author) \ #define GST_ELEMENT_DETAILS(longname,klass,description,author) \
{ longname, klass, description, author, {0} } { longname, klass, description, author, {0} }
/**
* GST_IS_ELEMENT_DETAILS:
* @details: the #GstElementDetails to check
*
* Tests if element details are initialized.
*/
/* FIXME: what about adding '&& (*__gst_reserved==NULL)' */
#define GST_IS_ELEMENT_DETAILS(details) ( \ #define GST_IS_ELEMENT_DETAILS(details) ( \
(details) && ((details)->longname != NULL) && ((details)->klass != NULL) \ (details) && ((details)->longname != NULL) && ((details)->klass != NULL) \
&& ((details)->description != NULL) && ((details)->author != NULL)) && ((details)->description != NULL) && ((details)->author != NULL))