2000-01-30 09:03:00 +00:00
|
|
|
/* Gnome-Streamer
|
|
|
|
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
*
|
|
|
|
* 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>
|
|
|
|
|
|
|
|
#include <gstasyncdisksrc.h>
|
|
|
|
#include <gstaudiosink.h>
|
|
|
|
#include <gstaudiosrc.h>
|
|
|
|
#include <gstdisksrc.h>
|
|
|
|
#include <gstidentity.h>
|
|
|
|
#include <gstfakesink.h>
|
|
|
|
#include <gstfakesrc.h>
|
|
|
|
#include <gstfdsink.h>
|
|
|
|
#include <gstfdsrc.h>
|
2000-02-01 04:10:58 +00:00
|
|
|
#if HAVE_LIBGHTTP
|
2000-01-30 09:03:00 +00:00
|
|
|
#include <gsthttpsrc.h>
|
2000-02-01 04:10:58 +00:00
|
|
|
#endif /* HAVE_LIBGHTTP */
|
2000-05-28 19:59:46 +00:00
|
|
|
#include <gstpipefilter.h>
|
2000-01-30 09:03:00 +00:00
|
|
|
#include <gstqueue.h>
|
|
|
|
#include <gstsinesrc.h>
|
2000-06-25 21:38:00 +00:00
|
|
|
#include <gsttypefind.h>
|
2000-01-30 09:03:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
struct _elements_entry {
|
|
|
|
gchar *name;
|
|
|
|
GtkType (*type) (void);
|
|
|
|
GstElementDetails *details;
|
2000-08-21 21:20:38 +00:00
|
|
|
gboolean (*factoryinit) (GstElementFactory *factory);
|
2000-01-30 09:03:00 +00:00
|
|
|
};
|
|
|
|
|
2000-11-25 14:18:47 +00:00
|
|
|
static struct _elements_entry _elements[] = {
|
|
|
|
{ "fakesrc", gst_fakesrc_get_type, &gst_fakesrc_details, NULL },
|
|
|
|
{ "fakesink", gst_fakesink_get_type, &gst_fakesink_details, NULL },
|
|
|
|
{ "asyncdisksrc", gst_asyncdisksrc_get_type, &gst_asyncdisksrc_details, NULL },
|
|
|
|
{ "audiosink", gst_audiosink_get_type, &gst_audiosink_details, gst_audiosink_factory_init },
|
|
|
|
{ "audiosrc", gst_audiosrc_get_type, &gst_audiosrc_details, NULL },
|
|
|
|
{ "disksrc", gst_disksrc_get_type, &gst_disksrc_details, NULL },
|
|
|
|
{ "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 },
|
2000-02-01 04:10:58 +00:00
|
|
|
#if HAVE_LIBGHTTP
|
2000-11-25 14:18:47 +00:00
|
|
|
{ "httpsrc", gst_httpsrc_get_type, &gst_httpsrc_details, NULL },
|
2000-02-01 04:10:58 +00:00
|
|
|
#endif /* HAVE_LIBGHTTP */
|
2000-11-25 14:18:47 +00:00
|
|
|
{ "pipefilter", gst_pipefilter_get_type, &gst_pipefilter_details, NULL },
|
|
|
|
{ "queue", gst_queue_get_type, &gst_queue_details, NULL },
|
|
|
|
{ "sinesrc", gst_sinesrc_get_type, &gst_sinesrc_details, NULL },
|
|
|
|
{ "typefind", gst_typefind_get_type, &gst_typefind_details, NULL },
|
|
|
|
|
2000-01-30 09:03:00 +00:00
|
|
|
{ NULL, 0 },
|
|
|
|
};
|
|
|
|
|
2000-11-25 14:18:47 +00:00
|
|
|
GstPlugin *plugin_init (GModule *module)
|
|
|
|
{
|
2000-01-30 09:03:00 +00:00
|
|
|
GstPlugin *plugin;
|
|
|
|
GstElementFactory *factory;
|
2000-11-25 14:18:47 +00:00
|
|
|
gint i = 0;
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2000-11-25 07:43:57 +00:00
|
|
|
/* we depend on having the usual types loaded first */
|
|
|
|
gst_plugin_load("gsttypes");
|
|
|
|
|
2000-01-30 09:03:00 +00:00
|
|
|
plugin = gst_plugin_new("gstelements");
|
|
|
|
g_return_val_if_fail(plugin != NULL,NULL);
|
|
|
|
|
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);
|
2000-01-30 09:03:00 +00:00
|
|
|
if (factory != NULL) {
|
2000-11-25 14:18:47 +00:00
|
|
|
gst_plugin_add_factory (plugin, factory);
|
2000-08-21 21:20:38 +00:00
|
|
|
if (_elements[i].factoryinit) {
|
2000-11-25 14:18:47 +00:00
|
|
|
_elements[i].factoryinit (factory);
|
2000-08-21 21:20:38 +00:00
|
|
|
}
|
|
|
|
// g_print("added factory '%s'\n",_elements[i].name);
|
2000-01-30 09:03:00 +00:00
|
|
|
}
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
|
2000-11-25 14:18:47 +00:00
|
|
|
gst_info ("gstelements: loaded %d standard elements\n", i);
|
2000-01-30 09:03:00 +00:00
|
|
|
|
|
|
|
return plugin;
|
|
|
|
}
|