From 8ccb9f2595bd8a3f2f78411e72fe8c6eee327eda Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Sat, 11 May 2019 20:55:36 +0200 Subject: [PATCH] gdb: handle ghost and proxy pads while looking for the top-level element The parent object for pads is not always a GstElement. Handle GstProxyPad parents as well. --- libs/gst/helpers/gst_gdb.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/libs/gst/helpers/gst_gdb.py b/libs/gst/helpers/gst_gdb.py index 443c3cb..4e483ed 100644 --- a/libs/gst/helpers/gst_gdb.py +++ b/libs/gst/helpers/gst_gdb.py @@ -269,9 +269,15 @@ def gst_object_pipeline(obj): if g_inherits_type(obj, "GstElement") and \ GdbGstElement(obj) not in GdbGstElement(tmp).children(): break - if g_inherits_type(obj, "GstPad") and \ - GdbGstPad(obj) not in GdbGstElement(tmp).pads(): - break + if g_inherits_type(obj, "GstPad"): + pad = GdbGstPad(obj) + if g_inherits_type(tmp, "GstElement"): + if pad not in GdbGstElement(tmp).pads(): + break + elif g_inherits_type(tmp, "GstProxyPad"): + t = gdb.lookup_type("GstProxyPad").pointer() + if pad != GdbGstPad(tmp.cast(t)["priv"]["internal"]): + break obj = tmp except gdb.MemoryError: pass -- 2.7.4