2000-12-29 05:38:06 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
* 2000 Wim Taymans <wtay@chello.be>
|
|
|
|
*
|
2001-03-07 21:52:56 +00:00
|
|
|
* gstelements.c:
|
2000-01-30 09:03:00 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
|
2001-04-20 12:04:40 +00:00
|
|
|
#include "gstdisksink.h"
|
2001-01-18 23:46:15 +00:00
|
|
|
#include "gstidentity.h"
|
|
|
|
#include "gstfakesink.h"
|
|
|
|
#include "gstfakesrc.h"
|
|
|
|
#include "gstfdsink.h"
|
|
|
|
#include "gstfdsrc.h"
|
2001-03-24 17:22:03 +00:00
|
|
|
#include "gstmultidisksrc.h"
|
2001-01-18 23:46:15 +00:00
|
|
|
#include "gstpipefilter.h"
|
|
|
|
#include "gsttee.h"
|
2001-07-11 14:56:16 +00:00
|
|
|
#include "gstaggregator.h"
|
2001-10-24 22:42:40 +00:00
|
|
|
#include "gststatistics.h"
|
2002-01-29 20:06:07 +00:00
|
|
|
#include "gstmd5sink.h"
|
2000-01-30 09:03:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
struct _elements_entry {
|
|
|
|
gchar *name;
|
2001-06-25 01:20:11 +00:00
|
|
|
GType (*type) (void);
|
2000-01-30 09:03:00 +00:00
|
|
|
GstElementDetails *details;
|
2000-08-21 21:20:38 +00:00
|
|
|
gboolean (*factoryinit) (GstElementFactory *factory);
|
2000-01-30 09:03:00 +00:00
|
|
|
};
|
|
|
|
|
2001-08-22 04:30:27 +00:00
|
|
|
|
2001-08-29 00:24:26 +00:00
|
|
|
extern GType gst_filesrc_get_type(void);
|
2001-10-21 21:58:29 +00:00
|
|
|
extern GstElementDetails gst_filesrc_details;
|
2001-08-22 04:30:27 +00:00
|
|
|
|
2000-11-25 14:18:47 +00:00
|
|
|
static struct _elements_entry _elements[] = {
|
2001-07-11 15:51:40 +00:00
|
|
|
{ "fakesrc", gst_fakesrc_get_type, &gst_fakesrc_details, gst_fakesrc_factory_init },
|
2001-07-11 16:45:43 +00:00
|
|
|
{ "fakesink", gst_fakesink_get_type, &gst_fakesink_details, gst_fakesink_factory_init },
|
2001-08-22 04:30:27 +00:00
|
|
|
{ "filesrc", gst_filesrc_get_type, &gst_filesrc_details, NULL },
|
2001-04-20 12:04:40 +00:00
|
|
|
{ "disksink", gst_disksink_get_type, &gst_disksink_details, NULL },
|
2001-02-04 21:37:14 +00:00
|
|
|
{ "identity", gst_identity_get_type, &gst_identity_details, NULL },
|
|
|
|
{ "fdsink", gst_fdsink_get_type, &gst_fdsink_details, NULL },
|
|
|
|
{ "fdsrc", gst_fdsrc_get_type, &gst_fdsrc_details, NULL },
|
2001-03-24 17:22:03 +00:00
|
|
|
{ "multidisksrc", gst_multidisksrc_get_type, &gst_multidisksrc_details, NULL },
|
2001-02-04 21:37:14 +00:00
|
|
|
{ "pipefilter", gst_pipefilter_get_type, &gst_pipefilter_details, NULL },
|
|
|
|
{ "tee", gst_tee_get_type, &gst_tee_details, gst_tee_factory_init },
|
2001-07-11 14:56:16 +00:00
|
|
|
{ "aggregator", gst_aggregator_get_type, &gst_aggregator_details, gst_aggregator_factory_init },
|
2001-10-24 22:42:40 +00:00
|
|
|
{ "statistics", gst_statistics_get_type, &gst_statistics_details, NULL },
|
2002-01-29 20:06:07 +00:00
|
|
|
{ "md5sink", gst_md5sink_get_type, &gst_md5sink_details, gst_md5sink_factory_init },
|
2000-01-30 09:03:00 +00:00
|
|
|
{ NULL, 0 },
|
|
|
|
};
|
|
|
|
|
2001-04-22 12:30:14 +00:00
|
|
|
static gboolean
|
|
|
|
plugin_init (GModule *module, GstPlugin *plugin)
|
2000-11-25 14:18:47 +00:00
|
|
|
{
|
2000-01-30 09:03:00 +00:00
|
|
|
GstElementFactory *factory;
|
2000-11-25 14:18:47 +00:00
|
|
|
gint i = 0;
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2000-11-25 14:18:47 +00:00
|
|
|
gst_plugin_set_longname (plugin, "Standard GST Elements");
|
2000-01-30 09:03:00 +00:00
|
|
|
|
|
|
|
while (_elements[i].name) {
|
2000-11-25 14:18:47 +00:00
|
|
|
factory = gst_elementfactory_new (_elements[i].name,
|
|
|
|
(_elements[i].type) (),
|
|
|
|
_elements[i].details);
|
2001-09-13 01:16:45 +00:00
|
|
|
|
|
|
|
if (!factory)
|
|
|
|
{
|
|
|
|
g_warning ("gst_elementfactory_new failed for `%s'",
|
|
|
|
_elements[i].name);
|
|
|
|
continue;
|
2000-08-21 21:20:38 +00:00
|
|
|
}
|
2001-09-13 01:16:45 +00:00
|
|
|
|
|
|
|
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
|
|
|
|
if (_elements[i].factoryinit) {
|
|
|
|
_elements[i].factoryinit (factory);
|
2000-01-30 09:03:00 +00:00
|
|
|
}
|
2001-12-17 18:14:51 +00:00
|
|
|
/* g_print("added factory '%s'\n",_elements[i].name); */
|
2001-09-13 01:16:45 +00:00
|
|
|
|
2000-01-30 09:03:00 +00:00
|
|
|
i++;
|
|
|
|
}
|
|
|
|
|
2001-12-17 18:14:51 +00:00
|
|
|
/* INFO (GST_INFO_PLUGIN_LOAD,"gstelements: loaded %d standard elements", i);*/
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2001-04-22 12:30:14 +00:00
|
|
|
return TRUE;
|
2000-01-30 09:03:00 +00:00
|
|
|
}
|
2001-04-22 12:30:14 +00:00
|
|
|
|
|
|
|
GstPluginDesc plugin_desc = {
|
|
|
|
GST_VERSION_MAJOR,
|
|
|
|
GST_VERSION_MINOR,
|
|
|
|
"gstelements",
|
|
|
|
plugin_init
|
|
|
|
};
|
|
|
|
|