Question:
In a DeepStream 7.1 pipeline on Jetson, I want to modify the contents of the GPU buffer associated with a GstBuffer inside a pad probe function.
I am currently using a pad probe function to access the buffer within the DeepStream pipeline, as shown below:
static GstPadProbeReturn pgie_pad_buffer_probe_network_type100 (GstPad * pad, GstPadProbeInfo * info, gpointer u_data)
Reference:
meta->height = src_meta->height;
meta->class_map = (gint *) g_memdup(src_meta->class_map, meta->width * meta->height * sizeof (gint));
// meta->class_probabilities_map = (gfloat *) g_memdup(src_meta->class_probabilities_map, meta->classes * meta->width * meta->height * sizeof (gfloat));
meta->class_probabilities_map = NULL;
meta->priv_data = NULL;
return meta;
}
static GstPadProbeReturn
pgie_pad_buffer_probe_network_type100 (GstPad * pad, GstPadProbeInfo * info, gpointer u_data)
{
NvDsMetaList *l_frame = NULL;
NvDsMetaList *l_obj = NULL;
NvDsMetaList *l_user = NULL;
GstBuffer *buf = (GstBuffer *)(info->data);
NvDsBatchMeta *batch_meta = gst_buffer_get_nvds_batch_meta(buf);
/* Iterate each frame metadata in batch */
for (NvDsMetaList * l_frame = batch_meta->frame_meta_list;
Since GstBuffer is just a handle to NvBufSurface, what is the correct and safe way to access and modify the NvBufSurface data directly within this function?
Platform Details:
Hardware Platform (Jetson / GPU): Jetson Orin Nano / Jetson AGX Orin
DeepStream Version: 7.1
JetPack Version (for Jetson): 6.2
TensorRT Version: 10.3.0.30
NVIDIA GPU Driver Version (for dGPU): 540.4.0
yuweiw
April 24, 2025, 10:43am
4
You can refer to our source deepstream\sources\gst-plugins\gst-dsexample\gstdsexample_optimized.cpp to learn how to modify that.
static gboolean
convert_batch_and_push_to_process_thread (GstDsExample * dsexample,
GstDsExampleBatch * batch)
{
There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks