Custom plugin with two srcpads

Marcin Kolny marcin.kolny at flytronic.pl
Wed Sep 4 04:52:40 PDT 2013


On 08/29/2013 10:24 AM, Marcin Kolny wrote:
> Hi, I'm trying to write my own plugin with one sink and two sources
> (something like tee). So my chain function looks like this:
>
> static GstFlowReturn
> gst_my_filter_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
> {
>    GstMyFilter *filter;
>
>    filter = GST_MYFILTER (parent);
>
>    gst_buffer_ref(buf);
>    gst_pad_push(filter->srcpad2, buf);
>    return gst_pad_push (filter->srcpad1, buf);
> }
>
> I know, that this code is meaningless, but it's the simple code snippet,
> which doesn't work for me. I saw in debugger, that a thread hangs up on
> a line:
> gst_pad_push(filter->srcpad2, buf);
> When I didn't connect any element to a srcpad2 (I linked only srcpad1),
> chain function didn't suspend, problem occurs, when two src pads are
> connected.
>
> I was looking at tee's code, and I can't see nothing special there. What
> is wrong with my plugin?
> Thanks for help
>
> Best regards,
> Marcin Kolny
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
Problem solved - I added a queue to my pipeline.


More information about the gstreamer-devel mailing list