Membrane.Buffer.Metric behaviour (Membrane Core v1.3.0)

Copy Markdown View Source

Specifies the type for demand units.

Deprecated behaviour

The callbacks defined here are deprecated. The metric functionality has been moved to the internal API of the Membrane Framework.

Summary

Types

unit()

@type unit() :: :buffers | :bytes

Callbacks

buffer_size_approximation()

@callback buffer_size_approximation() :: pos_integer()

buffers_size(list)

@callback buffers_size([Membrane.Buffer.t()]) :: non_neg_integer()

split_buffers(list, non_neg_integer)

@callback split_buffers([Membrane.Buffer.t()], non_neg_integer()) ::
  {[Membrane.Buffer.t()], [Membrane.Buffer.t()]}

Functions

from_unit(atom)

@spec from_unit(unit()) :: module()