Custom plugins with two sinks and two sources

Good day, my colleagues!

I want to implement the following custom plugin.

The plugin performs the following tasks: it receives a video stream along with associated metadata and GPS information. It analyzes the metadata, and under certain conditions, it triggers an event. This event includes relevant details as well as the current GPS coordinates.

Please help me understand how to implement such a plugin. I would appreciate any useful links or resources you can share.

My original question was quite broad. I developed a custom plugin with two sink pads and two source pads, but it’s not working as expected in a real scenario. In this case, the first input stream is a video stream, and the second is a stream of subtitle strings. I suspect the issue lies in the streams having different update rates or frequencies.