Get source ID from dsexample

How can i get source_id when i custom gstdsexample.cpp. In code under i have use dsexample->source_id to get id of video source but error, help me!

  std::string IMpath = "/home/phongtsv/nvidia/";
  IMpath = IMpath + std::to_string(dsexample->frame_num)+ "_source" + std::to_string(dsexample->source_id) +"_new" + ".jpg";
  cv::imwrite(IMpath, *dsexample->cvmat);

Please try to use frame_meta->source_id.

1 Like

Hi, i receive the error

gstdsexample.cpp:602:86: error: ‘frame_meta’ was not declared in this scope

in function get_converted_mat didn’t have parameter frame_meta

Hi, I have move code to gst_dsexample_transform_ip work fine.
Thanks you