View Source Membrane.RTC.Engine.Endpoint.HLS.VideoLayoutMaker behaviour (Membrane RTC Engine v0.11.0)

Behaviour defining how VideoLayout should change when new video track is added, updated or removed.

Link to this section Summary

Types

Represents parameters of output video created by compositor.

Represent returned value from callbacks. This type is a list consisting of tuples. The first value of the tuple is a track id that helps to identify the tuple, then there is BaseVideoPlacement which is a Membrane.VideoCompositor struct that allows changing the position and resolution of a video. The last value is a VideoTransformations which is also a Membrane.VideoCompositor struct that allows to crop of video and rounding its corners. 

Callbacks

Called when hls endpoint is intialized

Called when new track has been added to hls endpoint

Called when a track has been removed

Called when stream_format for a specific track has changed

Link to this section Types

@type output_format() :: Membrane.RawVideo.t()

Represents parameters of output video created by compositor.

@type state() :: any()
@type stream_format() :: Membrane.H264.t()

Represent returned value from callbacks. This type is a list consisting of tuples. The first value of the tuple is a track id that helps to identify the tuple, then there is BaseVideoPlacement which is a Membrane.VideoCompositor struct that allows changing the position and resolution of a video. The last value is a VideoTransformations which is also a Membrane.VideoCompositor struct that allows to crop of video and rounding its corners. 

Link to this section Callbacks

@callback init(output_format()) :: state()

Called when hls endpoint is intialized

Link to this callback

track_added(t, stream_format, state)

View Source
@callback track_added(Membrane.RTC.Engine.Track.t(), stream_format(), state()) ::
  {updated_layout(), state()}

Called when new track has been added to hls endpoint

@callback track_removed(Membrane.RTC.Engine.Track.t(), state()) ::
  {updated_layout(), state()}

Called when a track has been removed

Link to this callback

track_updated(t, stream_format, state)

View Source
@callback track_updated(Membrane.RTC.Engine.Track.t(), stream_format(), state()) ::
  {updated_layout(), state()}

Called when stream_format for a specific track has changed