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)