how to get stream id?

hello, I get two video streams and I wrote in the configuration as follows:

[source0]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=2
uri=sample_1080p_h264.mp4
num-sources=1
#drop-frame-interval=2
gpu-id=0
# (0): memtype_device   - Memory type Device
# (1): memtype_pinned   - Memory type Host Pinned
# (2): memtype_unified  - Memory type Unified
cudadec-memtype=0

[source1]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=2
uri=1080p_h264.mp4
num-sources=1
#drop-frame-interval=2
gpu-id=0
# (0): memtype_device   - Memory type Device
# (1): memtype_pinned   - Memory type Host Pinned
# (2): memtype_unified  - Memory type Unified
cudadec-memtype=0

And After inference, I get a lot of bounding boxes. In the data processing like this:

/**
 * Function to process the attached metadata. This is just for demonstration
 * and can be removed if not required.
 * Here it demonstrates to use bounding boxes of different color and size for
 * different type / class of objects.
 * It also demonstrates how to join the different labels(PGIE + SGIEs)
 * of an object to form a single string.
 */
static void
process_meta (AppCtx * appCtx, NvDsBatchMeta * batch_meta)
{
  // For single source always display text either with demuxer or with tiler
  if (!appCtx->config.tiled_display_config.enable ||
      appCtx->config.num_source_sub_bins == 1) {
    appCtx->show_bbox_text = 1;
  }

I want to know which video stream number corresponds to the box. So waht should I do to get the right stream-id? thanks a lot, bro.

Hi,
For two sources, please set batch-size=2 and you can get the two surfaces.
A relevant post:
https://devtalk.nvidia.com/default/topic/1061205/deepstream-sdk/rtsp-camera-access-frame-issue/post/5378964/#5378964

hi, friend, Thank you for your answer. I just wrote a demo. I want to know if there are any functions or variables to help me determine which video stream id the current box corresponds to. I don’t do anything on Source0 or Source1, Maybe I don’t need to surface[0] or [1]? Sorry, I am a newbie. Thanks a lot.

Can this help you https://devtalk.nvidia.com/default/topic/1061492/deepstream-sdk/deepstream-sdk-4-0-faq/ -> 6. How to get source id