Membrane.VideoInterop.Sink (membrane_video_interop v0.1.0)

Copy Markdown View Source

Consumes %VideoInterop.Frame{} buffers through a configured callback.

The callback is invoked as module.function(frame, target, extra_args...) and must consume the frame on every normal return, including error and unexpected return values. The sink releases only frames rejected before callback entry and frames whose callback raises, exits, or throws. A callback that transfers ownership must return normally; transferring and then raising would violate this contract.

Invalid payloads and callback failures are reported to the parent as {:video_interop_sink_error, reason}.

Element options

Passed via struct Membrane.VideoInterop.Sink.t/0

  • submit

    {module(), atom(), [term()]}

    Required
    MFA invoked for each frame

  • target

    term()

    Required
    Target passed as the callback's second argument

Pads

:input

Accepted formats:

VideoInterop.Format
Direction::input
Availability::always
Flow control::auto

Summary

Types

t()

Struct containing options for Membrane.VideoInterop.Sink

Functions

Returns description of options available for this module

Types

t()

@type t() :: %Membrane.VideoInterop.Sink{
  submit: {module(), atom(), [term()]},
  target: term()
}

Struct containing options for Membrane.VideoInterop.Sink

Functions

options()

@spec options() :: keyword()

Returns description of options available for this module