ExSDP.Media (ExSDP v0.2.0) View Source

This module represents the Media field of SDP.

For more details please see RFC4566 Section 5.14

Link to this section Summary

Types

t()

Represents type of media. In RFC4566 there are defined "audio", "video", "text", "application", and "message" types.

Link to this section Types

Specs

t() :: %ExSDP.Media{
  attributes: [binary()],
  bandwidth: [ExSDP.Bandwidth.t()],
  connection_data: ExSDP.ConnectionData.t(),
  encryption: ExSDP.Encryption.t() | nil,
  fmt: binary() | [0..127],
  ports: [:inet.port_number()],
  protocol: binary(),
  title: binary() | nil,
  type: type()
}

Specs

type() :: :audio | :video | :text | :application | :message | binary()

Represents type of media. In RFC4566 there are defined "audio", "video", "text", "application", and "message" types.

Known types are represented as atoms others are binaries.

Link to this section Functions

Link to this function

apply_session(media, session)

View Source

Specs

apply_session(t(), ExSDP.t()) :: t()

Specs

parse(binary()) ::
  {:ok, t()} | {:error, :invalid_media_spec | :malformed_port_number}
Link to this function

parse_optional(lines, media)

View Source

Specs

parse_optional([binary()], t()) :: {:ok, {[binary()], t()}} | {:error, atom()}