View Source Membrane.Buffer (Membrane Core v0.11.0)

Structure representing a single chunk of data that flows between elements.

For now, it is just a wrapper around bitstring with optionally some metadata attached to it, but in future releases we plan to support different payload types.

Link to this section Summary

Functions

Returns Membrane.Buffer.t/0 :dts if available or :pts if :dts is not set. If none of them is set nil is returned.

Link to this section Types

@type metadata_t() :: map()
@type t() :: %Membrane.Buffer{
  dts: Membrane.Time.t() | nil,
  metadata: metadata_t(),
  payload: Membrane.Payload.t(),
  pts: Membrane.Time.t() | nil
}

Link to this section Functions

@spec get_dts_or_pts(t()) :: Membrane.Time.t() | nil

Returns Membrane.Buffer.t/0 :dts if available or :pts if :dts is not set. If none of them is set nil is returned.