versatica / mediasoup

Cutting Edge WebRTC Video Conferencing
https://mediasoup.org
ISC License
6.18k stars 1.12k forks source link

Add sender report trace event #1267

Closed GithubUser8080 closed 8 months ago

GithubUser8080 commented 9 months ago

This PR adds a trace event for incoming RTCP sender reports from producers, to provide timestamp information in the node API. Covers use cases of server-side stream synchronization (like recording).

Usage

producer.enableTraceEvent(['sr'])

emits

{
  type: 'sr',
  timestamp: 6348927,
  direction: 'in',
  info: {
    ssrc: 481847794,
    ntpSec: 3911629480,
    ntpFrac: 2788138149,
    rtpTs: 2712133695,
    packetCount: 928,
    octetCount: 75009
  }
}

Resolves issue https://github.com/versatica/mediasoup/issues/1248

GithubUser8080 commented 9 months ago

Not familiar with rust so I am relying on the videoroom example for manual testing, hope it is enough.

ibc commented 9 months ago

Just do grep looking for similar FBS types in worker/rust folder and will be easy.

ibc commented 9 months ago

Run cargo fmt to fix lint/clippy formating issues.

ibc commented 9 months ago

Changelog entry missing and this must be documented in the website (I'll do).

GithubUser8080 commented 8 months ago

Thank you