Probe multiple pads at once

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Probe multiple pads at once

Fuentes
Hello every one:

I got the following problem: When i try to probe a pad to unlink it and relink with a newly created fakesink all works fine if i only do in one pad. If instead i use a "for" loop to probe several element's to do the same thing, all fail at link the pads with  GST_PAD_LINK_REFUSED.

Here the piece of code that illustrates this:

for (int i = start; end <= i; --i)
{
        GstPad* source = gst_pad_get_peer(&_pads[i]);
        gst_pad_add_probe(
                source,
                GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,
                (GstPadProbeCallback)padBlockProbeFake,
                &_swap(i),
                NULL
        );
        g_object_unref(source);
}

Using only the code inside the for, all works fine. Using whit the for, all fails.

Anyone can help me?
Many thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Probe multiple pads at once

Sebastian Dröge-3
On Sa, 2016-05-21 at 04:25 -0700, Fuentes wrote:

> Hello every one:
>
> I got the following problem: When i try to probe a pad to unlink it
> and
> relink with a newly created fakesink all works fine if i only do in
> one pad.
> If instead i use a "for" loop to probe several element's to do the
> same
> thing, all fail at link the pads with  GST_PAD_LINK_REFUSED.
>
> Here the piece of code that illustrates this:
>
> for (int i = start; end <= i; --i)
> {
> GstPad* source = gst_pad_get_peer(&_pads[i]);
> gst_pad_add_probe(
> source,
> GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,
> (GstPadProbeCallback)padBlockProbeFake,
> &_swap(i),
> NULL
> );
> g_object_unref(source);
> }
>
> Using only the code inside the for, all works fine. Using whit the
> for, all
> fails.
>
> Anyone can help me?
> Many thanks in advance.
There's nothing wrong in the code you pasted. Can you provide a full,
minimal/simplified testcase that reproduces your problem?

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment