debug: Add API to push/pop current object to TLS for logging purposes
Currently we either have to pass through objects to code that does not concern itself with the object just for logging purposes, or get logs that are unconnected to the object that initially initiated them.
It would be great if we had some API that allows pushing/popping the current object to a TLS variable, and then GST_DEBUG()
etc make use of that if set. This would, for example, allow the code in GstVideoConverter
to print the videoconvert
object as part of the debug logs instead of just printing generic logs.
Main question here would be if this has considerable performance impact if logging is disabled (you'd still need to push/pop the object because you don't know what actual debug category and level is used at a later time).