How to properly terminate a complex stream with tee and avimux

tnewman newmantye at gmail.com
Mon Aug 11 06:25:39 PDT 2014


I have been attempting to create a complex pipeline with some success except
for how to close the video saving (avimux) portion of the stream.  Below one
will find an illustration of the pipeline.



Here is the story:  I have an embedded device where I need to create a video
stream to a fakesink; where the fakesink is used to hand framebuffers to a
Qt application to be displayed in a widget.  This is the primary stream
connected to the tee as seen above.  The second portion of the stream is the
connected to the tee on request (a user pushes a Qt button) and begins
recording an AVI file to disk.  The addition of this pipeline to the tee
seems to be working (most of the time, sometimes the pipeline hangs; but
that is for later).  The issue is when the user presses the Qt button again
to stop the recording.  The first time through it works, the filesink sees a
EOS event and the file terminates with an updated header.  The problem comes
the second time around.  From the g_print statements one sees this:



And thereafter the pipeline fails.

Below one will find the source code for the project.  Any help would be
greatly appreciated.



I have tried may variants with no success. So the real question is: how does
one unlink a section of the pipeline from the tee, terminate the avimux and
audio source elements to create a proper AVI file, remove the elements from
the pipeline and then at a later time recreate these elements, link them,
and do it all over again.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-properly-terminate-a-complex-stream-with-tee-and-avimux-tp4668269.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list