How to use metadata in gstreamer plugin nvvivafilter

Hi and good time
Hope you are feeling well
I wana use nvivafilter and nvsample for a processing application
In the sample you have wrote a funcation named
static void add_metadata(void ** usrptr)

And in the iva_metadata.h file is defined some metadata varible

typedef struct _location_t Location;

struct _location_t
{
int x1, y1;
int x2, y2;
};

typedef struct _bbox_t BBOX;

struct _bbox_t {
unsigned int framecnt;
unsigned int objectcnt;
Location location_list[NUM_LOCATIONS];
};

Right now,i wanna know how i can use the metadata in the gstreamer Main looper
For example ,how can i get the metadata in main gsteramer loop launcher??
May you help me??
Thank you for your time
Appreciate that
Best regards.

Duplicated with How to use metadata in gstreamer plugin nvvivafilter - Jetson & Embedded Systems / Jetson TX2 - NVIDIA Developer Forums