How to Drop GST_EVENT_EOS and continue connecting

Nicolas Dufresne nicolas at ndufresne.ca
Wed May 24 17:16:59 UTC 2023


Hi,

Le lundi 22 mai 2023 à 09:13 -0700, Guru Govindan via gstreamer-devel a écrit :
> Hi,
> 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.

Indeed, its possible to get EOS from rtspsrc.

> 
> 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?
Before it becomes a message on the bus, the EOS will travel as an event from
source to sink. While they pass through pads, they will set a state on the pad
which can be hard to recover from in dynamic pipelines. The best way to get rid
of them is to remove them as early as possible. You can do that with a
GstPadProbe on the rtspsrc pad(s) and the GST_PAD_PROBE_DROP return value. Note
that you will have to remove and recreate the rtspsrc in order to recover.

> 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
> 
> I tried using errorignore and set the ignore-eos flag and convert-to=0. I used it right after rtspsrc element and right before hlssink2. However this seems to come from splitmuxsink inside hlssink2.

errorignore works the other way around, by ignore GstFlowReturn values as a
result of pad push (chain) function.

> 
> Best Regards,
> Guru

regards,
Nicolas


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230524/de283c1e/attachment.htm>


More information about the gstreamer-devel mailing list