From 887f1e705e061d47150537a5101302d5243a20e9 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Tue, 20 Feb 2024 15:27:15 +0800 Subject: [PATCH] GStreamer: debug - add tracing for GstPadDirection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pick-to: 6.5 6.6 6.7 Change-Id: I277fac1b493a95da0ba3bf5fa9556cfdbb696bc5 Reviewed-by: Jøger Hansegård Reviewed-by: Artem Dyomin --- .../multimedia/gstreamer/common/qgst_debug.cpp | 13 +++++++++++++ .../multimedia/gstreamer/common/qgst_debug_p.h | 1 + 2 files changed, 14 insertions(+) diff --git a/src/plugins/multimedia/gstreamer/common/qgst_debug.cpp b/src/plugins/multimedia/gstreamer/common/qgst_debug.cpp index 8023e3eac6..4d70d9bde2 100644 --- a/src/plugins/multimedia/gstreamer/common/qgst_debug.cpp +++ b/src/plugins/multimedia/gstreamer/common/qgst_debug.cpp @@ -169,6 +169,19 @@ QDebug operator<<(QDebug dbg, GstMessageType type) return dbg << gst_message_type_get_name(type); } +QDebug operator<<(QDebug dbg, GstPadDirection direction) +{ + switch (direction) { + case GST_PAD_UNKNOWN: + return dbg << "GST_PAD_UNKNOWN"; + case GST_PAD_SRC: + return dbg << "GST_PAD_SRC"; + case GST_PAD_SINK: + return dbg << "GST_PAD_SINK"; + } + return dbg; +} + QDebug operator<<(QDebug dbg, const GValue *value) { switch (G_VALUE_TYPE(value)) { diff --git a/src/plugins/multimedia/gstreamer/common/qgst_debug_p.h b/src/plugins/multimedia/gstreamer/common/qgst_debug_p.h index 363e95fd0d..6da6b8a723 100644 --- a/src/plugins/multimedia/gstreamer/common/qgst_debug_p.h +++ b/src/plugins/multimedia/gstreamer/common/qgst_debug_p.h @@ -44,6 +44,7 @@ QDebug operator<<(QDebug, const GstTagList *); QDebug operator<<(QDebug, GstState); QDebug operator<<(QDebug, GstStateChangeReturn); QDebug operator<<(QDebug, GstMessageType); +QDebug operator<<(QDebug, GstPadDirection); QDebug operator<<(QDebug, const GValue *); QDebug operator<<(QDebug, const GError *);