diff options
Diffstat (limited to 'src/plugins/multimedia/gstreamer/common/qgst_p.h')
-rw-r--r-- | src/plugins/multimedia/gstreamer/common/qgst_p.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/plugins/multimedia/gstreamer/common/qgst_p.h b/src/plugins/multimedia/gstreamer/common/qgst_p.h index 3123af7b2..5db195c17 100644 --- a/src/plugins/multimedia/gstreamer/common/qgst_p.h +++ b/src/plugins/multimedia/gstreamer/common/qgst_p.h @@ -80,6 +80,27 @@ QGST_DEFINE_CAST_TRAITS(GstElement, ELEMENT); QGST_DEFINE_CAST_TRAITS(GstBin, BIN); QGST_DEFINE_CAST_TRAITS(GstPad, PAD); +template <> +struct GstObjectTraits<GObject> +{ + using Type = GObject; + template <typename U> + static bool isObjectOfType(U *arg) + { + return G_IS_OBJECT(arg); + } + template <typename U> + static Type *cast(U *arg) + { + return G_OBJECT(arg); + } + template <typename U> + static Type *checked_cast(U *arg) + { + return G_OBJECT(arg); + } +}; + #undef QGST_DEFINE_CAST_TRAITS } // namespace QGstImpl @@ -315,8 +336,6 @@ public: QGstObject(const QGstObject &) = default; QGstObject(QGstObject &&) noexcept = default; - virtual ~QGstObject() = default; - QGstObject &operator=(const QGstObject &) = default; QGstObject &operator=(QGstObject &&) noexcept = default; @@ -435,6 +454,8 @@ public: GstClockTime time() const; }; +class QGstPipeline; + class QGstElement : public QGstObject { public: @@ -503,6 +524,9 @@ public: void setBaseTime(GstClockTime time) const; GstElement *element() const; + + QGstElement getParent() const; + QGstPipeline getPipeline() const; }; template <typename... Ts> |