I have been trying to access source_id of frame in presence of multiple sources.
frame_meta = (NvDsFrameMeta *) (l_frame->data);
NvOSD_RectParams rect_params;
guint source_id_info = frame_meta->source_id;
[source0]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=3
uri=file://../../streams/sample_1080p_h264.mp4
num-sources=1
gpu-id=0
drop-frame-interval=5
# (0): memtype_device - Memory type Device
# (1): memtype_pinned - Memory type Host Pinned
# (2): memtype_unified - Memory type Unified
cudadec-memtype=0
[source1]
enable=0
#Type - 1=CameraV4L2 2=URI 3=MultiURI 4=RTSP
type=3
uri=file://../../streams/sample_1080p_h264.mp4
num-sources=1
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
Will appreciate any form of hint or direction
Ravik
4
Hi Chris,
https://devtalk.nvidia.com/default/topic/1062520/deepstream-sdk/getting-source-stream-id-from-nvosd-plugin/post/5380861/#5380861
I am trying to retrieve data in deepstrean-app, deepstream_app_main.c
static void
all_bbox_generated (AppCtx * appCtx, GstBuffer * buf,
NvDsBatchMeta * batch_meta, guint index)
{
guint final_count;
guint motorcycle;
NvDsMetaList * l_frame = NULL;
NvDsMetaList * l_obj = NULL;
NvDsObjectMeta *obj_meta = NULL;
for (l_frame = batch_meta->frame_meta_list; l_frame != NULL;
l_frame = l_frame->next) {
NvDsFrameMeta *frame_meta = (NvDsFrameMeta *) (l_frame->data);
for (l_obj = frame_meta->obj_meta_list; l_obj != NULL;
l_obj = l_obj->next) {
obj_meta = (NvDsObjectMeta *) (l_obj->data);
if (obj_meta->class_id == PGIE_CLASS_ID_VEHICLE) {
final_count = motorcycle ++;
g_print("count: %d, \n",final_count);
}
}
}
}
guint source_id_info = frame_meta->source_id;
g_print("Source: %s",
appCtx->config.multi_source_config[source_ids[index]].uri);
Both returned null, any pointers on how to solve this? , I have 42 sources on this instance
solved
g_print("\ntest: %d",source_ids[index]);