# `XMediaLib.SDP.Codec`
[🔗](https://github.com/Lazarus404/xmedialib/blob/main/lib/sdp/types.ex#L283)

RTP dynamic payload mapping (`a=rtpmap:`).

## What problem this solves

Dynamic RTP payload types in the `m=` format list need `a=rtpmap:` lines naming
the codec and clock rate (for example Opus at 48000 Hz). This struct captures
one rtpmap binding for codec negotiation and SFU routing.

Maps an RTP payload type number to a codec name, clock rate, and optional
encoding parameters (channels for audio).

Wire form: `a=rtpmap:<pt> <encoding>/<clock>[/encoding-params]`

## RFCs

* [RFC 8866](https://www.rfc-editor.org/rfc/rfc8866) pt.6
* [RFC 3551](https://www.rfc-editor.org/rfc/rfc3551) - static payload types

# `t`

```elixir
@type t() :: %XMediaLib.SDP.Codec{
  clock_rate: non_neg_integer(),
  encoding_params: String.t() | nil,
  name: String.t(),
  payload_type: non_neg_integer()
}
```

Payload type, codec name, clock rate, and optional encoding parameters.

## Fields

* `:payload_type` - dynamic RTP payload type from the `m=` format list
* `:name` - codec name, e.g. `opus` or `VP8`
* `:clock_rate` - RTP timestamp clock in Hz
* `:encoding_params` - optional third slash field (often channel count)

---

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