View Source Membrane.RTSP (Membrane RTSP v0.10.0)

Functions for interfacing with a RTSP session

Summary

Functions

Returns a specification to start this module under a supervisor.

Same as start_link/2, but doesn't link the session process.

Starts and links session process with given URL as a base path for requests.

Transfer the control of the TCP socket the session was using to a new process. For more information see :gen_tcp.controlling_process/2. From now on the session won't try to receive responses to requests from the socket, since now an other process is controlling it. Instead of this, the session will synchronously wait for the response to be supplied with handle_response/2.

Types

@type headers() :: [{binary(), binary()}]
@type option() ::
  {:connection_timeout, non_neg_integer()}
  | {:response_timeout, non_neg_integer()}
@type options() :: [option()]
@type t() :: pid()

Functions

Link to this function

announce(session, headers \\ [], body \\ "")

View Source
@spec announce(t(), headers(), binary()) :: Membrane.RTSP.Response.result()

Returns a specification to start this module under a supervisor.

See Supervisor.

@spec close(pid()) :: :ok
Link to this function

describe(session, headers \\ [])

View Source
@spec describe(t(), headers()) :: Membrane.RTSP.Response.result()
Link to this function

get_parameter(session, headers \\ [], body \\ "")

View Source
@spec get_parameter(t(), headers(), binary()) :: Membrane.RTSP.Response.result()
@spec get_socket(t()) :: :gen_tcp.socket()
Link to this function

handle_response(session, raw_response)

View Source
@spec handle_response(t(), binary()) :: :ok
Link to this function

options(session, headers \\ [])

View Source
@spec options(t(), headers()) :: Membrane.RTSP.Response.result()
Link to this function

pause(session, headers \\ [])

View Source
@spec pause(t(), headers()) :: Membrane.RTSP.Response.result()
Link to this function

play(session, headers \\ [])

View Source
@spec play(t(), headers()) :: Membrane.RTSP.Response.result()
Link to this function

record(session, headers \\ [])

View Source
@spec record(t(), headers()) :: Membrane.RTSP.Response.result()
Link to this function

request(session, method, headers \\ [], body \\ "", path \\ nil)

View Source
@spec request(pid(), binary(), headers(), binary(), nil | binary()) ::
  Membrane.RTSP.Response.result()
Link to this function

set_parameter(session, headers \\ [], body \\ "")

View Source
@spec set_parameter(t(), headers(), binary()) :: Membrane.RTSP.Response.result()
Link to this function

setup(session, path, headers \\ [])

View Source
@spec setup(t(), binary(), headers()) :: Membrane.RTSP.Response.result()
Link to this function

start(url, options \\ [])

View Source
@spec start(binary() | URI.t(), Keyword.t()) :: GenServer.on_start()

Same as start_link/2, but doesn't link the session process.

Link to this function

start_link(url, options \\ [])

View Source
@spec start_link(binary() | URI.t(), options()) :: GenServer.on_start()

Starts and links session process with given URL as a base path for requests.

Link to this function

teardown(session, headers \\ [])

View Source
@spec teardown(t(), headers()) :: Membrane.RTSP.Response.result()
Link to this function

transfer_socket_control(session, new_controlling_process)

View Source
@spec transfer_socket_control(t(), pid()) ::
  :ok | {:error, :closed | :not_owner | :badarg | :inet.posix()}

Transfer the control of the TCP socket the session was using to a new process. For more information see :gen_tcp.controlling_process/2. From now on the session won't try to receive responses to requests from the socket, since now an other process is controlling it. Instead of this, the session will synchronously wait for the response to be supplied with handle_response/2.

@spec user_agent() :: binary()