diff --git a/gst/gst_element.go b/gst/gst_element.go index ec48080..bdf116b 100644 --- a/gst/gst_element.go +++ b/gst/gst_element.go @@ -531,6 +531,15 @@ func (e *Element) SetState(state State) error { return nil } +// SetLockedState sets the locked state flag for this element. +func (e *Element) SetLockedState(lockedState bool) error { + ret := C.gst_element_set_locked_state((*C.GstElement)(e.Instance()), gboolean(lockedState)) + if !gobool(ret) { + return fmt.Errorf("failed to set locked state") + } + return nil +} + // SyncStateWithParent tries to change the state of the element to the same as its parent. If this function returns // FALSE, the state of element is undefined. func (e *Element) SyncStateWithParent() bool { diff --git a/gst/gst_message.go b/gst/gst_message.go index 5bb5205..c5880b8 100644 --- a/gst/gst_message.go +++ b/gst/gst_message.go @@ -86,6 +86,8 @@ func (m *Message) GetStructure() *Structure { C.gst_message_parse_warning_details(m.Instance(), (**C.GstStructure)(unsafe.Pointer(&st))) case MessageElement: st = C.gst_message_get_structure(m.Instance()) + case MessageApplication: + st = C.gst_message_get_structure(m.Instance()) } // if no structure was returned, immediately return nil