Drop GST_EVENT_EOS on a rtspsrc connection

228 Views Asked by At

I am implementing a Gstreamer pipeline in rust to ingest rtsp feed from different cameras. I use the hlssink2 element to create manifest to view/store the video.

For some of the cameras, the hlssink2's splitmux element receives a GST_EVENT_EOS which results in the pipeline stopping.

This happens even if I add a bus.add_watch and capture the gst::MessageView::Eos(state_changed) event.

Is there a way to programatically block the EOS message and keep the rtsp connection on?

Can I add a add_probe to one of the elements pads and make it ignore it? Something like the following? But I am not sure which element should I do it on and what the implications would be?

<rtsp element's video pad>.add_probe(gst::PadProbeType::BLOCK_DOWNSTREAM, |_pad, _info| {
                gst::PadProbeReturn::Ok
            }).unwrap();

Here is an example pipeline for which I have a rust implementation.

gst-launch-1.0 hlssink2 name=ingest1 playlist-length=5 max-files=0 target-duration=10 \
send-keyframe-requests=true playlist-location=/tmp/manifest.m3u8 location=/tmp/video/%t.ts \
rtspsrc latency=100 location=<rtspurl> protocols=0x00000004 name=basesrc basesrc. ! rtph264depay ! tee name=t \
t.! queue  ! ingest1.video

0

There are 0 best solutions below