Changing filesink location after a mux with many inputs.

Gabriel Neumüller horsthuchen at
Wed Oct 10 03:03:51 PDT 2012

is it possible to get some example code for this approach?

-----Original Message-----
From: at
[ at lists.freedesktop
.org] On Behalf Of Paddy
Sent: Wednesday, September 12, 2012 12:14 PM
To: gstreamer-devel at
Subject: Re: Changing filesink location after a mux with many inputs.

More progress ...

I've recovered the 1.3sec of missing video. This is what I now do when I
want to change the filesink location on the fly:
1)  install/enable a handoff function on an identity element inserted
between the x264enc & videoQ elements which simply looks for keyframes (see
above pipeline).
2)  when a keyframe is detected block both queue src pads & disable the
3)  in the first blocked callback, unlink the mux/sink bin from both queues
& send an EOS event to the audio & video sink pads in the mux/sink bin. I
have to do this - without the EOS I never see the second callback. I can
also confirm that both EOS's find their way to the mux/sink bin - I missed
them in the yards of debug
4)  on the second callback a new mux/sink bin is created, added & synced to
the pipeline & the queues are unblocked
5)  the mux/file bin EOS handler function sets the retiring bin state to
NULL & removes it from the pipeline

Hopefully this may help others who want to try this.

Meanwhile I still have a couple of questions:

Is the missing second block callback expected behaviour or a bug ? I never
see the second callback unless I send the EOS event. 

Bug or not: is the above procedure sound ? I'm new to gstreamer & don't have
much of a grip on its architecture, design & implementation; so there's
everything chance what I'm doing is fundamentally flawed.

Cheer again

View this message in context:
Sent from the GStreamer-devel mailing list archive at
gstreamer-devel mailing list
gstreamer-devel at

More information about the gstreamer-devel mailing list