I do use appsrc which grabs image from redis.
This pipeline is used in video , and therefore I want appsrc to grab image only 30times a second.
Even though I have in CAPS framerate 30/1 , need-data callback calls function at least 80times/second making my compute resources on jetson nano exhausted. Why is that and how can I fix it?
Hello @DaneLLL ,
I have modified my appsrc to similar behavior as in shared code
# python callback for the 'need-data' signal
def get_frame_buffer(appsrc, length, udata):
# grab frame from basler
frame = get_frame(*udata)
if frame["frame"] is None:
appsrc.emit("end-of-stream")
else:
# convert frame["frame"] to buffer and add frame["timestamp"] to metadata
buf = Gst.Buffer.new_wrapped(frame["frame"].tobytes())
buf.pts = frame["timestamp"]
# push buffer to appsrc
appsrc.emit("push-buffer", buf)
return Gst.FlowReturn.OK
aka adding timestamp to each buffer, and to be precise adding timestamp from frame as it was captured in camera. However it is not changing gstreamers behaviour , still pooling that get_frame_buffer as crazy :)