Changing filesink location after a mux with many inputs.

Thiago Sousa Santos thiago.sousa.santos at collabora.com
Wed Sep 5 06:27:45 PDT 2012


On Wed, 2012-09-05 at 03:42 -0700, Paddy wrote:
> Further details: I've encountered the bug when flushing timeoverlay, so
> removing that element gives less debug & a slightly different failure mode
> 
> gstpad.c:4135:handle_pad_block:<queue0:src> pad became flushing
> gstpad.c:3133:gst_pad_alloc_buffer_full:<queue0:src> pad block stopped by
> flush
> gstpad.c:3050:gst_pad_buffer_alloc_unchecked:<queue0:sink> alloc function
> returned error (-2) wrong-state
> gstpad.c:3148:gst_pad_alloc_buffer_full:<videosink:proxypad0> alloc function
> returned error wrong-state
> gstpad.c:3050:gst_pad_buffer_alloc_unchecked:<record_bin:videosink> alloc
> function returned error (-2) wrong-state
> gstpad.c:3148:gst_pad_alloc_buffer_full:<video_src_bin:src> alloc function
> returned error wrong-state
> gstpad.c:3050:gst_pad_buffer_alloc_unchecked:<src:proxypad4> alloc function
> returned error (-2) wrong-state
> gstpad.c:3148:gst_pad_alloc_buffer_full:<x264enc0:src> alloc function
> returned error wrong-state
> gstpad.c:4715:gst_pad_push:<videoSrc:src> called chainfunction
> &gst_x264_enc_chain with buffer 0x7f77a406b1f0, returned wrong-state
> gstbasesrc.c:2562:gst_base_src_loop:<videoSrc> pausing after gst_pad_push()
> = wrong-state
> gstbasesrc.c:2588:gst_base_src_loop:<videoSrc> pausing task, reason
> wrong-state
> gstpad.c:5646:gst_pad_pause_task:<videoSrc:src> pause task
> gsttask.c:698:gst_task_set_state:<videoSrc:src> Changing task 0x7f77b0099360
> to state 2
> 
> This occurs after the FLUSH_EVENT has been sent to the video queue srcpad
> from its blocked callback function. I still don't see the audio blocked
> callback.
> 
> Am I correct in sending the flush event ?? I feel like I'm just peeing in
> the wind.

Hello,

Here's what I'd try to make this work:

1) block both queue src pads, wait for both blocked callbacks.

2) Push EOS event on the peer pads of the queues' src pads, wait for EOS
message on the bus (at this point, your file should be correctly saved
on disk

3) Set encoders/muxer/filesink to NULL, set the new filesink location,
put them up to PLAYING again / This should be equivalent of sending a
flush-start/-stop, but as you need to change the filesink's location,
you have to put it to NULL anyway AFAIK.

4) you *might* need/want to restore some context for the muxers/encoders
by pushing newsegment/tag events that were lost when those elements went
to NULL. I'm not sure if this is required, you need to test it yourself.

5) Unblock the pads and good luck :)

--
Thiago

> 
> 
> 
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Changing-filesink-location-after-a-mux-with-many-inputs-tp4656116p4656173.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> 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