From c9ae463a4f5c81e7c2a5f9c943480a89685e9be4 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 28 Oct 2003 20:52:41 +0000 Subject: merge TYPEFIND branch. Major changes: Original commit message from CVS: merge TYPEFIND branch. Major changes: - totally reworked type(find) system - all typefind functions are in gst/typefind now - more typefind functions then before - some plugins might fail to compile now because I don't have them installed and they a) require bytestream or b) haven't had their typefind fixed. Please fix those plugins and put the typefind functions into gst/typefind if they don't have dependencies --- gst/auparse/gstauparse.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'gst/auparse/gstauparse.c') diff --git a/gst/auparse/gstauparse.c b/gst/auparse/gstauparse.c index 744b5cb3..bfb54be6 100644 --- a/gst/auparse/gstauparse.c +++ b/gst/auparse/gstauparse.c @@ -29,7 +29,6 @@ #include - /* elementfactory information */ static GstElementDetails gst_auparse_details = { ".au parser", @@ -41,36 +40,6 @@ static GstElementDetails gst_auparse_details = { "(C) 1999", }; -static GstCaps* -au_type_find (GstByteStream *bs, gpointer private) -{ - GstBuffer *buf = NULL; - GstCaps *new = NULL; - - if (gst_bytestream_peek (bs, &buf, 4) == 4) { - guint32 head = * (guint32 *) GST_BUFFER_DATA (buf); - if (head == 0x2e736e64 || head == 0x646e732e) { - new = gst_caps_new ("au_type_find", - "audio/x-au", - NULL); - } - } - - if (buf != NULL) { - gst_buffer_unref (buf); - } - - return new; -} - -/* typefactory for 'au' */ -static GstTypeDefinition audefinition = { - "auparse_audio/au", - "audio/x-au", - ".au", - au_type_find, -}; - GST_PAD_TEMPLATE_FACTORY (sink_factory_templ, "sink", GST_PAD_SINK, @@ -318,7 +287,6 @@ static gboolean plugin_init (GModule *module, GstPlugin *plugin) { GstElementFactory *factory; - GstTypeFactory *type; /* create the plugin structure */ /* create an elementfactory for the auparse element and list it */ @@ -330,10 +298,7 @@ plugin_init (GModule *module, GstPlugin *plugin) gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sink_factory_templ)); gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_factory_templ)); - type = gst_type_factory_new (&audefinition); - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type)); return TRUE; } -- cgit