Membrane.Buffer.Metric behaviour (Membrane Core v0.8.1) View Source

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

Link to this section Summary

Link to this section Types

Specs

unit_t() :: :buffers | :bytes

Link to this section Callbacks

Specs

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

input_buf_preferred_size()

View Source

Specs

input_buf_preferred_size() :: pos_integer()
Link to this callback

split_buffers(arg1, non_neg_integer)

View Source

Specs

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()
     }
   ]
   | []}

Link to this section Functions

Specs

from_unit(unit_t()) :: module()