How can i know how many channels are in the frame

Hey,
Im developing a deepstream pipeline using cpp language.
Inside the prob function, I need to check if the frame has 3 channels (RGB) or 1 (IR).
how can I check the number of channels in the meta property or in some other variable?
I know that in python there is a ‘shape’ function that gives you that value.

Thank you!

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

You can get the color format in your probe function:

      GstStructure *structure;
      const gchar* format;
      format = gst_structure_get_string (structure, "format");

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.