Merge pull request #44 from go-gst/current_state_member

reimplement current_state getter
This commit is contained in:
Wilhelm Bartel
2023-09-20 11:03:16 +02:00
committed by GitHub

View File

@@ -359,6 +359,15 @@ func (e *Element) GetState(state State, timeout ClockTime) (StateChangeReturn, S
return StateChangeReturn(stateChangeStatus), State(curState)
}
// this returns the value of the `current_state` member of the element:
//
// the current state of an element
//
// see https://gstreamer.freedesktop.org/documentation/gstreamer/gstelement.html?gi-language=c#members
func (e *Element) GetCurrentState() State {
return State(e.Instance().current_state)
}
// GetStaticPad retrieves a pad from element by name. This version only retrieves
// already-existing (i.e. 'static') pads.
func (e *Element) GetStaticPad(name string) *Pad {