summaryrefslogtreecommitdiffstats
path: root/gst/cdxaparse
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
commit5bb80c9f5359a446d52ad7824095ae4c67bf3cdf (patch)
tree389f062ecc5627e362c48b89fda7257d10fa8d8c /gst/cdxaparse
parent680f08e33306ff907e31b3c9db70e132fc9a5158 (diff)
downloadgst-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/cdxaparse')
-rw-r--r--gst/cdxaparse/gstcdxaparse.c44
-rw-r--r--gst/cdxaparse/gstcdxaparse.h2
2 files changed, 4 insertions, 42 deletions
diff --git a/gst/cdxaparse/gstcdxaparse.c b/gst/cdxaparse/gstcdxaparse.c
index a601b727..2ee3071d 100644
--- a/gst/cdxaparse/gstcdxaparse.c
+++ b/gst/cdxaparse/gstcdxaparse.c
@@ -50,16 +50,6 @@ static GstElementDetails gst_cdxa_parse_details = {
"(C) 2002",
};
-static GstCaps* cdxa_type_find (GstByteStream *bs, gpointer private);
-
-/* typefactory for 'cdxa' */
-static GstTypeDefinition cdxadefinition = {
- "cdxaparse_video",
- "video/x-cdxa",
- ".dat",
- cdxa_type_find,
-};
-
/* CDXAParse signals and args */
enum {
/* FILL ME */
@@ -158,33 +148,6 @@ gst_cdxa_parse_init (GstCDXAParse *cdxa_parse)
}
-static GstCaps*
-cdxa_type_find (GstByteStream *bs,
- gpointer private)
-{
- GstBuffer *buf = NULL;
- GstCaps *new = NULL;
-
- GST_DEBUG ("cdxa_parse: typefind");
-
- if (gst_bytestream_peek (bs, &buf, 12) == 12) {
- guint32 head1 = GUINT32_FROM_LE (((guint32 *) GST_BUFFER_DATA (buf))[0]),
- head2 = GUINT32_FROM_LE (((guint32 *) GST_BUFFER_DATA (buf))[2]);
-
- if (head1 == GST_RIFF_TAG_RIFF && head2 == GST_RIFF_RIFF_CDXA) {
- new = GST_CAPS_NEW ("cdxa_type_find",
- "video/x-cdxa",
- NULL);
- }
- }
-
- if (buf != NULL) {
- gst_buffer_unref (buf);
- }
-
- return new;
-}
-
static gboolean
gst_cdxa_parse_handle_event (GstCDXAParse *cdxa_parse)
{
@@ -343,7 +306,9 @@ static gboolean
plugin_init (GModule *module, GstPlugin *plugin)
{
GstElementFactory *factory;
- GstTypeFactory *type;
+
+ if (!gst_library_load ("gstbytestream"))
+ return FALSE;
/* create an elementfactory for the cdxa_parse element */
factory = gst_element_factory_new ("cdxaparse", GST_TYPE_CDXA_PARSE,
@@ -353,9 +318,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 (&cdxadefinition);
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type));
-
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
return TRUE;
diff --git a/gst/cdxaparse/gstcdxaparse.h b/gst/cdxaparse/gstcdxaparse.h
index c46df149..ff466014 100644
--- a/gst/cdxaparse/gstcdxaparse.h
+++ b/gst/cdxaparse/gstcdxaparse.h
@@ -24,7 +24,7 @@
#include <config.h>
#include <gst/gst.h>
-#include <gst/gstbytestream.h>
+#include <gst/bytestream.h>
#ifdef __cplusplus
extern "C" {