Skip to content

Commit

Permalink
Add get_transport function
Browse files Browse the repository at this point in the history
  • Loading branch information
Noarkhh committed Jan 10, 2024
1 parent cecd087 commit 090fd84
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/membrane_rtsp/rtsp.ex
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ defmodule Membrane.RTSP do
end
end

def handle_call(:get_transport, _from, %State{transport: transport}) do
transport
end

@impl true
def handle_cast(:terminate, %State{} = state) do
{:stop, :normal, state}
Expand Down Expand Up @@ -120,6 +124,11 @@ defmodule Membrane.RTSP do

@type headers :: [{binary(), binary()}]

@spec get_transport(t()) :: any()
def get_transport(session) do
GenServer.call(session, :get_transport)
end

@spec describe(t(), headers()) :: Response.result()
def describe(session, headers \\ []), do: request(session, "DESCRIBE", headers, "")

Expand Down

0 comments on commit 090fd84

Please sign in to comment.