mirror of
https://github.com/go-gst/go-gst.git
synced 2025-09-26 20:11:18 +08:00
Merge pull request #140 from do-hyung-kim/enhance_usability
Enhance usability
This commit is contained in:
@@ -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 {
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user