working with typefind
Tim Müller
tim at centricular.com
Wed Apr 2 03:03:01 PDT 2014
On Wed, 2014-04-02 at 14:35 +0530, Vijay Vikram wrote:
Hi,
> Need some help with typefind element.
>
> I am currently working with gstreamer 1.2.3 and I want to disable flac
> file support for some reason so that playbin can not pick
> flacparse/flacdec.
>
> I believe this has some thing to typefind.
>
> Can you please sugegst how can I do that?
The easiest way might be to do something like:
GstPluginFeature *feature;
GstRegistry *registry;
registry = gst_registry_get();
feature = gst_registry_lookup_feature (registry, "flacparse");
if (feature != NULL) {
gst_plugin_feature_set_rank (feature, GST_RANK_NONE);
gst_object_unref (feature);
}
feature = gst_registry_lookup_feature (registry, "flacdec");
if (feature != NULL) {
gst_plugin_feature_set_rank (feature, GST_RANK_NONE);
gst_object_unref (feature);
}
feature = gst_registry_lookup_feature (registry, "avdec_flac");
if (feature != NULL) {
gst_plugin_feature_set_rank (feature, GST_RANK_NONE);
gst_object_unref (feature);
}
The typefinder will still detect the file as flac then, but it won't
plug any of the above plugins any more because they have no rank.
Cheers
-Tim
--
Tim Müller, Centricular Ltd - http://www.centricular.com
More information about the gstreamer-devel
mailing list