Can an app support different devices like onvif , http, https

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) T4
• DeepStream Version 6.1
• JetPack Version (valid for Jetson only)
• TensorRT Version 8.2
• NVIDIA GPU Driver Version (valid for GPU only) 11.4
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

what are the changes to be done in python code for different device support like onvif , http, https

Are you talking about DeepStream?

DeepStream is based on GStreamer. GStreamer supports the protocols you mentioned. Please refer to GStreamer for the solutions.
GStreamer: open source multimedia framework

Creating the onvif compliance camera using the GStreamer Pipeline - Stack Overflow