Please provide complete information as applicable to your setup.
• DeepStream Version: 7.X
I have a pipeline which in general looks like this:
source -> decode --(I want to put some data here using probe)-> process -> streammux -> nvinfer -(I want to read these data here)-> display
In 2022 it was not supported ( Adding custom meta before New Gst-nvstreammux ) but now it seems to be.
I found a mention in docs describing Adding metadata to the plugin before Gst-nvstreammux, but there is no meaningfull example showing how to properly do it.
example
I tried to add it in the the gst probe attached with GstPad.add_probe( Gst.PadProbeType.BUFFER, self.gst_video_probe)
def gst_video_probe(
self,
pad: Gst.Pad,
info: Gst.PadProbeInfo,
*user_data: Any,
):
"""Video stream probe used for manipulating stream buffers."""
gst_buffer = info.get_buffer()
if not gst_buffer:
logging.error("Unable to get GstBuffer.")
return Gst.PadProbeReturn.OK
try:
# somehow initialize all of the arguments
usermeta = pyds.NvDsUserMeta()
nvinstance: pyds.NvDsMeta = pyds.gst_buffer_add_nvds_meta(
gst_buffer,
usermeta,
None,
pyds.nvds_batch_meta_copy_func,
pyds.nvds_batch_meta_release_func,
)
and I got
gst_buffer_add_nvds_meta(): incompatible function arguments.
The following argument types are supported:
1. (buffer: _GstBuffer, meta_data: capsule, user_data: capsule, copy_func: void* (void*, void*), release_func: void (void*, void*)) -> _NvDsMeta
Invoked with:
<Gst.Buffer object at 0x71f5337d2500 (GstBuffer at 0x71f43c326650)>,
None,
None,
<built-in method nvds_batch_meta_copy_func of PyCapsule object at 0x71f558d50870>,
<built-in method nvds_batch_meta_release_func of PyCapsule object at 0x71f558d508a0>
> /workspace/eyeq/infer/eyeq/pipeline_probe.py(196)gst_video_probe()
-> nvinstance: pyds.NvDsMeta = pyds.gst_buffer_add_nvds_meta(