Janus: "Absolute Capture Time" RTP extension added (#320)

for video.
This commit is contained in:
Sergey Radionov
2026-01-28 14:59:01 +07:00
committed by GitHub
parent 8adca998e9
commit 3b7592bb31
4 changed files with 14 additions and 0 deletions

View File

@@ -73,6 +73,7 @@ char *us_rtpv_make_sdp(us_rtpv_s *rtpv) {
"a=ssrc:%" PRIu32 " cname:ustreamer" RN
"a=extmap:1 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay" RN
"a=extmap:2 urn:3gpp:video-orientation" RN
"a=extmap:3/sendonly http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time" RN
"a=sendonly" RN,
pl, pl, pl, pl, pl, pl,
rtpv->rtp->ssrc
@@ -89,6 +90,8 @@ void us_rtpv_wrap(us_rtpv_s *rtpv, const us_frame_s *frame, bool zero_playout_de
assert(frame->format == V4L2_PIX_FMT_H264);
rtpv->rtp->zero_playout_delay = zero_playout_delay;
rtpv->rtp->grab_ntp_ts =
us_get_now_ntp() - (us_get_now_monotonic() - frame->grab_begin_ts) * NTP_TICKS_IN_SECOND;
const u32 pts = us_get_now_monotonic_u64() * 9 / 100; // PTS units are in 90 kHz
sz last_offset = -_PRE;