Changing filesink location after a mux with many inputs.

Paddy pat.blanchon at
Thu Oct 18 15:11:15 PDT 2012

Paddy wrote
> 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
> handoff
> 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

Bumping this up so hopefully my questions can be considered. 

I'll dig some sample code out that shows the pertinent steps for those gents
that have asked

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

More information about the gstreamer-devel mailing list