sgcWebRTC Feature Matrix — Audio, Video, Data Channels | eSeGeCe

sgcWebRTC Feature Matrix

Everything sgcWebRTC adds to TsgcRTCPeerConnection, grouped by capability. Signaling and connectivity come from the base component in sgcWebSockets Enterprise; this pack unlocks the media engine on top of it — audio, video, screen capture, data channels, encryption and bandwidth estimation. Every capability works the same in Delphi and C++ Builder, and every license ships full source code.

Signaling

Enterprise base & SDP

Audio

Opus / G.711

Video

VP8 / H.264 / MJPEG

Data Channels

RFC 8831 / 8832

Screen Share

Capture & render

SRTP / DTLS

Encrypted media

Bandwidth Estimation

Congestion control

What Enterprise Ships, What sgcWebRTC Adds

The base connectivity is already in sgcWebSockets. sgcWebRTC unlocks the SDP, data channel and media surface on the same component.

CapabilityShips withNotes
STUN client (TsgcSTUNClient)sgcWebSockets StandardServer-reflexive candidate discovery, available below Enterprise.
TURN client & server, ICE client (TsgcTURNClient, TsgcICEClient)sgcWebSockets EnterpriseRelayed candidates and full ICE candidate gathering / nomination.
Base TsgcRTCPeerConnection, legacy WebSocket-relay signalingsgcWebSockets EnterpriseGatherCandidates, WriteData and the OnRTCWebSocket… / OnRTCCandidatePairNominated / OnRTCConnect events drive ICE connectivity and a DTLS transport through the built-in RTCPeerConnection protocol server, with no SDP, data channels or media.
Manual SDP offer/answer signalingsgcWebRTCCreateOffer, CreateAnswer, SetLocalDescription, SetRemoteDescription, AddIceCandidate, RestartIce — the JSEP (RFC 8829) state machine a browser expects.
Renegotiation & glare resolutionsgcWebRTCRe-offers after AddTrack / RemoveTrack, OnNegotiationNeeded, rollback, and the W3C perfect-negotiation rule via Polite.
Trickle ICEsgcWebRTCTrickleICE and RTCOptions.TrickleICEAuto stream candidates as they are found instead of waiting for the full gathering timeout.
Connection & signaling statesgcWebRTCConnectionState (W3C RTCPeerConnectionState subset) and SignalingState (RTCSignalingState subset), plus OnConnectionStateChange and OnError.
SCTP data channels, RTP audio/video, SRTP encryptionsgcWebRTCSee the sections below — all three require this pack on top of the Enterprise base.

Opus & G.711 Audio Tracks

One AddTrack call attaches an audio track to the peer connection; PCM goes in, RTP goes out, and the same path runs in reverse for the remote track.

CapabilityMemberNotes
Attach an audio trackAddTrack(rtctkAudio, aCodec)Returns a TsgcRTCTrack; RemoveTrack stops sending it.
Opus codeccctAudioOpus48 kHz / stereo via a dynamically loaded libopus binding.
G.711 codeccctAudioPCMU / cctAudioPCMA8 kHz / mono μ-law and A-law, always available, no external library.
Send captured audioTsgcRTCTrack.SendPCM(aPCM, aSamplesPerChannel)16-bit signed interleaved PCM at the encoder's sample rate and channel count.
Receive decoded audioOnAudio(aPCM, aSampleRate, aChannels, aSamplesPerChannel)Fires on the remote track as RTP arrives and is decoded.
Encoder / decoder accessAudioEncoder / AudioDecoderThe underlying TsgcAudioEncoderBase / TsgcAudioDecoderBase object, replaceable per track.
Track lifecycleEnabled, Ended, OnEndedEnabled := False mutes without renegotiating; Ended reflects a track dropped by the remote side or a re-offer.
Microphone captureTsgcMediaCaptureSource descendantsNative capture per platform (waveIn on Windows, plus Linux, Apple and Android backends) feeds SendPCM directly.

VP8, H.264 & Motion JPEG Video Tracks

Video works the same shape as audio — frames in, RTP out — with the codec chosen per track and, for H.264, the platform's own hardware encoder underneath.

CapabilityMemberNotes
Attach a video trackAddTrack(rtctkVideo, aCodec)Same call as audio, with a video TsgcCodecType.
VP8 codeccctVideoVP8libvpx binding, dynamically loaded, available on Windows and Linux.
H.264 codeccctVideoH264Native hardware encoder per platform: Media Foundation (Windows), VideoToolbox (iOS/macOS), MediaCodec (Android). Annex-B stream, RFC 6184 payloading, SPS/PPS carried in-band on every keyframe.
Motion JPEG codeccctVideoJPEGGDI+ based, Windows and Delphi XE or later.
Send a raw frameTsgcRTCTrack.SendVideoFrame(aFrame, aForceKeyFrame)Encodes and sends a TsgcVideoFrame (I420/NV12/RGB/BGR family).
Send a pre-encoded frameSendEncodedFrame(aData, aIsKeyFrame)Bypasses the track's own encoder for an externally encoded frame.
Receive decoded / raw framesOnVideoFrame / OnEncodedFrameDecoded TsgcVideoFrame, or the raw encoded bitstream with its keyframe flag.
Request a keyframeRequestKeyFrameSends an RTCP PLI to the remote sender.
Encoder / decoder accessVideoEncoder / VideoDecoderThe underlying TsgcVideoEncoderBase / TsgcVideoDecoderBase object.
Camera captureTsgcMediaCaptureSource descendantsPer-platform capture backends (Windows, Linux, Apple, Android) feed SendVideoFrame directly.
RenderingTsgcMediaRenderer descendantsPer-platform renderer backends (Windows, Linux, Apple, Android) for the decoded remote video.

SCTP Data Channels (RFC 8831 / 8832)

Ordered or unordered, fully reliable or bounded by a retransmit count or a lifetime, over SCTP-over-DTLS.

CapabilityMemberNotes
Open a channelCreateDataChannel(aLabel, aOrdered, aMaxRetransmits, aMaxPacketLifeTime, aProtocol)Returns a TsgcRTCDataChannel; forces RTCOptions.DTLS on.
Remote-opened channelOnDataChannel(aChannel)Fires when the peer opens a channel on this connection.
Send text / binarySend(aText) / SendBytes(aBytes)Returns False if the channel is not open yet.
ReceiveOnMessage(aText) / OnMessageBinary(aBytes)Fires on the SCTP-driving thread.
Lifecycle eventsOnOpen, OnClose, OnError(aError)Matches the W3C RTCDataChannel lifecycle.
Channel stateState, HasId, IdThe SCTP stream id is only final once the DTLS role resolves (RFC 8832 parity).
Flow controlBufferedAmount, MaxMessageSizeMaxMessageSize tracks the peer's own a=max-message-size and refuses an over-size send locally.
Reliability introspectionReliability, ReliabilityParam, Ordered, MaxRetransmits, MaxPacketLifeTimeRead back exactly what the channel negotiated.
CloseCloseRE-CONFIG based close; State goes to closing, then closed with OnClose.
Peer connection levelDataChannelCount, DataChannels[i]Enumerate every open channel on the connection.

Desktop, Monitor, Window & Region Capture

A capture source feeds the same SendVideoFrame path as a camera — screen content is just another video track.

CapabilityMemberNotes
Capture backendTsgcScreenCapture_WinGDI-based desktop, monitor, window and region capture. Currently Windows only.
Enumerate monitorsGetMonitors / MonitorIndexOne line per monitor (resolution, position, primary flag); -1 captures the whole virtual desktop.
Region captureRegionScreen-coordinate rectangle; an empty rect disables region mode.
Layered / transparent windowsCaptureLayeredUses CAPTUREBLT so layered and transparent windows are included.
CursorIncludeCursorDraws the mouse cursor into the captured frame.
DownscalingMaxWidth0 disables downscale; otherwise wider frames are scaled down before encoding.
Frame rateCapture source FrameRateDefault 5 fps, up to 30 fps for screen content.
Encode & sendTsgcRTCTrack.SendVideoFrameCaptured BGRA32 frames feed the track's video encoder like any other source.

Mandatory Media Encryption

Every RTP, RTCP and SCTP packet on the connection is encrypted from the DTLS handshake onward — there is no plaintext mode.

CapabilityDetail
Key exchangeDTLS handshake over the nominated ICE candidate pair (RFC 5764 DTLS-SRTP), deriving the SRTP keying material.
DTLS roleIn manual signaling the role comes from a=setup (offerer passive, answerer active); IsDTLSClient reports it once resolved.
SRTP protection profilesSRTP_AES128_CM_SHA1_80, SRTP_AES128_CM_SHA1_32, SRTP_AEAD_AES_128_GCM, SRTP_AEAD_AES_256_GCM, negotiated during the DTLS handshake.
Per-SSRC crypto stateOne cryptographic context (rollover counter, replay window) per SSRC, as RFC 3711 section 3.2.3 requires, even when BUNDLE puts every m-line on one DTLS-SRTP transport.
ScopeCovers RTP/RTCP media and the SCTP association carrying the data channels — the whole connection, not just one m-line.
BackendOpenSSL-backed SRTP implementation.

Congestion Control & Loss Resilience

A delay-based estimator in the style of Google Congestion Control tracks the link and drives the video encoder's target bitrate.

CapabilityMemberNotes
Delay-based estimatorTsgcBWE_EstimatorGroups packets in 5 ms send bursts, runs a trendline filter over inter-group delay, and classifies the link as normal, overuse or underuse.
Rate controlAIMD controllerOveruse decreases to 85% of the acknowledged rate, underuse holds, normal increases (multiplicative while far from the last known ceiling, additive close to it).
Loss ceilingLoss-rate trackingAbove 10% loss the ceiling drops; under 2% it recovers 8% per second up to MaxBitrate.
Transport-wide feedbackTWCC (RTCP)BuildRTCP_TWCC / ParseRTCP_TWCC transport-wide congestion control feedback, with REMB as a fallback ceiling for peers that only support it.
Turn it onRTCOptions.Media.CongestionControlOnly takes effect when the remote description negotiates the matching header extension / feedback too.
Loss recoveryRTCOptions.Media.RTXRFC 4588 retransmission of the video stream on RTCP NACK.
Forward error correctionRTCOptions.Media.FECRED / ULPFEC protection on the outgoing video stream.
PacingRTCOptions.Media.PacingPaces outgoing video packets at the estimated bitrate instead of bursting them.
Keyframe recoveryRTCP PLIRequestKeyFrame on the receiving track asks the sender for a fresh keyframe after loss.
Best value: All-AccessEvery eSeGeCe product, Premium Support included, from €1,059/year.
See All-Access pricing

Build with sgcWebRTC

Download the free trial and open a real peer connection from Delphi or C++ Builder.