Membrane.H265.Decoder (Membrane Video Transcode v0.1.0)

Copy Markdown View Source

Decodes H.265 access units into leased NV12 DMA-BUF %VideoInterop.Frame{} payloads or copied raw frames.

DMA-BUF output carries a concrete sync-file acquire fence. Its native storage and fence lifetime are owned by a bounded VideoInterop.LeaseOwner with authenticated abandonment guards. Presentation remains outside this package; connect canonical output to Membrane.VideoInterop.Sink when frames need to be rendered.

Element options

Passed via struct Membrane.H265.Decoder.t/0

  • output

    output_mode()

    Default value: :dmabuf
    Whether to emit canonical DMA-BUF or copied raw frames

  • output_format

    pixel_format()

    Default value: :NV12
    Pixel format to use for copied raw output

  • hw_device

    String.t()

    Default value: "/dev/dri/renderD128"
    Hardware decode device

  • decoder

    decoder_backend()

    Default value: :auto
    Decoder backend to use

  • max_in_flight

    pos_integer()

    Default value: 16
    Maximum number of canonical frame leases

Pads

:input

Accepted formats:

%H265{alignment: :au}
Direction::input
Availability::always
Flow control::auto

:output

Accepted formats:

%Format{storage: %StorageFormat{fourcc: @nv12_fourcc}}
%RawVideo{pixel_format: format, aligned: true} when format in @formats
Direction::output
Availability::always
Flow control::auto

Summary

Types

Decoder backend to use.

Decoder output mode.

Supported copied output pixel formats.

t()

Struct containing options for Membrane.H265.Decoder

Functions

Returns description of options available for this module

Types

decoder_backend()

@type decoder_backend() :: :auto | :vaapi | :v4l2request | :v4l2m2m | :software

Decoder backend to use.

output_mode()

@type output_mode() :: :dmabuf | :raw

Decoder output mode.

pixel_format()

@type pixel_format() ::
  :I420
  | :I422
  | :I444
  | :RGB
  | :BGRA
  | :RGBA
  | :NV12
  | :NV21
  | :YV12
  | :AYUV
  | :YUY2

Supported copied output pixel formats.

t()

@type t() :: %Membrane.H265.Decoder{
  decoder: decoder_backend(),
  hw_device: String.t(),
  max_in_flight: pos_integer(),
  output: output_mode(),
  output_format: pixel_format()
}

Struct containing options for Membrane.H265.Decoder

Functions

options()

@spec options() :: keyword()

Returns description of options available for this module