Can't get the object_id of sgie parent

My code in deepstream_main.c is following, it’s successful for getting object meta from sgie.

if (appCtx[i]->config.secondary_gie_sub_bin_config[1].enable) {
    GstPad *src_pad3 = NULL;
    GstElement *gst3 = appCtx[i]->pipeline.common_elements.secondary_gie_bin.sub_bins[1].secondary_gie;
    src_pad3 = gst_element_get_static_pad (gst3, "src");
    if (!src_pad3)
        g_print ("Unable to get secondary_gie0 src pad\n");
    else
    {
        gst_pad_add_probe(src_pad3, GST_PAD_PROBE_TYPE_BUFFER,
                  sgie1_src_pad_buffer_probe, NULL, NULL);
        gst_object_unref (src_pad3);
    }
}

This part means I let sgie as pge to add object meta?

If I wanna write this part to deepstream_appsrc.c, have any advice?

Becasue I try to get it, it’s different as this part in deepstream_main.c.

EX:
“osd_sink_pad_buffer_probe” from osd_sink_pad.
or
“srcpad_buff_probe” from srcpad.

I still can’t get parent_object_track_id from sgie.