How can i create many pad_buffer_probe function for each sgie?

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version 5.1.21.2
• JetPack Version (valid for Jetson only)
• TensorRT Version 7.2.1

    streammux.link(pgie)
    pgie.link(face_embedding)
    face_embedding.link(nvvidconv)
    nvvidconv.link(nvosd)
    nvosd.link(queue)
    queue.link(nvvidconv2)
    nvvidconv2.link(sink)

    # create an event loop and feed gstreamer bus mesages to it
    loop = GObject.MainLoop()
    bus = pipeline.get_bus()
    bus.add_signal_watch()
    bus.connect("message", bus_call, loop)

    # Add a probe on the primary-infer source pad to get inference output tensors
    pgiesrcpad = pgie.get_static_pad("src")
    if not pgiesrcpad:
        sys.stderr.write(" Unable to get src pad of primary infer \n")

    pgiesrcpad.add_probe(Gst.PadProbeType.BUFFER, pgie_src_pad_buffer_probe, 0)


    embedding_calback = face_embedding.get_static_pad("src")
    if not embedding_calback:
        sys.stderr.write(" Unable to get sink pad of nvvidconv \n")

    embedding_calback.add_probe(Gst.PadProbeType.BUFFER, sgie_src_pad_buffer_probe, 0)

I have 2 custom nvinferserver, each nvinferserver do different task (pgie: detection, sgie: recognition).
After detection, i want to create sgie_src_pad_buffer_probe to process results.
How can i do?

Sorry for the late response, will do the investigate to update soon.

I think you can refer deepstream_python_apps/deepstream_test_1.py at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub

hello @bcao. thank for your guide. But i cannot find any call_back function for pgie or sgie except osd call_back function.

what i mean is that, I have 2 custom nvinferserver, i want to create 2 call_back function for each nvinferserver.
each call_back function contain my custom processing.
call_back function result of pgie is input for sgie.

You just need to install the callback on pgie or sgie pad similar to what’s done on osd call_back function, it’s a gstreamer concepts, you can search how to install probe in gstreamer and study more details aobut it