Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancements #1226

Open
sipsorcery opened this issue Nov 10, 2024 · 0 comments
Open

Enhancements #1226

sipsorcery opened this issue Nov 10, 2024 · 0 comments

Comments

@sipsorcery
Copy link
Member

sipsorcery commented Nov 10, 2024

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:

  • Update to support latest RFC8489.

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:
      • GenerateOffer(), GenerateAnswer(), ApplyRemoteDescription()
      • Maintains a list of chosen audio/video codecs.
      • 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant