Membrane.RTSP.Source (Membrane RTSP plugin v0.7.0)
View SourceSource bin responsible for connecting to an RTSP server.
This element connects to an RTSP server, depayloads and parses the received media if possible. If there's no suitable depayloader and parser, the raw payload is sent to the subsequent elements in the pipeline.
In case connection can't be established or is severed during streaming this bin will crash.
The following codecs are depayloaded and parsed:
H264
H265
AAC
(if sent according to RFC3640)Opus
When the element finishes setting up all tracks it will send a t:set_up_tracks/0
notification.
To receive a track a corresponding Pad.ref(:output, control_path)
pad has to be connected,
where each track's control path is provided in the t:set_up_tracks/0
notification.
Bin options
Passed via struct Membrane.RTSP.Source.t/0
stream_uri
binary()
Required
The RTSP URI of the resource to stream.allowed_media_types
[:video | :audio | :application]
Default value:
[:video, :audio, :application]
The media type to accept from the RTSP server.transport
transport()
Default value:
:tcp
Transport protocol that will be used in the established RTSP stream. In case of UDP a range needs to be provided from which receiving ports will be chosen.timeout
Time.t()
Default value:
15000000000
RTSP response timeoutkeep_alive_interval
Time.t()
Default value:
15000000000
Interval of a heartbeat sent to the RTSP server at a regular interval to keep the session alive.on_connection_closed
:raise_error | :send_eos
Default value:
:raise_error
Defines the element's behavior if the TCP connection is closed by the RTSP server::raise_error
- Raise an error.:send_eos
- Send an:end_of_stream
to the output pad.
Pads
:output
Accepted formats:
_any
Direction: | :output |
Availability: | :on_request |
Summary
Types
Struct containing options for Membrane.RTSP.Source
Types
@type set_up_tracks_notification() :: {:set_up_tracks, [track()]}
@type t() :: %Membrane.RTSP.Source{ allowed_media_types: [:video | :audio | :application], keep_alive_interval: Membrane.Time.t(), on_connection_closed: :raise_error | :send_eos, stream_uri: binary(), timeout: Membrane.Time.t(), transport: transport() }
Struct containing options for Membrane.RTSP.Source
@type track() :: %{ control_path: String.t(), type: :video | :audio | :application, framerate: ExSDP.Attribute.framerate_value() | nil, fmtp: ExSDP.Attribute.FMTP.t() | nil, rtpmap: ExSDP.Attribute.RTPMapping.t() | nil }
@type transport() :: {:udp, port_range_start :: non_neg_integer(), port_range_end :: non_neg_integer()} | :tcp
Functions
@spec options() :: keyword()
Returns description of options available for this module