Routing logging for each pipeline

Tyler Compton xaviosx at
Thu Aug 6 00:56:06 UTC 2020

Thanks for the info! It's a shame that this may not be entirely possible.
If I were to try to categorize the logs that do have GObjects, and I found
the GObject to be a GstElement, how would I traverse the hierarchy? The
only way I'm aware of is by traversing the tree downwards by iterating the
elements in the GstPipeline, and recursively iterating elements in each
GstBin, which isn't ideal from an efficiency standpoint.

On Wed, Aug 5, 2020 at 3:57 PM David Ing <ding at> wrote:

> I don't think you can do that.  There is no concept of scope with the
> gstreamer logger.
> Many log statements do not have a GObject passed in.  If you get a GObject
> passed in, you can check to see if it is a GstObject ... in which case you
> might be able to traverse the hierarchy (upwards) until you **maybe** hit a
> GstPipeline.  But that only works for a tiny fraction of log statements.
> You can't even find the parent thread of the current thread (this is an OS
> limitation) ... which means you can't trace back to the main thread of your
> pipeline.
> On Wed, Aug 5, 2020 at 3:38 PM Tyler Compton <xaviosx at> wrote:
>> Hi list,
>> I'm working on an application that handles multiple video streams with
>> GStreamer, and I would like to be able to present users with logging
>> information for each stream in the UI to make it easier for users to
>> diagnose problems. For my application, a "video stream" has only one
>> pipeline associated with it.
>> In order to capture GStreamer logs, I'm installing a new handler
>> with Gst.debug_add_log_function, which provides me some information
>> alongside the actual log message. However, it's not clear to me how I
>> should sort logs by their pipeline with this information. I assume the key
>> is the "object" field given to my log handler, but considering this object
>> can be of any type, I'm not sure how to reliably figure out which pipeline
>> this object is from.
>> I'm using GStreamer 1.16.2 with PyGObject.
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list