View Source Membrane.Native.RawVideo (Membrane: Raw video format v0.3.0)

Unifex-compatible implementation of the Membrane.RawVideo struct.

Currently, unifex does not support tuples in the structs, so we have to decompose the framerate into two fields.

Link to this section Summary

Types

The denominator of the number of frames per second. To avoid using tuple type, it is described by 2 separate integers number. The default value is 1.

A numerator of the number of frames per second. To avoid using tuple type, it is described by 2 separate integers number.

t()

Functions

Creates unifex compatible struct from Membrane.RawVideo struct. It may raise error when RawVideo with not supported pixel format is provided.

Convert a native raw video to the Membrane.RawVideo counterpart.

Link to this section Types

@type framerate_den_t() :: pos_integer()

The denominator of the number of frames per second. To avoid using tuple type, it is described by 2 separate integers number. The default value is 1.

@type framerate_num_t() :: non_neg_integer()

A numerator of the number of frames per second. To avoid using tuple type, it is described by 2 separate integers number.

@type t() :: %Membrane.Native.RawVideo{
  aligned: Membrane.RawVideo.aligned_t(),
  framerate_den: framerate_den_t(),
  framerate_num: framerate_num_t(),
  height: Membrane.RawVideo.height_t(),
  pixel_format: Membrane.RawVideo.pixel_format_t(),
  width: Membrane.RawVideo.width_t()
}

Link to this section Functions

Link to this function

from_membrane_raw_video(membrane_raw_video)

View Source
@spec from_membrane_raw_video(Membrane.RawVideo.t()) :: t()

Creates unifex compatible struct from Membrane.RawVideo struct. It may raise error when RawVideo with not supported pixel format is provided.

Link to this function

to_membrane_raw_video(native_raw_video)

View Source
@spec to_membrane_raw_video(t()) :: Membrane.RawVideo.t()

Convert a native raw video to the Membrane.RawVideo counterpart.