View Source Membrane.Buffer.Metric behaviour (Membrane Core v1.0.1)

Specifies API for metrics that analyze data in terms of a given unit

Summary

Types

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

Callbacks

Link to this callback

buffer_size_approximation()

View Source
@callback buffer_size_approximation() :: pos_integer()
@callback buffers_size(
  [
    %Membrane.Buffer{
      dts: term(),
      metadata: term(),
      payload: term(),
      pts: term()
    }
  ]
  | []
) ::
  non_neg_integer()
Link to this callback

split_buffers(arg1, non_neg_integer)

View Source
@callback split_buffers(
  [
    %Membrane.Buffer{
      dts: term(),
      metadata: term(),
      payload: term(),
      pts: term()
    }
  ]
  | [],
  non_neg_integer()
) ::
  {[
     %Membrane.Buffer{
       dts: term(),
       metadata: term(),
       payload: term(),
       pts: term()
     }
   ]
   | [],
   [
     %Membrane.Buffer{
       dts: term(),
       metadata: term(),
       payload: term(),
       pts: term()
     }
   ]
   | []}

Functions

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