Reseting Elements into GstElementFactory.make state?

Peter Rennert p.rennert at cs.ucl.ac.uk
Fri Aug 2 05:57:31 PDT 2013


Hi Tim,

Sorry for the late reply but I think there was a jam in my email box. I 
just received your answer. If NULL should reset them in principle I feel 
like on the right track.

I could reuse my bin for a very similar pipeline. Instead of using the 
live source (uvch264src) I fed the pipeline with a filesrc (reading 
H264). Might it be related to the fact that I use a live source. 
Something I spotted is this:

0:00:48.664053053  7526 0x7f29cc0014a0 ERROR qtmux 
gstqtmux.c:2163:gst_qt_mux_add_buffer:<mux> First buffer for pad video_0 
has no timestamp, using 0 as first timestamp


I get this warning/error only if I connect fresh mp4mux (in the bins). 
If I recycle them, the pipeline still runs somehow (I can see the 
previewsink being fed with camera data, I get no error at all) but there 
is no output of  the filesink anymore. It creates a file and closes it 
at EOS, but no video data gets streamed in.

I thought I could get around the timestamp issue, by reseting the elements.

I also tried to send a renegotiation event, but it did not help either. 
Is there a way to manipulate the time-stamps of the mp4mux?

On 08/01/2013 03:01 PM, Tim-Philipp Müller wrote:
> On Wed, 2013-07-31 at 19:20 +0100, Peter Rennert wrote:
>
> Hi,
>
>> I have a dynamic pipeline where I have two bins doing double buffering
>> (see below). It works if I use fresh bins with all elements factory
>> made. Once I swap them back and try to recycle a bin it does not work
>> anymore. I tried to set the bins into STATE_NULL but it does not really
>> reinitializes them. Is there any way?
>>
>> I am using Gstreamer 1.1.1.1
> Setting it to NULL should be enough. However, in practice you will find
> that re-using elements is not the most-tested codepath, so you may run
> into interesting bugs here and there if you do that. Those should all be
> fixed of course.
>
> Cheers
>   -Tim
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list