How to set variables for dsexample for input and output?

Dear friends:
I have a problem. I hope getting an variable from outside of deepstream, the variable is used in dsexample, and after my algorithm, I hope to output another variable.

However, I find the stream in dsexample is GST stream, How could I do? Please give me some suggestion. Thank you very much.

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

What kind of variable? A picture, an integer or anything else? How much do you know about GStreamer(