summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2003-10-28 20:52:41 +0000
committerBenjamin Otte <otte@gnome.org>2003-10-28 20:52:41 +0000
commitc9ae463a4f5c81e7c2a5f9c943480a89685e9be4 (patch)
tree54a66bf2f5ef869347b738b84a374a077de9d30b /ext
parentc4aacdb8e51ceb82f11b6b608aacaffc036d1fb2 (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 'ext')
-rw-r--r--ext/dv/gstdvdec.c3
-rw-r--r--ext/dv/gstdvdec.h2
-rw-r--r--ext/flac/gstflac.c41
-rw-r--r--ext/flac/gstflacdec.h2
-rw-r--r--ext/ladspa/gstladspa.h2
5 files changed, 9 insertions, 41 deletions
diff --git a/ext/dv/gstdvdec.c b/ext/dv/gstdvdec.c
index ecaa9736..68ff1484 100644
--- a/ext/dv/gstdvdec.c
+++ b/ext/dv/gstdvdec.c
@@ -1006,6 +1006,9 @@ plugin_init (GModule *module, GstPlugin *plugin)
GstElementFactory *factory;
GstTypeFactory *type;
+ if (!gst_library_load ("gstbytestream"))
+ return FALSE;
+
/* We need to create an ElementFactory for each element we provide.
* This consists of the name of the element, the GType identifier,
* and a pointer to the details structure at the top of the file.
diff --git a/ext/dv/gstdvdec.h b/ext/dv/gstdvdec.h
index cced0803..14525d1a 100644
--- a/ext/dv/gstdvdec.h
+++ b/ext/dv/gstdvdec.h
@@ -29,7 +29,7 @@ extern "C" {
#include <libdv/dv.h>
-#include <gst/gstbytestream.h>
+#include <gst/bytestream.h>
/* This is the definition of the element's object structure. */
diff --git a/ext/flac/gstflac.c b/ext/flac/gstflac.c
index 7393ef89..b4e9ccec 100644
--- a/ext/flac/gstflac.c
+++ b/ext/flac/gstflac.c
@@ -26,8 +26,6 @@
extern GstElementDetails flacenc_details;
extern GstElementDetails flacdec_details;
-static GstCaps* flac_type_find (GstByteStream *bs, gpointer private);
-
GstPadTemplate *gst_flacdec_src_template, *gst_flacdec_sink_template;
GstPadTemplate *gst_flacenc_src_template, *gst_flacenc_sink_template;
@@ -61,45 +59,15 @@ raw_caps_factory (void)
NULL));
}
-static GstTypeDefinition flacdefinition = {
- "flac_audio/x-flac",
- "audio/x-flac",
- ".flac",
- flac_type_find,
-};
-
-
-static GstCaps*
-flac_type_find (GstByteStream *bs, gpointer private)
-{
- GstBuffer *buf = NULL;
- GstCaps *new = NULL;
-
- if (gst_bytestream_peek (bs, &buf, 4) == 4) {
- guint32 head = GUINT32_FROM_BE (*((guint32 *) GST_BUFFER_DATA (buf)));
-
- if (head == 0x664C6143) {
- new = GST_CAPS_NEW ("flac_type_find",
- "application/x-flac",
- NULL);
- }
- }
-
- if (buf != NULL) {
- gst_buffer_unref (buf);
- }
-
- return new;
-}
-
-
static gboolean
plugin_init (GModule *module, GstPlugin *plugin)
{
GstElementFactory *enc, *dec;
- GstTypeFactory *type;
GstCaps *raw_caps, *flac_caps;
+ if (!gst_library_load ("gstbytestream"))
+ return FALSE;
+
gst_plugin_set_longname (plugin, "The FLAC Lossless compressor Codec");
/* create an elementfactory for the flacenc element */
@@ -144,9 +112,6 @@ plugin_init (GModule *module, GstPlugin *plugin)
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (dec));
- type = gst_type_factory_new (&flacdefinition);
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type));
-
return TRUE;
}
diff --git a/ext/flac/gstflacdec.h b/ext/flac/gstflacdec.h
index 0b374440..01930dc7 100644
--- a/ext/flac/gstflacdec.h
+++ b/ext/flac/gstflacdec.h
@@ -24,7 +24,7 @@
#include <config.h>
#include <gst/gst.h>
-#include <gst/gstbytestream.h>
+#include <gst/bytestream.h>
#include <FLAC/all.h>
diff --git a/ext/ladspa/gstladspa.h b/ext/ladspa/gstladspa.h
index 85348a95..a33062ff 100644
--- a/ext/ladspa/gstladspa.h
+++ b/ext/ladspa/gstladspa.h
@@ -26,7 +26,7 @@
#include <config.h>
#include <gst/gst.h>
-#include <gst/gstbytestream.h>
+#include <gst/bytestream.h>
#include "ladspa.h"