summaryrefslogtreecommitdiffstats
path: root/gst/flx
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 /gst/flx
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 'gst/flx')
-rw-r--r--gst/flx/gstflxdec.c47
-rw-r--r--gst/flx/gstflxdec.h2
2 files changed, 4 insertions, 45 deletions
diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c
index 7ed55f1b..f4e085c3 100644
--- a/gst/flx/gstflxdec.c
+++ b/gst/flx/gstflxdec.c
@@ -28,8 +28,6 @@
#define JIFFIE (GST_SECOND/70)
-static GstCaps* flxdec_type_find (GstByteStream *bs, gpointer private);
-
/* flx element information */
static GstElementDetails flxdec_details = {
"FLX Decoder",
@@ -41,13 +39,6 @@ static GstElementDetails flxdec_details = {
"(C) 2001",
};
-static GstTypeDefinition flxdec_definition = {
- "flxdec_video/fli",
- "video/fli",
- ".flc .fli",
- flxdec_type_find,
-};
-
/* Flx signals and args */
enum {
/* FILL ME */
@@ -112,37 +103,6 @@ static void flx_decode_delta_flc (GstFlxDec *, guchar *, guchar *);
static GstElementClass *parent_class = NULL;
-static GstCaps*
-flxdec_type_find (GstByteStream *bs, gpointer private)
-{
- GstBuffer *buf = NULL;
- GstCaps *new = NULL;
-
- if (gst_bytestream_peek (bs, &buf, 134) == 134) {
- guint8 *data = GST_BUFFER_DATA (buf);
-
- /* check magic */
- if ((data[4] == 0x11 || data[4] == 0x12 ||
- data[4] == 0x30 || data[4] == 0x44) &&
- data[5] == 0xaf) {
- /* check the frame type of the first frame */
- if ((data[132] == 0x00 || data[132] == 0xfa) && data[133] == 0xf1) {
- GST_DEBUG ("GstFlxDec: found supported flx format");
- new = gst_caps_new ("flxdec_type_find",
- "video/x-fli",
- NULL);
- }
- }
- }
-
- if (buf != NULL) {
- gst_buffer_unref (buf);
- }
-
- return new;
-}
-
-
GType
gst_flxdec_get_type(void)
{
@@ -688,7 +648,9 @@ static gboolean
plugin_init (GModule *module, GstPlugin *plugin)
{
GstElementFactory *factory;
- GstTypeFactory *type;
+
+ if (!gst_library_load ("gstbytestream"))
+ return FALSE;
factory = gst_element_factory_new("flxdec", GST_TYPE_FLXDEC, &flxdec_details);
g_return_val_if_fail(factory != NULL, FALSE);
@@ -699,9 +661,6 @@ plugin_init (GModule *module, GstPlugin *plugin)
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
- type = gst_type_factory_new (&flxdec_definition);
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type));
-
return TRUE;
}
diff --git a/gst/flx/gstflxdec.h b/gst/flx/gstflxdec.h
index 0ee4b1c5..be4fa4ba 100644
--- a/gst/flx/gstflxdec.h
+++ b/gst/flx/gstflxdec.h
@@ -23,7 +23,7 @@
#include <gst/gst.h>
#include "flx_color.h"
-#include <gst/gstbytestream.h>
+#include <gst/bytestream.h>
#ifdef __cplusplus