Gst.Element.prototype.set_state
function set_state(state:Gst.State):Gst.StateChangeReturn { // Gjs wrapper for gst_element_set_state() }
Sets the state of the element. This function will try to set the requested state by going through all the intermediary states and calling the class's state change function for each.
This function can return #GST_STATE_CHANGE_ASYNC, in which case the element will perform the remainder of the state change asynchronously in another thread. An application can use Gst.Element.prototype.get_state to wait for the completion of the state change or it can wait for a Gst.MessageType.async_done or Gst.MessageType.state_changed on the bus.
State changes to Gst.State.ready or Gst.State.null never return #GST_STATE_CHANGE_ASYNC.
- state
the element's new Gst.State.
- Returns
Result of the state change using Gst.StateChangeReturn. MT safe.