How to modify frame buffer returned by `pyds.get_nvds_buf_surface`?

Seems it is not suitable to use pyds.get_nvds_buf_surface() which is a integrated interface.

You can refer to the C/C++ sample Deepstream sample code snippet, and try to translate them into python.

The available python bindings of pyds can be found Deepstream Python API Reference — Deepstream Deepstream Version: 6.1.1 documentation