I use deepstream multistreaming in Python. I need to speed up the loop for saving frames from each rtsp source. How can I parallelize this process using Cython?
tiler_sink_pad_buffer_probe function in following example shows the case: https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/blob/master/apps/deepstream-imagedata-multistream/deepstream_imagedata-multistream.py
This is my function with for loop to process the frames that should be done in parallel:
@nvtx.annotate("__process_frame_result")
def __process_frame_result(self, frames, _, l_frame_meta: List, ll_obj_meta: List[List]):
with nvtx.annotate("frame_loop", color="green"):
for frame, frame_meta, l_obj_meta in zip(frames, l_frame_meta, ll_obj_meta):
stream_name = self.stream_name[frame_meta.pad_index]
required_data = self.extract_info(frame, frame_meta, l_obj_meta, stream_name)
self.process.send('process_frames', required_data)