A single MoQ object delivered to a subscriber.
Each t/0 corresponds to one object as defined by the MoQ transport
specification: a single element delivered either on a subgroup stream or in a
datagram.
Pattern-match on the fields you care about:
receive do
{:moqx_object, ^sub,
%MOQX.Object{group_id: g, subgroup_id: sg, object_id: o, payload: p}} ->
handle(g, sg, o, p)
endFields
:group_id— the group this object belongs to:subgroup_id— the resolved subgroup id. Always a concrete integer on receive; for publishers that use the "subgroup id = first object id" mode the value is derived from the first object's id:object_id— the object's id within the subgroup:priority— publisher priority (0..255) carried in the subgroup header or datagram header:status—:normalfor data-bearing objects, otherwise a marker status (:does_not_exist,:end_of_group,:end_of_track):extensions— list of{type, value}extension headers. Eventypecarries a varint value (non-negative integer); oddtypecarries a binary value. This parity rule is enforced by the MoQ spec:payload— object payload as a%MOQX.NativeBinary{}. The bytes stay in native heap untilMOQX.NativeBinary.load/1is called or the value is passed directly toMOQX.write_object/4/MOQX.write_datagram/3. For marker statuses the native binary is empty (size 0).:transport—:subgroupor:datagram, indicating how the object was delivered
Summary
Types
@type extension() :: {non_neg_integer(), non_neg_integer() | binary()}
@type status() :: :normal | :does_not_exist | :end_of_group | :end_of_track
@type t() :: %MOQX.Object{ extensions: [extension()], group_id: non_neg_integer(), object_id: non_neg_integer(), payload: MOQX.NativeBinary.t(), priority: 0..255, status: status(), subgroup_id: non_neg_integer(), transport: transport() }
@type transport() :: :subgroup | :datagram