How to share GstBuffer between multiple RTSPClient?

Andrey Sotnikov usaonmonday at gmail.com
Sun Aug 27 22:08:03 UTC 2023


Hi, dear GStreamer community,

My company manufactures cameras. I am trying to create an application 
that shares the data from these cameras over RTSP. Here is the launch 
string for GstRTSPMediaFactory: "( appsrc name=ourcamera ! queue ! 
x265enc speed-preset=5 tune=4 
option-string=colormatrix=gbr:lossless=true ! rtph265pay name=pay0 pt=96 )".

It turned out I must assign a timestamp zero to the first GstBuffer I 
send down this pipeline. Otherwise, if I assign a timestamp x seconds to 
the first GstBuffer, videoencoder will force appsink0 (added by 
RTSPClient) to wait for x seconds before sending the data.

It means that if I have several connections to the RTSP server, I cannot 
send the same frame down all their pipelines, I have to make multiple 
copies of GstBuffer, just to be able to assign different timestamps.

Is this first timestamp delay a bug in GStreamer, or is this 
intentional? If this is intentional, is there a way to avoid multiple 
copies of the same frame?

Thank you.
Andrey.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230827/4955b64a/attachment.htm>


More information about the gstreamer-devel mailing list