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
This commit is contained in:
David Schleef 2003-10-29 05:09:39 +00:00
parent ec3c196db4
commit c5d80ae83d

View file

@ -20,7 +20,7 @@
#include <string.h>
#include <gst/gstbytestream.h>
#include <gst/bytestream/bytestream.h>
#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;