and the last state change succeeded, [gst.types.StateChangeReturn.Async] if the element is still performing a state change or [gst.types.StateChangeReturn.Failure] if the last state change failed.
MT safe.
gst.types.StateChangeReturn getState(out gst.types.State state, out gst.types.State pending, gst.types.ClockTime timeout)Gets the state of the element.
For elements that performed an ASYNC state change, as reported by [gst.element.Element.setState], this function will block up to the specified timeout value for the state change to complete. If the element completes the state change or goes into an error, this function returns immediately with a return value of [gst.types.StateChangeReturn.Success] or [gst.types.StateChangeReturn.Failure] respectively.
For elements that did not return [gst.types.StateChangeReturn.Async], this function returns the current and pending state immediately.
This function returns [gst.types.StateChangeReturn.NoPreroll] if the element successfully changed its state but is not able to provide data yet. This mostly happens for live sources that only produce data in [gst.types.State.Playing]. While the state change return is equivalent to [gst.types.StateChangeReturn.Success], it is returned to the application to signal that some sink elements might not be able to complete their state change because an element is not producing data to complete the preroll. When setting the element to playing, the preroll will complete and playback will start.
state | a pointer to #GstState to hold the state. Can be null. |
pending | a pointer to #GstState to hold the pending state. Can be null. |
timeout | a #GstClockTime to specify the timeout for an async state change or [gst.types.CLOCK_TIME_NONE] for infinite timeout. |
and the last state change succeeded, [gst.types.StateChangeReturn.Async] if the element is still performing a state change or [gst.types.StateChangeReturn.Failure] if the last state change failed.
MT safe.