From dc555da5f8ff6cdbd07d999a7c35e0ea293faa37 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 29 Oct 2003 05:09:38 +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/dv/gstdvdec.c | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/ext/dv/gstdvdec.c b/ext/dv/gstdvdec.c index 68ff1484ba..18cff96fbb 100644 --- a/ext/dv/gstdvdec.c +++ b/ext/dv/gstdvdec.c @@ -157,43 +157,6 @@ GST_PAD_TEMPLATE_FACTORY ( audio_src_temp, ) ) -/* typefind stuff */ -static GstCaps* -dv_type_find (GstByteStream *bs, gpointer private) -{ - GstBuffer *buf = NULL; - GstCaps *new = NULL; - - if (gst_bytestream_peek (bs, &buf, 5) == 5) { - guint32 head = GUINT32_FROM_BE (*((guint32 *) GST_BUFFER_DATA (buf))); - - /* check for DIF and DV flag */ - if ((head & 0xffffff00) == 0x1f070000 && - !(GST_BUFFER_DATA (buf)[4] & 0x01)) { - gchar *format; - - if ((head & 0x000000ff) & 0x80) - format = "PAL"; - else - format = "NTSC"; - - new = GST_CAPS_NEW ("dv_type_find", - "video/x-dv", - "systemstream", GST_PROPS_BOOLEAN (TRUE)); - } - } - - if (buf != NULL) { - gst_buffer_unref (buf); - } - - return new; -} - -static GstTypeDefinition dv_definition = { - "dv_video/dv", "video/x-dv", ".dv", dv_type_find -}; - #define GST_TYPE_DVDEC_QUALITY (gst_dvdec_quality_get_type()) GType gst_dvdec_quality_get_type (void) @@ -1004,7 +967,6 @@ static gboolean plugin_init (GModule *module, GstPlugin *plugin) { GstElementFactory *factory; - GstTypeFactory *type; if (!gst_library_load ("gstbytestream")) return FALSE; @@ -1029,9 +991,6 @@ plugin_init (GModule *module, GstPlugin *plugin) /* The very last thing is to register the elementfactory with the plugin. */ gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); - type = gst_type_factory_new (&dv_definition); - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type)); - return TRUE; }