How can I get metadata from the frame exactly I want?

- Board:
    * Name:           NVIDIA Jetson AGX Xavier
    * Type:           AGX Xavier
    * Jetpack:        UNKNOWN [L4T 32.3.1]
    * GPU-Arch:       7.2
    * SN:             -
  - Libraries:
    * CUDA:           10.0.326
    * cuDNN:          7.6.3.28-1+cuda10.0
    * TensorRT:       6.0.1.10-1+cuda10.0
    * VisionWorks:    1.6.0.500n
    * OpenCV:         4.1.2 compiled CUDA: YES

Hello.

I’m using Gstreamer with Deepstream plugin and TensorRT Engine.
I made custom plugins with executing trt engine.
Command line likes below.

gst-launch-1.0 \
uridecodebin uri=$RTSP_CAM0 ! nvvideoconvert ! m.sink_0 \
uridecodebin uri=$RTSP_CAM1 ! nvvideoconvert ! m.sink_1 \
uridecodebin uri=$RTSP_CAM2 ! nvvideoconvert ! m.sink_2 \
uridecodebin uri=$RTSP_CAM3 ! nvvideoconvert ! m.sink_3 \
uridecodebin uri=$RTSP_CAM4 ! nvvideoconvert ! m.sink_4 \
uridecodebin uri=$RTSP_CAM5 ! nvvideoconvert ! m.sink_5 \
uridecodebin uri=$RTSP_CAM6 ! nvvideoconvert ! m.sink_6 \
uridecodebin uri=$RTSP_CAM7 ! nvvideoconvert ! m.sink_7 \
uridecodebin uri=$RTSP_CAM8 ! nvvideoconvert ! m.sink_8 \
uridecodebin uri=$RTSP_CAM9 ! nvvideoconvert ! m.sink_9 \
uridecodebin uri=$RTSP_CAM10 ! nvvideoconvert ! m.sink_10 \
uridecodebin uri=$RTSP_CAM11 ! nvvideoconvert ! m.sink_11 \
uridecodebin uri=$RTSP_CAM12 ! nvvideoconvert ! m.sink_12 \
uridecodebin uri=$RTSP_CAM13 ! nvvideoconvert ! m.sink_13 \
uridecodebin uri=$RTSP_CAM14 ! nvvideoconvert ! m.sink_14 \
uridecodebin uri=$RTSP_CAM15 ! nvvideoconvert ! m.sink_15 \
nvstreammux name=m width=1920 height=1080 batch-size=16 ! \
queue max-size-buffers=1 leaky=upstream ! \
custom_trt_plugin1 camera-size=16 model-path=$TRT_ENGINE_FILE1 ! \
custom_trt_plugin2 camera-size=16 model-path=$TRT_ENGINE_FILE2 ! \
nvmultistreamtiler columns=4 rows=4 width=1920 height=1080 ! \
nvdsosd ! \
nvegltransform ! nveglglessink sync=0

Tiled display is always
CAM0 | CAM1 | CAM2 | CAM3
CAM4 | CAM5 | CAM6 | CAM7
CAM8 | CAM9 | CAM10 | CAM11
CAM12 | CAM13 | CAM14 | CAM15
.

And I get metadata from each batches like below

for (NvDsMetaList* l_frame = batch_meta->frame_meta_list; l_frame != nullptr; l_frame = l_frame->next, index++) {
    NvDsFrameMeta* frame_meta = (NvDsFrameMeta*) (l_frame->data);
}

But frame_meta_list’s order does not match with tiled display’s order.
I want to get the metadata in order of tiled display.
How can I do that?

Thank you.

I found it.
frame_meta->source_id is what I want.

Pls refer NVIDIA DeepStream SDK API Reference: _NvDsFrameMeta Struct Reference