summaryrefslogtreecommitdiffstats
path: root/gst/avi/gstavidemux.c
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/avi/gstavidemux.c
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/avi/gstavidemux.c')
-rw-r--r--gst/avi/gstavidemux.c43
1 files changed, 2 insertions, 41 deletions
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c
index 09fe61a3..f0e6d38a 100644
--- a/gst/avi/gstavidemux.c
+++ b/gst/avi/gstavidemux.c
@@ -38,16 +38,6 @@ static GstElementDetails gst_avi_demux_details = {
"(C) 1999",
};
-static GstCaps* avi_type_find (GstByteStream *bs, gpointer private);
-
-/* typefactory for 'avi' */
-static GstTypeDefinition avidefinition = {
- "avidemux_video/avi",
- "video/avi",
- ".avi",
- avi_type_find,
-};
-
/* AviDemux signals and args */
enum {
/* FILL ME */
@@ -172,33 +162,6 @@ gst_avi_demux_init (GstAviDemux *avi_demux)
gst_element_set_loop_function (GST_ELEMENT (avi_demux), gst_avi_demux_loop);
}
-static GstCaps*
-avi_type_find (GstByteStream *bs,
- gpointer private)
-{
- GstBuffer *buf = NULL;
- GstCaps *new = NULL;
-
- GST_DEBUG ("avi_demux: 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_AVI) {
- new = GST_CAPS_NEW ("avi_type_find",
- "video/avi",
- NULL);
- }
- }
-
- if (buf != NULL) {
- gst_buffer_unref (buf);
- }
-
- return new;
-}
-
static gboolean
gst_avi_demux_avih (GstAviDemux *avi_demux)
{
@@ -1932,7 +1895,6 @@ static gboolean
plugin_init (GModule *module, GstPlugin *plugin)
{
GstElementFactory *factory;
- GstTypeFactory *type;
gint i = 0;
GstCaps *audcaps = NULL, *vidcaps = NULL, *temp;
guint32 vid_list[] = {
@@ -1965,6 +1927,8 @@ plugin_init (GModule *module, GstPlugin *plugin)
-1 /* end */
};
+ if (!gst_library_load ("gstbytestream"))
+ return FALSE;
if (!gst_library_load ("gstriff"))
return FALSE;
@@ -1997,9 +1961,6 @@ plugin_init (GModule *module, GstPlugin *plugin)
gst_element_factory_add_pad_template (factory,
GST_PAD_TEMPLATE_GET (sink_templ));
- type = gst_type_factory_new (&avidefinition);
- gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (type));
-
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
return TRUE;