{
/* first filter out the interesting element factories */
factories = gst_registry_feature_filter (
- gst_registry_get_default (),
+ gst_registry_get (),
(GstPluginFeatureFilter) cb_feature_filter, FALSE, NULL);
/* sort them according to their ranks */
which will continue with the above approach.
</para>
<programlisting><!-- example-begin dynamic.c c -->
-static void try_to_plug (GstPad *pad, const GstCaps *caps);
+static void try_to_plug (GstPad *pad, GstCaps *caps);
static GstElement *audiosink;
{
GstCaps *caps;
- caps = gst_pad_get_caps (pad, NULL);
+ caps = gst_pad_query_caps (pad, NULL);
try_to_plug (pad, caps);
gst_caps_unref (caps);
}
switch (templ->presence) {
case GST_PAD_ALWAYS: {
GstPad *pad = gst_element_get_static_pad (sinkelement, templ->name_template);
- GstCaps *caps = gst_pad_get_caps (pad, NULL);
+ GstCaps *caps = gst_pad_query_caps (pad, NULL);
/* link */
try_to_plug (pad, caps);
static void
try_to_plug (GstPad *pad,
- const GstCaps *caps)
+ GstCaps *caps)
{
GstObject *parent = GST_OBJECT (GST_OBJECT_PARENT (pad));
const gchar *mime;
}
/* can it link to the audiopad? */
- audiocaps = gst_pad_get_caps (gst_element_get_static_pad (audiosink, "sink"),
+ audiocaps = gst_pad_query_caps (gst_element_get_static_pad (audiosink, "sink"),
NULL);
res = gst_caps_intersect (caps, audiocaps);
if (res && !gst_caps_is_empty (res)) {