depthai-experiments
depthai-experiments copied to clipboard
RTSP-Streaming example is sending data incorrectly
I don't know anything about h264, but the code below allows for self.data
to be transmitted twice, which causes errors on the receiving end if one sets do-timestamp=true
, for example.
https://github.com/luxonis/depthai-experiments/blob/61ff41c5235220683e7dd4c677b1438b1d1fe785/gen2-rtsp-streaming/main.py#L26-L30
Possible fix(not an expert in GStreamer, so no PR): add ! queue
after appsrc
, set self.appsrc
in RtspSystem::do_configure
and don't connect it to anything, in RtspSystem::send_data
we check if appsrc
is initialized, and if it is, we emit push-buffer
as per RtspSystem::on_need_data
.