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 | 5bb80c9f5359a446d52ad7824095ae4c67bf3cdf (patch) | |
tree | 389f062ecc5627e362c48b89fda7257d10fa8d8c /gst/qtdemux | |
parent | 680f08e33306ff907e31b3c9db70e132fc9a5158 (diff) | |
download | gst-plugins-bad-5bb80c9f5359a446d52ad7824095ae4c67bf3cdf.tar.gz gst-plugins-bad-5bb80c9f5359a446d52ad7824095ae4c67bf3cdf.tar.bz2 gst-plugins-bad-5bb80c9f5359a446d52ad7824095ae4c67bf3cdf.zip |
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/qtdemux')
-rw-r--r-- | gst/qtdemux/qtdemux.c | 42 | ||||
-rw-r--r-- | gst/qtdemux/qtdemux.h | 2 |
2 files changed, 4 insertions, 40 deletions
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index dfd4b2c5..06352f1d 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -104,15 +104,6 @@ gst_qtdemux_details = "(C) 2003", }; -static GstCaps* quicktime_type_find (GstByteStream *bs, gpointer private); - -static GstTypeDefinition quicktimedefinition = { - "qtdemux_video/quicktime", - "video/quicktime", - ".mov", - quicktime_type_find, -}; - enum { LAST_SIGNAL }; @@ -186,37 +177,10 @@ gst_qtdemux_init (GstQTDemux *qtdemux) gst_element_add_pad (GST_ELEMENT (qtdemux), qtdemux->sinkpad); } -static GstCaps* -quicktime_type_find (GstByteStream *bs, gpointer private) -{ - GstBuffer *buf = NULL; - GstCaps *new = NULL; - - if (gst_bytestream_peek (bs, &buf, 8) == 8) { - gchar *data = GST_BUFFER_DATA (buf); - - if (!strncmp (&data[4], "wide", 4) || - !strncmp (&data[4], "moov", 4) || - !strncmp (&data[4], "mdat", 4) || - !strncmp (&data[4], "free", 4)) { - new = GST_CAPS_NEW ("quicktime_type_find", - "video/quicktime", - NULL); - } - } - - if (buf != NULL) { - gst_buffer_unref (buf); - } - - return new; -} - static gboolean plugin_init (GModule *module, GstPlugin *plugin) { GstElementFactory *factory; - GstTypeFactory *type; GstCaps *audiocaps = NULL, *videocaps = NULL, *temp; const guint32 audio_fcc[] = { /* FILLME */ @@ -227,6 +191,9 @@ plugin_init (GModule *module, GstPlugin *plugin) }; gint i; + if (!gst_library_load ("gstbytestream")) + return FALSE; + factory = gst_element_factory_new ("qtdemux", GST_TYPE_QTDEMUX, &gst_qtdemux_details); g_return_val_if_fail(factory != NULL, FALSE); @@ -254,9 +221,6 @@ plugin_init (GModule *module, GstPlugin *plugin) gst_element_factory_add_pad_template (factory, videosrctempl); gst_element_factory_add_pad_template (factory, audiosrctempl); - type = gst_type_factory_new (&quicktimedefinition); - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type)); - gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory)); return TRUE; diff --git a/gst/qtdemux/qtdemux.h b/gst/qtdemux/qtdemux.h index 46684be8..c005a96e 100644 --- a/gst/qtdemux/qtdemux.h +++ b/gst/qtdemux/qtdemux.h @@ -22,7 +22,7 @@ #define __GST_QTDEMUX_H__ #include <gst/gst.h> -#include <gst/gstbytestream.h> +#include <gst/bytestream.h> #ifdef __cplusplus extern "C" { |