Accessing GstBaseSink stats


Looking at the docs I can see GstBaseSink exposes a bunch of stats

However when using a specific sink likertmp2sink or srtsink I only have the stats defined on those sink’s available when getting the stats structure from the element.

I tried downcasting my element to a basesink but that did not yield the expected results.

How can I access the properties in the base sink stats object?