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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2003-06-29 14:05:49 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2000-01-30 09:03:00 +00:00
|
|
|
#include <gst/gst.h>
|
|
|
|
|
2001-01-18 23:46:15 +00:00
|
|
|
#include "gstfakesink.h"
|
|
|
|
#include "gstfakesrc.h"
|
2003-10-28 20:25:30 +00:00
|
|
|
#include "gstfilesink.h"
|
|
|
|
#include "gstfilesrc.h"
|
|
|
|
#include "gstidentity.h"
|
|
|
|
#include "gsttee.h"
|
2004-04-29 00:32:28 +00:00
|
|
|
#include "gsttypefindelement.h"
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
struct _elements_entry
|
|
|
|
{
|
2000-01-30 09:03:00 +00:00
|
|
|
gchar *name;
|
2003-10-31 19:32:47 +00:00
|
|
|
guint rank;
|
2004-03-13 15:27:01 +00:00
|
|
|
GType (*type) (void);
|
2000-01-30 09:03:00 +00:00
|
|
|
};
|
|
|
|
|
2001-08-22 04:30:27 +00:00
|
|
|
|
2005-04-24 21:16:45 +00:00
|
|
|
extern GType gst_capsfilter_get_type (void);
|
2004-03-13 15:27:01 +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[] = {
|
2005-04-24 21:16:45 +00:00
|
|
|
{"capsfilter", GST_RANK_NONE, gst_capsfilter_get_type},
|
2004-03-13 15:27:01 +00:00
|
|
|
{"fakesrc", GST_RANK_NONE, gst_fakesrc_get_type},
|
|
|
|
{"fakesink", GST_RANK_NONE, gst_fakesink_get_type},
|
|
|
|
{"filesrc", GST_RANK_NONE, gst_filesrc_get_type},
|
|
|
|
{"identity", GST_RANK_NONE, gst_identity_get_type},
|
gst/: Added object to help in making collect pad based elements.
Original commit message from CVS:
* gst/base/Makefile.am:
* gst/base/gstbasesink.h:
* gst/base/gstbasesrc.c: (gst_basesrc_init),
(gst_basesrc_set_dataflow_funcs), (gst_basesrc_query):
* gst/base/gstcollectpads.c: (gst_collectpads_get_type),
(gst_collectpads_class_init), (gst_collectpads_init),
(gst_collectpads_finalize), (gst_collectpads_new),
(gst_collectpads_set_function), (gst_collectpads_add_pad),
(find_pad), (gst_collectpads_remove_pad),
(gst_collectpads_is_active), (gst_collectpads_collect),
(gst_collectpads_collect_range), (gst_collectpads_start),
(gst_collectpads_stop), (gst_collectpads_peek),
(gst_collectpads_pop), (gst_collectpads_available),
(gst_collectpads_read), (gst_collectpads_flush),
(gst_collectpads_chain):
* gst/base/gstcollectpads.h:
* gst/elements/Makefile.am:
* gst/elements/gstelements.c:
* gst/elements/gstfakesink.c: (gst_fakesink_class_init),
(gst_fakesink_get_times), (gst_fakesink_event),
(gst_fakesink_preroll), (gst_fakesink_render):
* gst/elements/gstfilesink.c: (gst_filesink_class_init),
(gst_filesink_init), (gst_filesink_set_location),
(gst_filesink_open_file), (gst_filesink_close_file),
(gst_filesink_pad_query), (gst_filesink_event),
(gst_filesink_render), (gst_filesink_change_state):
* gst/elements/gstfilesink.h:
Added object to help in making collect pad based elements.
Ported filesink.
Make event function in sink baseclass return gboolean.
2005-05-05 09:31:59 +00:00
|
|
|
{"filesink", GST_RANK_NONE, gst_filesink_get_type},
|
2004-03-13 15:27:01 +00:00
|
|
|
{"tee", GST_RANK_NONE, gst_tee_get_type},
|
2005-04-12 10:52:55 +00:00
|
|
|
{"typefind", GST_RANK_NONE, gst_type_find_element_get_type},
|
GCC 4 fixen.
Original commit message from CVS:
2005-05-04 Andy Wingo <wingo@pobox.com>
* check/Makefile.am:
* docs/gst/tmpl/gstatomic.sgml:
* docs/gst/tmpl/gstplugin.sgml:
* gst/base/gstbasesink.c: (gst_basesink_activate):
* gst/base/gstbasesrc.c: (gst_basesrc_class_init),
(gst_basesrc_init), (gst_basesrc_set_dataflow_funcs),
(gst_basesrc_query), (gst_basesrc_set_property),
(gst_basesrc_get_property), (gst_basesrc_check_get_range),
(gst_basesrc_activate):
* gst/base/gstbasesrc.h:
* gst/base/gstbasetransform.c: (gst_base_transform_sink_activate),
(gst_base_transform_src_activate):
* gst/elements/gstelements.c:
* gst/elements/gstfakesrc.c: (gst_fakesrc_class_init),
(gst_fakesrc_set_property), (gst_fakesrc_get_property):
* gst/elements/gsttee.c: (gst_tee_sink_activate):
* gst/elements/gsttypefindelement.c: (find_element_get_length),
(gst_type_find_element_checkgetrange),
(gst_type_find_element_activate):
* gst/gstbin.c: (gst_bin_save_thyself), (gst_bin_restore_thyself):
* gst/gstcaps.c: (gst_caps_do_simplify), (gst_caps_save_thyself),
(gst_caps_load_thyself):
* gst/gstelement.c: (gst_element_pads_activate),
(gst_element_save_thyself), (gst_element_restore_thyself):
* gst/gstpad.c: (gst_pad_load_and_link), (gst_pad_save_thyself),
(gst_ghost_pad_save_thyself), (gst_pad_check_pull_range):
* gst/gstpad.h:
* gst/gstxml.c: (gst_xml_write), (gst_xml_parse_doc),
(gst_xml_parse_file), (gst_xml_parse_memory),
(gst_xml_get_element), (gst_xml_make_element):
* gst/indexers/gstfileindex.c: (gst_file_index_load),
(_file_index_id_save_xml), (gst_file_index_commit):
* gst/registries/gstlibxmlregistry.c: (read_string), (read_uint),
(read_enum), (load_pad_template), (load_feature), (load_plugin),
(load_paths):
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_caps),
(gst_dp_packet_from_event), (gst_dp_caps_from_packet):
* tools/gst-complete.c: (main):
* tools/gst-compprep.c: (main):
* tools/gst-inspect.c: (print_element_properties_info):
* tools/gst-launch.c: (xmllaunch_parse_cmdline):
* tools/gst-xmlinspect.c: (print_element_properties):
GCC 4 fixen.
2005-05-04 21:29:44 +00:00
|
|
|
{NULL, 0},
|
2000-01-30 09:03:00 +00:00
|
|
|
};
|
|
|
|
|
2001-04-22 12:30:14 +00:00
|
|
|
static gboolean
|
2004-03-13 15:27:01 +00:00
|
|
|
plugin_init (GstPlugin * plugin)
|
2000-11-25 14:18:47 +00:00
|
|
|
{
|
2003-10-31 19:32:47 +00:00
|
|
|
struct _elements_entry *my_elements = _elements;
|
2004-03-13 15:27:01 +00:00
|
|
|
|
|
|
|
while ((*my_elements).name) {
|
|
|
|
if (!gst_element_register (plugin, (*my_elements).name, (*my_elements).rank,
|
2004-03-15 19:27:17 +00:00
|
|
|
((*my_elements).type) ()))
|
2003-10-31 19:32:47 +00:00
|
|
|
return FALSE;
|
|
|
|
my_elements++;
|
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
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
|
|
|
GST_VERSION_MINOR,
|
|
|
|
"gstelements",
|
|
|
|
"standard GStreamer elements",
|
|
|
|
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
|