diff options
author | Benjamin Otte <otte@gnome.org> | 2003-10-28 20:52:41 +0000 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2003-10-28 20:52:41 +0000 |
commit | c9ae463a4f5c81e7c2a5f9c943480a89685e9be4 (patch) | |
tree | 54a66bf2f5ef869347b738b84a374a077de9d30b /gst/wavparse/gstwavparse.c | |
parent | c4aacdb8e51ceb82f11b6b608aacaffc036d1fb2 (diff) |
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
Diffstat (limited to 'gst/wavparse/gstwavparse.c')
-rw-r--r-- | gst/wavparse/gstwavparse.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c index 3aee045d..8c9c3a62 100644 --- a/gst/wavparse/gstwavparse.c +++ b/gst/wavparse/gstwavparse.c @@ -31,9 +31,6 @@ static void gst_wavparse_init (GstWavParse *wavparse); static GstElementStateReturn gst_wavparse_change_state (GstElement *element); -static GstCaps* wav_type_find (GstByteStream *bs, - gpointer private); - static const GstFormat* gst_wavparse_get_formats (GstPad *pad); static const GstQueryType * gst_wavparse_get_query_types (GstPad *pad); @@ -119,17 +116,6 @@ GST_PAD_TEMPLATE_FACTORY (src_template_factory, ) ) -/* typefactory for 'wav' */ -static GstTypeDefinition -wavdefinition = -{ - "wavparse_audio/x-wav", - "audio/x-wav", - ".wav", - wav_type_find, -}; - - /* WavParse signals and args */ enum { /* FILL ME */ @@ -243,30 +229,6 @@ gst_wavparse_get_property (GObject *object, } } -static GstCaps* -wav_type_find (GstByteStream *bs, gpointer private) -{ - GstCaps *new = NULL; - GstBuffer *buf = NULL; - - if (gst_bytestream_peek (bs, &buf, 12) == 12) { - gchar *data = GST_BUFFER_DATA (buf); - - if (!strncmp (&data[0], "RIFF", 4) && - !strncmp (&data[8], "WAVE", 4)) { - new = GST_CAPS_NEW ("wav_type_find", - "audio/x-wav", - NULL); - } - } - - if (buf != NULL) { - gst_buffer_unref (buf); - } - - return new; -} - static void demux_metadata (GstWavParse *wavparse, const char *data, @@ -880,7 +842,6 @@ static gboolean plugin_init (GModule *module, GstPlugin *plugin) { GstElementFactory *factory; - GstTypeFactory *type; if(!gst_library_load("gstriff")){ return FALSE; @@ -898,9 +859,6 @@ plugin_init (GModule *module, GstPlugin *plugin) gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); - type = gst_type_factory_new (&wavdefinition); - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type)); - return TRUE; } |