This is a bit of a hack solution has I think the correct solution is to expose model caps on sinkpad (eventually sinkpads). Till then I think this is reasonable. - Add a property to onnxinference to set datatype. - Fix internal buffer allocation size based on datatype. - Extract method to remove alphe channel and convert to planar image when requested. Also template the method to support writing to buffers of different datatype. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5761>