Query about gst_bin_remove

Sérgio Agostinho sergio.r.agostinho at gmail.com
Wed Feb 25 05:28:57 PST 2015


The pad is unlinked, there's is no data flowing trough it, there are no
negotiated capabilities at this point. I think the pads needs to be linked
and to have pushed at least some buffers for the caps event to flow
downstream. The experts might provide more insight on what actually
happens.

I find it strange that removing and creating a new pad makes any difference
in the return value of gst_pad_get_negotiated_caps(), under the conditions
you described.

If you run gst_pad_get_negotiated_caps() before unlinking you should get a
caps object which should be persistent until you unref it. If that fails
you can always convert the caps to string and use further down the road
when you need.

As a final note, I'm not really sure on what are you trying to do but I get
the feeling you're asking the "wrong questions".


2015-02-25 13:39 GMT+01:00 Yogesh Tyagi <yogesh.bit2006 at gmail.com>:

> Yes I tested it and it returns NULL. I wanted to know the reason for
> this.In my code when gst_pad_get_negotiated_caps() retuens NULL, I remove
> the source pad and add new pad again. I don't want to do that. Is it
> possible for source pad to retain old caps somehow?
>
> Thanks,
> Yogesh
>
> On Wed, Feb 25, 2015 at 5:45 PM, Sérgio Agostinho <
> sergio.r.agostinho at gmail.com> wrote:
>
>> This is something you can actually test yourself.
>> The equivalent method in gstreamer 1.0 gst_pad_get_current_caps() will
>> return NULL.
>>
>> Cheers,
>> Sérgio
>>
>>
>> 2015-02-25 11:12 GMT+01:00 Yogesh Tyagi <yogesh.bit2006 at gmail.com>:
>>
>>> Thanks for the answer. What will gst_pad_get_negotiated_caps() return
>>> for an element's source pad which is linked again to pipeline (after
>>> unlinking)?
>>>
>>> Thanks,
>>> Yogesh
>>> On Tue, Feb 24, 2015 at 1:38 PM, Sebastian Dröge <
>>> sebastian at centricular.com> wrote:
>>>
>>>> On Mo, 2015-02-23 at 19:07 +0530, Yogesh Tyagi wrote:
>>>> > Hi,
>>>> >
>>>> > Can somebody please help me understand whether an element goes to all
>>>> the
>>>> > downward state changes(PLAYING to NULL) when I call gst_bin_remove to
>>>> > remove that element from the pipeline?
>>>>
>>>> It doesn't, the state stays the same.
>>>>
>>>> > What happens to the source pads of the element it this case?
>>>>
>>>> They are still there :) But if they were linked to something else, the
>>>> source pads would be unlinked now.
>>>>
>>>> > I want to take deceision of adding a new source pad to this element
>>>> > depeneding upon existance of the old source pad of this element
>>>> before it
>>>> > was unlinked from the pipeline.
>>>>
>>>> --
>>>> Sebastian Dröge, Centricular Ltd · http://www.centricular.com
>>>>
>>>> _______________________________________________
>>>> gstreamer-devel mailing list
>>>> gstreamer-devel at lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>>
>>>>
>>>
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>
>>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150225/009ff797/attachment.html>


More information about the gstreamer-devel mailing list