Move away from accessing `GObject::ref_count`
As discussed with @ebassi earlier, there are plans to implemented biased refcounting in GObject. This would make access to the ref_count
field useless and would break the refcount debugging and refcount testing we have, and also make the refcount tracer useless.
The ref_count
field is clearly marked as private and that it shouldn't be accessed from the outside. We're doing that since basically forever nonetheless, but it's not guaranteed to continue working.
In the short term we should probably get rid of the tests and refcount debugging (and maybe deprecate gst_object_ref()
/ gst_object_unref()
), and deprecate the refcount tracing API so that at least no new users of it appear. In parallel users of the refcount tracer should probably start looking at an alternative approach.