From a4614f19e69ea978d27a6b42694eede2c0422024 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Thu, 22 Jan 2004 19:00:27 +0000 Subject: fix up media-info now reports format again metadata needs some rewriting Original commit message from CVS: fix up media-info now reports format again metadata needs some rewriting --- gst-libs/gst/media-info/media-info.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'gst-libs/gst/media-info/media-info.c') diff --git a/gst-libs/gst/media-info/media-info.c b/gst-libs/gst/media-info/media-info.c index a847785f..826d4fef 100644 --- a/gst-libs/gst/media-info/media-info.c +++ b/gst-libs/gst/media-info/media-info.c @@ -151,14 +151,19 @@ gst_media_info_instance_init (GstMediaInfo *info) info->priv->pipeline = gst_pipeline_new ("media-info"); + /* create the typefind element and make sure it stays around by reffing */ info->priv->typefind = gst_element_factory_make ("typefind", "typefind"); if (!GST_IS_ELEMENT (info->priv->typefind)) - /* FIXME */ g_error ("Cannot create typefind element !"); - - /* ref it so it never goes away on removal out of bins */ gst_object_ref (GST_OBJECT (info->priv->typefind)); + /* create the fakesink element and make sure it stays around by reffing */ + info->priv->fakesink = gst_element_factory_make ("fakesink", "fakesink"); + if (!GST_IS_ELEMENT (info->priv->fakesink)) + g_error ("Cannot create fakesink element !"); + gst_object_ref (GST_OBJECT (info->priv->fakesink)); + + /* use gnomevfssrc by default */ source = gst_element_factory_make ("gnomevfssrc", "source"); if (GST_IS_ELEMENT (source)) @@ -292,6 +297,7 @@ gst_media_info_read_idler (GstMediaInfo *info, GstMediaInfoStream **streamp) GST_DEBUG ("STATE_TYPEFIND"); if ((priv->type == NULL) && gst_bin_iterate (GST_BIN (priv->pipeline))) { + GST_DEBUG ("iterating while in STATE_TYPEFIND"); GMI_DEBUG("?"); return TRUE; } -- cgit v1.2.1