#include <icy/webrtc/codecnegotiator.h>Result of codec negotiation between a remote SDP offer and the local FFmpeg codec inventory.
| Return | Name | Description |
|---|---|---|
std::string | rtpName | RTP codec name (e.g. "H264", "VP8", "opus") |
std::string | ffmpegName | FFmpeg encoder name (e.g. "libx264", "libvpx", "libopus") |
int | payloadType | RTP payload type from SDP. |
uint32_t | clockRate | RTP clock rate (90000 for video, 48000 for opus) |
std::string | fmtp | Format parameters (e.g. "profile-level-id=42e01f") |
std::string rtpNameRTP codec name (e.g. "H264", "VP8", "opus")
std::string ffmpegNameFFmpeg encoder name (e.g. "libx264", "libvpx", "libopus")
int payloadType = 0RTP payload type from SDP.
uint32_t clockRate = 0RTP clock rate (90000 for video, 48000 for opus)
std::string fmtpFormat parameters (e.g. "profile-level-id=42e01f")
| Return | Name | Description |
|---|---|---|
av::VideoCodec | toVideoCodec const | Create an av::VideoCodec from this negotiation result. Width, height, fps default to 0 (caller should set these). |
av::VideoCodec | toWebRtcVideoCodec const | Create an av::VideoCodec configured for WebRTC browser playback. Sets low-latency options: ultrafast preset, zerolatency tune, constrained baseline profile for H.264, and appropriate defaults for VP8/VP9/AV1. |
av::AudioCodec | toAudioCodec const | Create an av::AudioCodec from this negotiation result. Channels default to 2, sampleRate to the RTP clock rate. |
av::AudioCodec | toWebRtcAudioCodec const | Create an av::AudioCodec configured for WebRTC browser playback. Forces 48000 Hz for Opus, sets appropriate options. |
const
av::VideoCodec toVideoCodec(int width, int height, double fps) constCreate an av::VideoCodec from this negotiation result. Width, height, fps default to 0 (caller should set these).
const
av::VideoCodec toWebRtcVideoCodec(int width, int height, double fps) constCreate an av::VideoCodec configured for WebRTC browser playback. Sets low-latency options: ultrafast preset, zerolatency tune, constrained baseline profile for H.264, and appropriate defaults for VP8/VP9/AV1.
const
av::AudioCodec toAudioCodec(int channels, int sampleRate) constCreate an av::AudioCodec from this negotiation result. Channels default to 2, sampleRate to the RTP clock rate.
const
av::AudioCodec toWebRtcAudioCodec(int channels) constCreate an av::AudioCodec configured for WebRTC browser playback. Forces 48000 Hz for Opus, sets appropriate options.