So, since batch-size must be a multiple of the number of sources connected, and this can be determined by the number of sink pads requested from the stream muxer, can batch-size not be automatically determined and configured by dowstream pipeline elements based on the GST_NVEVENT_PAD_ADDED (and removal) events that are sent downstream? The documentation says:
However I am not clear on whether the downstream elements such as nvinfer are configured to handle these events by default, and how. the Nvinfer documentation makes no mention of it. Do I need to update the ‘batch-size’ property on my inference element when adding a source to my inference bin myself, or will the property be updated automatically? Ideally, I want to be able to add and remove sources at runtime without restarting my pipeline. It would be nice if just requesting and releasing pads from the stream muxer could handle everything downstream.
Also, can the number of rows and columns for the tiler element be automatically determined as well like (what I am currently using) rows_and_columns = (int) ceil(sqrt(batch-size)). Would be nice to write less code.