From c5d80ae83d57e8fe26b4bcda3b29b4433f496afb Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 29 Oct 2003 05:09:39 +0000 Subject: [PATCH] Move a few typefind functions to gst/typefind, remove all old typefinding code from bitrotten plugins Original commit message from CVS: Move a few typefind functions to gst/typefind, remove all old typefinding code from bitrotten plugins --- ext/sidplay/gstsiddec.cc | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/ext/sidplay/gstsiddec.cc b/ext/sidplay/gstsiddec.cc index da7e11d9f4..021662cf68 100644 --- a/ext/sidplay/gstsiddec.cc +++ b/ext/sidplay/gstsiddec.cc @@ -20,7 +20,7 @@ #include -#include +#include #include "gstsiddec.h" @@ -35,17 +35,6 @@ static GstElementDetails gst_siddec_details = { "(C) 2001", }; -static GstCaps* sid_typefind (GstByteStream *bs, gpointer priv); - -/* typefactory for 'sid' */ -static GstTypeDefinition siddefinition = { - "siddec_audio/sid", - "audio/x-sid", - ".sid", - sid_typefind, -}; - - /* Sidec signals and args */ enum { /* FILL ME */ @@ -185,26 +174,6 @@ gst_siddec_get_type (void) return siddec_type; } -static GstCaps* -sid_typefind (GstByteStream *bs, gpointer priv) -{ - guchar *data; - GstBuffer *buffer; - GstCaps *newcaps; - - GST_DEBUG ("sid_demux: typefind"); - - gst_bytestream_peek (bs, &buffer, 4); - data = GST_BUFFER_DATA (buffer); - - if (strncmp ((const char *)data, "PSID", 4)) - return NULL; - - newcaps = gst_caps_new ("sid_typefind","audio/x-sid", NULL); - - return newcaps; -} - static void gst_siddec_class_init (GstSidDec *klass) { @@ -660,7 +629,6 @@ static gboolean plugin_init (GModule *module, GstPlugin *plugin) { GstElementFactory *factory; - GstTypeFactory *type; /* create an elementfactory for the avi_demux element */ factory = gst_element_factory_new ("siddec",GST_TYPE_SIDDEC, @@ -671,9 +639,6 @@ plugin_init (GModule *module, GstPlugin *plugin) gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (src_templ)); gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (sink_templ)); - type = gst_type_factory_new (&siddefinition); - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type)); - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); return TRUE;