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 [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
I don't think you can do that. There is no concept of scope with the gstreamer logger. 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 <[hidden email]> wrote:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
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 <[hidden email]> wrote:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
A GstElement is a GstObject so cast and then call gst_object_get_parent On Wed, Aug 5, 2020, 5:56 PM Tyler Compton <[hidden email]> wrote:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Thanks for your help, David! I'll see what I can do. On Wed, Aug 5, 2020 at 6:31 PM David Ing <[hidden email]> wrote:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |