How to access NvOSD_RectParams from NvDsBatchMeta (deepstream4.0)

I want to use NvDsBatchMeta to change the border_color for each class.

I couldn’t access it using the method below.

func (struct video_data *io_buffer, const char *in_meta, char **out_meta,
    const char *options, NvDsBatchMeta *batch_meta)
  double blue = batch_meta->display_meta_pool->rect_params->
  /* NvDsBatchMeta→ NvDsDisplayMeta→ NvOSD_RectParams→ NvOSD_ColorParams→ double*/

This is because the type of display_meta_pool is not NvDsDisplayMeta, but NvDsMetaPool.
On the other hand, the API Reference says “A pool of pointers of type “NvDsDisplayMeta”.”

Please tell me how to access NvOSD_RectParams from NvDsBatchMeta


• Hardware Platform (Jetson / GPU): Jetson TX2
• DeepStream Version: DeepStream 4.0
• JetPack Version (valid for Jetson only): 4.3-b134
• TensorRT Version:

For changing objects class border color, we have property in config to set if you use deepstream-app, see config, samples/configs/deepstream-app/source30_1080p_dec_infer-resnet_tiled_display_int8.txt, group primary-gie,

#Required by the app for OSD, not a plugin property

you also can change it by modifying nvinfer plugin functions, attach_metadata_detector, attach_metadata_classifier, from gstnvinfer_meta_utils.cpp, based on your model type.