ExSDP.Attribute (ExSDP v0.2.0) View Source

This module represents Attributes fields of SDP.

Link to this section Summary

Link to this section Types

Specs

flag_attributes() :: :inactive | :sendonly | :sendrecv | :recvonly

Specs

key() ::
  binary() | value_attributes() | numeric_attributes() | :framerate | :rtpmap

Specs

numeric_attributes() :: :quality | :ptime | :maxptime

Specs

t() :: %ExSDP.Attribute{key: key(), value: value()}

Specs

value() :: binary() | flag_attributes()

Specs

value_attributes() ::
  :type
  | :tool
  | :sdplang
  | :rtpmap
  | :lang
  | :orient
  | :keywds
  | :charset
  | :cat

Link to this section Functions

Specs

parse(binary()) :: {:ok, t()} | {:error, atom()}

Parses SDP Attribute.

value_attributes/0 and numeric_attributes/0 formatted as name:value are be parsed as {name, value} other values are treated as flag_attributes/0. Known attribute names are converted into atoms.

Link to this function

parse_media_attribute(other, media)

View Source

Specs

parse_media_attribute(t(), atom() | binary()) ::
  {:error, :invalid_attribute} | {:ok, t()}
parse_media_attribute(t(), atom() | binary()) ::
  {:error, :invalid_attribute} | {:ok, t()}