# `Membrane.MPEGTS.Muxer.Engine`
[🔗](https://github.com/membraneframework/membrane_mpegts_plugin/blob/v0.6.0/lib/muxer/engine.ex#L1)

A module with functionalities allowing for muxing stream into the MPEG-TS container.

# `t`

```elixir
@type t() :: %{
  ts: Membrane.MPEGTS.Muxer.TS.t(),
  tracks_pids: [{track(), pos_integer()}],
  next_es_pid: pos_integer()
}
```

# `track`

```elixir
@type track() :: :audio | :video
```

# `new`

```elixir
@spec new() :: {binary(), t()}
```

Creates a new muxer instance and returns initial payload with container metadata.

# `put_frame`

```elixir
@spec put_frame(binary(), track(), non_neg_integer(), non_neg_integer(), t()) ::
  {binary(), t()}
```

Adds a frame to a given track and returns next part of the container payload.

# `register_track`

```elixir
@spec register_track(track(), t()) :: {binary(), t()}
```

Adds a new track to the muxer and returns track metadata.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
