View Source Membrane.Opus.Parser (Membrane Opus plugin v0.20.1)

Parses a raw incoming Opus stream and adds stream_format information, as well as metadata.

Adds the following metadata:

duration :: non_neg_integer() Number of nanoseconds encoded in this packet

Element options

Passed via struct Membrane.Opus.Parser.t/0

  • delimitation

    delimitation_t()

    Default value: :keep
    If input is delimitted? (as indicated by the self_delimiting? field in %Opus) and :undelimit is selected, will remove delimiting.

    If input is not delimitted? and :delimit is selected, will add delimiting.

    If :keep is selected, will not change delimiting.

    Otherwise will act like :keep.

    See https://tools.ietf.org/html/rfc6716#appendix-B for details on the self-delimiting Opus format.

  • input_delimitted?

    boolean()

    Default value: false
    If you know that the input is self-delimitted? but you're reading from some element that isn't sending the correct structure, you can set this to true to force the Parser to assume the input is self-delimitted? and ignore upstream stream_format information on self-delimitation.

  • generate_best_effort_timestamps?

    boolean()

    Default value: false
    If this is set to true parser will try to generate timestamps starting from 0 and increasing them by frame duration, otherwise it will pass pts from input to output, even if it's nil.

Pads

:input

Accepted formats:

Opus
%RemoteStream{content_format: format} when format in [Opus, nil]
Direction::input
Availability::always
Flow control::auto

:output

Accepted formats:

Opus
Direction::output
Availability::always
Flow control::auto

Summary

Types

t()

Struct containing options for Membrane.Opus.Parser

Functions

Returns description of options available for this module

Types

@type delimitation_t() :: :delimit | :undelimit | :keep
@type t() :: %Membrane.Opus.Parser{
  delimitation: delimitation_t(),
  generate_best_effort_timestamps?: boolean(),
  input_delimitted?: boolean()
}

Struct containing options for Membrane.Opus.Parser

Functions

@spec options() :: keyword()

Returns description of options available for this module