rtmp v0.2.0 Rtmp.Protocol.RawMessage behaviour

Module that represents a raw RTMP message, and functions to unpack and repack them for handling and serialization

Summary

Functions

Packs a detailed RTMP message into a serializable raw message

Unpacks the specified RTMP message into it’s proper structure

Types

t()
t() :: %Rtmp.Protocol.RawMessage{deserialization_system_time: pos_integer | nil, force_uncompressed: boolean, message_type_id: non_neg_integer, payload: binary, stream_id: non_neg_integer, timestamp: non_neg_integer}

Functions

Packs a detailed RTMP message into a serializable raw message

unpack(raw_message)
unpack(Rtmp.Protocol.RawMessage.t) ::
  {:error, :unknown_message_type} |
  {:ok, Rtmp.Protocol.DetailedMessage.t}

Unpacks the specified RTMP message into it’s proper structure

Callbacks

deserialize(binary)
deserialize(binary) :: any
get_default_chunk_stream_id(struct)
get_default_chunk_stream_id(struct) :: pos_integer
serialize(struct)
serialize(struct) :: {:ok, binary}