Tcpserversink leaks memory

Hi, I am trying to use tcpserversink in one node and tcpclientsrc in other node to stream video frames. My Image size is 77Mb . I have connected two nodes using ethernet. Ethernet bandwidth is 500Mbps , so theoretically I should achieve 6.5fps . I am also able to achieve it. I am using push-buffer signal to insert the buffer and I have made sure to insert images every 153ms by hard limiting. If I don’t limit by code, Gstreamer is taking frames every 60ms . Since the bandwidth limit is 6.5fps , ram and swap on the transmitter side are shooting up and Oom killer kicks in and kills my streaming process. How do I resolve this issue?

Hi,
Your approach looks fine. Another solution is to set fps to gstreamer frameworks to use gstreamer synchronization mechanism and it should work similar to your solution.

For simulating live source you may try:

gst-launch-1.0 videotestsrc is-live=1 ! video/x-raw,framerate=13/2 ! ...
1 Like

Hi DaneLLL, Thanks for your reply. I solved the problem by setting buffer-soft-max to 2 and recovery-policy to latest for tcpserversink.