View Source ExSDP.Attribute (ExSDP v0.10.2)

This module represents Attributes fields of SDP.

Link to this section Summary

Functions

Parses SDP Attribute line.

Link to this section Types

@type cat() :: {:cat, binary()}
@type charset() :: {:charset, binary()}
@type fingerprint() :: {:fingerprint, {hash_function(), binary()}}
@type flag_attributes() ::
  :recvonly
  | :sendrecv
  | :sendonly
  | :inactive
  | :extmap_allow_mixed
  | :rtcp_mux
  | :rtcp_rsize
@type framerate() :: {:framerate, framerate_value()}
@type framerate_value() :: float() | {integer(), integer()}
@type hash_function() :: :sha1 | :sha224 | :sha256 | :sha384 | :sha512
@type ice_options() :: {:ice_options, binary() | [binary()]}
@type ice_pwd() :: {:ice_pwd, binary()}
@type ice_ufrag() :: {:ice_ufrag, binary()}
@type keywds() :: {:keywds, binary()}
@type lang() :: {:lang, binary()}
@type maxptime() :: {:maxptime, non_neg_integer()}
@type mid() :: {:mid, binary()}
@type orient() :: {:orient, orient_value()}
@type orient_value() :: :portrait | :landscape | :seascape
@type ptime() :: {:ptime, non_neg_integer()}
@type quality() :: {:quality, non_neg_integer()}
@type sdplang() :: {:sdplang, binary()}
@type setup() :: {:setup, setup_value()}
@type setup_value() :: :active | :passive | :actpass | :holdconn
@type tool() :: {:tool, binary()}
@type type() :: {:type, type_value()}
@type type_value() :: :broadcast | :meeting | :moderated | :test | :H332

Link to this section Functions

@spec parse(binary(), opts :: Keyword.t()) :: {:ok, t()} | {:error, atom()}

Parses SDP Attribute line.

line is a string in form of a=attribute or a=attribute:value. opts is a keyword list that can contain some information for parsers.

Unknown attributes keys are returned as strings, known ones as atoms. For known attributes please refer to t().