From 70723da7895cdfb29a2f5f078a5182d42e65d1cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Mon, 6 Jan 2025 12:01:30 +0100 Subject: [PATCH] add SourceObject to GstMessage. --- gst/gst_message.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gst/gst_message.go b/gst/gst_message.go index 91fcfd8..2606afb 100644 --- a/gst/gst_message.go +++ b/gst/gst_message.go @@ -59,9 +59,14 @@ func (m *Message) Copy() *Message { return FromGstMessageUnsafeFull(unsafe.Pointer(newNative)) } -// Source returns the source of the message. +// Source returns name of the source of the message. func (m *Message) Source() string { return C.GoString(m.Instance().src.name) } +// Source returns object of the source of the message. +func (m *Message) SourceObject() *Object { + return wrapObject(glib.Take(unsafe.Pointer(m.Instance().src))) +} + // Type returns the MessageType of the message. func (m *Message) Type() MessageType { return MessageType(m.Instance()._type)