NvDsBatchMeta not found for input buffer

Please provide complete information as applicable to your setup.

• Hardware Platform (GPU)
• DeepStream Version 5.1
• TensorRT Version 7.2.2
• NVIDIA GPU Driver Version (valid for GPU only) 460.91.03
• Issue Type( questions)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)

Hello, I add a new custom plugin after a plugin jpeg encode GST-stream (not from Nvidia) and in my custom plugin want to get batch_meta how could I do that? is it possible or support yet?

this is how my pipeline is build …-> nvvideoconvert (video/x-raw) → jpegenc → jpegparse → gst-customplugin → msgconv-> msgbroker.

To do get batch_meta from GstBuffer I did try two ways bellow but failed:

...
  while ((gstMeta = gst_buffer_iterate_meta (inbuf, &state))) {
    if (gst_meta_api_type_has_tag (gstMeta->info->api, _dsmeta_quark)) {
      meta = (NvDsMeta *) gstMeta;
      if (meta->meta_type == NVDS_BATCH_GST_META) {
        batch_meta = (NvDsBatchMeta *) meta->meta_data;
        break;
      }
    }
  }
...

and

...
nvds_set_input_system_timestamp (inbuf, GST_ELEMENT_NAME (dsbase64enc));
batch_meta = gst_buffer_get_nvds_batch_meta (inbuf);
...

Jpeg-encoder does not generate any batch-meta. Please investigate deepstream document carefully. Gst-nvstreammux — DeepStream 5.1 Release documentation