Probe on individual stream after nvstreamdemux

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

Is it possible to do probe on individual stream after nvstreamdemux ?
I am trying to attach probe function on individual stream in deepstream-demux-multi-in-multi-out example , but i am getting frames of all streams in probe function event callback.

stream1 : nvstreamdemux → queue → nvvidconv → nvosd → probe
stream2 : nvstreamdemux → queue → nvvidconv → nvosd → probe
streamN : nvstreamdemux → queue → nvvidconv → nvosd → probe

Please explain gst_buffer = info.get_buffer() in probe function? what is this "info " parameter in probe function ?

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)

• DeepStream Version

• JetPack Version (valid for Jetson only)

• TensorRT Version

• NVIDIA GPU Driver Version (valid for GPU only)

• Issue Type( questions, new requirements, bugs)

• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

hardware : GPU
Deepstream version : 6.2
NVIDIA GPU Driver Version: 525.60.13
Issue Type: questions

yes, the Gst-nvstreamdemux plugin demuxes batched frames into individual buffers, you can add probe function on nvstreamdemux 's src.

please refer to C code, which has more comment,
static GstPadProbeReturn
osd_sink_pad_buffer_probe (GstPad * pad, GstPadProbeInfo * info,
gpointer u_data)
{
GstBuffer *buf = (GstBuffer *) info->data;

Blockquote
import gi
gi.require_version(‘Gst’, ‘1.0’)
from gi.repository import Gst

def my_probe_function(pad, info, user_data):
# Check the streamid property of the GstPad object to identify the stream
streamid = pad.get_property(“streamid”)
print(“Got a buffer from stream”, streamid)

# Access the GstBuffer object from the info object
gst_buffer = info.get_buffer()

# Process the buffer as needed

# Return Gst.PadProbeReturn.OK to pass the buffer down the pipeline
return Gst.PadProbeReturn.OK

Get the “sink” pad of the nvstreamdemux element

nvstreamdemux_sink_pad = nvstreamdemux.get_static_pad(“sink”)

Iterate over the output pads of the nvstreamdemux element

for i, pad in enumerate(nvstreamdemux_src_pads):
# Set the streamid property on the pad
pad.set_property(“streamid”, i)

# Attach the probe function to the pad
pad.add_probe(Gst.PadProbeType.BUFFER, my_probe_function, None)

Regarding your second question, info is a Gst.PadProbeInfo object that contains information about the probe event, such as the GstBuffer object that triggered the probe, the direction of the data flow (i.e., whether it is a buffer going upstream or downstream), and the timestamp of the buffer. The info.get_buffer() method returns the GstBuffer object that triggered the probe.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.