filesink and file durations

Guillaume Denis gdenispro at gmail.com
Thu Jun 10 07:33:02 UTC 2021


Hello,

I am trying to have this pipeline end correctly, recorded files being
corrupted (invalid duration):

appsrc format=time is-live=true do-timestamp=true name=src !
application/x-rtp,encoding-name=H264 ! tee name=teein ! queue
max-size-buffers=0 max-size-bytes=0 max-size-time=5000000000 !
rtpjitterbuffer latency=100 ! rtph264depay ! h264parse ! matroskamux !
filesink location=logs/raw.mkv teein. ! queue max-size-buffers=0
max-size-bytes=0 ! appsink name=sink qos=true

At some point the pipeline is stopped by a:
gst_element_send_event(pipeline, gst_event_new_eos());

Then a bus watch callback stops the pipeline: gst_element_set_state(pipeline,
GST_STATE_NULL); on GST_MESSAGE_EOS
(I thought that when a bus watch callback receives a GST_MESSAGE_EOS it
meant EOS has been propagated to all sinks)

I am wondering if this may be due to tee and queue in the pipeline.
I could also catch EOS(s) on every appsink and filesink before ending the
pipeline but that seems weird.

Two additional observations:

   - on rare occasions, the recorded file does have a duration
   - I've tried waiting (g_usleep) between receiving GST_MESSAGE_EOS and
   setting pipeline state to GST_STATE_NULL with no effect

Would you have any suggestions?
Thanks,
Guillaume
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210610/076b4cb9/attachment.htm>


More information about the gstreamer-devel mailing list