Sure, I’ll try to attach code snippets of the pipeline.
Initialize elements
streammux = gst_element_factory_make ("nvstreammux", "stream-muxer");
primary_detector = gst_element_factory_make ("nvinfer", "primary-nvinference-engine");
secondary_detector = gst_element_factory_make ("nvinfer", "secondary-nvinference-engine");
tracker = gst_element_factory_make ("nvtracker", "nvtracker");
fake_sink = gst_element_factory_make ("fakesink", "fake-renderer");
nvvidconv_analytic = gst_element_factory_make ("nvvideoconvert", "nvvideo-converter");
caps_filter_analytic = gst_element_factory_make ("capsfilter", "analytic-caps-filter");
caps_analytic = gst_caps_from_string("video/x-raw(memory:NVMM), format=RGBA");
analytic = gst_element_factory_make ("dsexample", "example-plugin");
queue1 = gst_element_factory_make ("queue", "queue1");
queue2 = gst_element_factory_make ("queue", "queue2");
queue3 = gst_element_factory_make ("queue", "queue3");
Configure elements
g_object_set (G_OBJECT (streammux), "width", MUXER_OUTPUT_WIDTH, "height",
MUXER_OUTPUT_HEIGHT, "batch-size", num_sources,
"batched-push-timeout", MUXER_BATCH_TIMEOUT_USEC, NULL);
g_object_set (G_OBJECT (primary_detector), "config-file-path", pgie_config_path,
"unique-id", 1, "interval", 0, NULL);
g_object_set (G_OBJECT (secondary_detector), "config-file-path", sgie_config_path,
"unique-id", 2, "interval", 0, NULL);
g_object_set (G_OBJECT (nvvidconv_analytic), "nvbuf-memory-type", 3, NULL);
g_object_set (G_OBJECT (caps_filter_analytic), "caps", caps_analytic, NULL);
g_object_set (G_OBJECT (analytic), "full-frame", FALSE, NULL);
g_object_set (G_OBJECT (analytic), "blur-objects", TRUE, NULL);
set_tracker_properties(tracker, tracker_config_path);
Next I create source elements (uridecodebin) and link to streammux.
Finally add everything and link as shown below.
gst_bin_add_many (GST_BIN (pipeline), primary_detector, tracker, secondary_detector, nvvidconv_analytic, caps_filter_analytic, analytic, fake_sink, queue1, queue2, queue3, NULL);
gst_element_link_many (streammux, queue1, primary_detector, queue2, tracker, queue3, secondary_detector, nvvidconv_analytic, caps_filter_analytic, analytic, fake_sink, NULL)
I am trying to access meta data from the gst_dsexample_transform_ip function in gstdsexample.cpp.
When I loop through obj meta and filter out objects with sgie ID, the parent of it is always NULL.
Everything else works fine, pgie and sgie works fine and the detections are correct. (sgie has correctly operated on objects inside pgie object, as i configured in their respective configs).