GNOME Bugzilla – Bug 342432
buggy code in help examples /2
Last modified: 2012-10-09 16:02:26 UTC
(1) in http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-dynamic.html replace factories = gst_registry_pool_feature_filter ( (GstPluginFeatureFilter) cb_feature_filter, FALSE, NULL); with something like factories = gst_registry_feature_filter ( gst_registry_get_default(), (GstPluginFeatureFilter) cb_feature_filter, FALSE, NULL); and replace gst_bin_add (GST_BIN (pipeline), sinkelement); with smth like gst_bin_add (GST_BIN (gst_pad_get_parent (srcpad)), sinkelement); (at least, this way it compiles, but segfaults after detecting correct media type) thank alb
There's quite a bit that needs fixing in this example. Would be nice if we could just replace a whole chunk of code there with gst_element_factory_can_sink_caps() as well, alas: it doesn't work right (e.g. won't match audio/mpeg,mpegversion=1,layer=2 to mad's template caps because those contain additional rate/channel parameters). Not entirely sure what the point of the entire chapter is anyway (too advanced and specialized IMHO).
The section tried to explain how to handle sometimes pads and plug a suitable element. I agree it is quite special. Shall we just remove the chapter? Or focus on registry look-ups (the first example).
"Fixed" :) commit 775594fa3bd17c0cb72655dfb33fe086def56c59 Author: Wim Taymans <wim.taymans@collabora.co.uk> Date: Tue Oct 9 17:06:04 2012 +0200 manual: remove outdated autoplugging section Remove autoplugging chapter and point to decodebin/playbin examples.