You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor for RTPSession, MediaStream (including AudioStream & VideoStream) & MediaStreamTrack classes:
The recommendations below are from a ChatGPT review of the relevant classes.
Extract SDP Logic into a separate class:
A new SdpNegotiator (or similarly named) that has:
The old RTPSession (or RTCPeerCOnnection) calls into this class for all offer/answer logic.
Extract “Transport” (sockets + encryption) from RTPSession:
A new RtpTransport that:
Owns the RTPChannel, handles raw Send/Receive,
Deals with SRTP.
RTPSession no longer deals with raw sockets or SRTP. Instead, it calls transport.SendRtp(...), and the transport handles the details.
Replace “send/receive code in MediaStream” with an RtpSender/RtpReceiver:
For each “outgoing” track, create a RtpSender. It references the track’s SSRC, payload type, seqNum counters, etc.
For each “incoming” track, create a RtpReceiver. It references the track’s SSRC, handles reordering/jitter.
This means MediaStream might just hold references to its associated senders/receivers, or you can rename MediaStream to RTCRtpTransceiver style.
Once done, MediaStream might become more about grouping local/remote tracks or might transform into a more direct "WebRTC style" object that references track(s).
Minimize Cross-Dependencies:
If RTPSession is still big, see if some logic is purely about DTMF events or purely about stats. Move them into smaller classes or modules.
If you have logic that only deals with one media type (like a reorder buffer specialized for video), consider scoping it to your RtpReceiverVideo or a specialized “video pipeline” class.
Align with naming:
Rename fields/methods to match WebRTC vocabulary (e.g., SetRemoteDescription, RtpSender, Track.kind, etc.).
Remove or hide any purely internal references to “RTP session” or “RTP channel” from your public API unless you want advanced users to see them.
The text was updated successfully, but these errors were encountered:
This issue is to capture issues relating o missing features for the main protocols supported or other generally useful feaures:
WebRTC:
SIP:
RTP/SRTP:
Video Ecnoding:
STUN:
Refactor for RTPSession, MediaStream (including AudioStream & VideoStream) & MediaStreamTrack classes:
The recommendations below are from a ChatGPT review of the relevant classes.
Extract SDP Logic into a separate class:
Extract “Transport” (sockets + encryption) from RTPSession:
Replace “send/receive code in MediaStream” with an RtpSender/RtpReceiver:
Minimize Cross-Dependencies:
Align with naming:
The text was updated successfully, but these errors were encountered: