mirror of
https://github.com/go-gst/go-gst.git
synced 2025-09-27 04:15:56 +08:00
Merge pull request #44 from go-gst/current_state_member
reimplement current_state getter
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user