Add data to draw mask in deepstream

I am looking for information on how to add data to draw mask in deepstream.
I am using deepstream-app with deepstream sdk5.1.
Inside gstnvdosd plugin’s intialization, I like to add in data .
Found out that there are two line we can initialize Structs for mask information.

nvdsosd->mask_rect_params = g_new0 (NvOSD_RectParams, MAX_OSD_ELEMS);
nvdsosd->mask_params = g_new0 (NvOSD_MaskParams, MAX_OSD_ELEMS);

How can I populate mask infos during run time and during initialization?
Any sample for that?

don’t understand your question, can you please provide detailed informantion?
For exmaple,

I like to add in data ==> what kind of data?

How can I populate mask infos during run time and during initialization? ==> seriously depends on what you want to add?

Any sample for that? ==> the ask is not clear, not sure what we should provide. And, did you try to do it by yourself? Any difficulty did you meet?