Trouble removing a sink from a playing pipeline

Victor Manuel Jáquez Leal ceyusa at gmail.com
Thu Oct 6 01:49:08 PDT 2011


On Wed, Oct 5, 2011 at 11:21 PM, Tal Liron <tal.liron at gmail.com> wrote:
>
> On 01/-10/-28163 01:59 PM, Stefan Sauer wrote:
>>
>> On 10/02/2011 02:15 AM, Tal Liron wrote:
>>>
>>> In order to entirely remove the branch, I have to set its state to
>>> NULL. But, when the sink specifically changes to NULL, the pipeline
>>> stops playing! It is still in PLAYING state, but it just stops at the
>>> timeline.
>>
>> When you do dynamic pipieline changes all you need to keep in mind is
>> that gstreamer does not like dataflow on unconnected pads. Thus if your
>> pipeline pushes data towards the sink, you want to do a pad_block on the
>> src-pad of the tee (for the branch you want to remove). When the block
>> callback got triggered remove the elements and release the pad.
>
> Thanks for the help -- the problem is not data flow, however, but state. In
> order to remove the elements, I need to set state to NULL, but if I do that
> the rest of the pipeline is affected.
>
> Is there a way to either force removal of elements, or perhaps to change
> their state to NULL without affecting the pipeline?

If you have to set to NULL state your element before it is unlinked
from the pipeline, I guess you have a buggy element.

Check out this document:

http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/design/part-block.txt

vmjl


More information about the gstreamer-devel mailing list