You're seeing just the callback handle_prepared_to_stopped, go back to Membrane.Element.Base module for more information.
Link to this callback

handle_prepared_to_stopped(context, state)

View Source (optional)


  context :: Membrane.Element.CallbackContext.PlaybackChange.t(),
  state :: Membrane.Element.state_t()
) :: callback_return_t()

Callback invoked when element is supposed to stop (goes from state :prepared to :stopped).

Usually this is the place for releasing all remaining resources used by the element. For example, if element opens a file in handle_stopped_to_prepared/2, this is the place to close it.