HOW TO : Accessing Metadata on main thread?

Hey guys, I’m able to extract metadata out from one of the gst-pads but instead of passing it to a broker service, I want to access it on the main thread that initiated the pipeline loop. Any example or suggestions?

Please refer to sources/apps/sample_apps/deepstream-gst-metadata-test or sources/apps/sample_apps/deepstream-infer-tensor-meta-test for how to access metadata