gst_object_unref (new_factory);
}
}
+
+/**
+ * gst_type_find_factory_has_function:
+ * @factory: A #GstTypeFindFactory
+ *
+ * Check whether the factory has a typefind function. Typefind factories
+ * without typefind functions are a last-effort fallback mechanism to
+ * e.g. assume a certain media type based on the file extension.
+ *
+ * Returns: TRUE if the factory has a typefind functions set, otherwise FALSE
+ */
+gboolean
+gst_type_find_factory_has_function (GstTypeFindFactory * factory)
+{
+ g_return_val_if_fail (GST_IS_TYPE_FIND_FACTORY (factory), FALSE);
+
+ return (factory->function != NULL);
+}
gchar ** gst_type_find_factory_get_extensions (GstTypeFindFactory *factory);
GstCaps * gst_type_find_factory_get_caps (GstTypeFindFactory *factory);
+gboolean gst_type_find_factory_has_function (GstTypeFindFactory *factory);
void gst_type_find_factory_call_function (GstTypeFindFactory *factory,
GstTypeFind *find);
factory = GST_TYPE_FIND_FACTORY (l->data);
/* we only want to check those factories without a function */
- if (factory->function != NULL)
+ if (gst_type_find_factory_has_function (factory))
continue;
/* get the extension that this typefind factory can handle */