Browse Source

MT#55283 simplify ntp_ts_lsw, ntp_ts_msw

Change-Id: I33d72c8ef2b6832378c92902fc9bc253d325ace3
pull/1938/head
Richard Fuchs 8 months ago
parent
commit
f796537ef3
2 changed files with 7 additions and 4 deletions
  1. +6
    -3
      daemon/ssrc.c
  2. +1
    -1
      include/ssrc.h

+ 6
- 3
daemon/ssrc.c View File

@ -317,7 +317,8 @@ static void *__do_time_report_item(struct call_media *m, size_t struct_size, siz
sti = g_malloc0(struct_size);
sti->received = tv;
sti->ntp_middle_bits = ntp_msw << 16 | ntp_lsw >> 16;
sti->ntp_ts = ntp_ts_to_double(ntp_msw, ntp_lsw);
sti->ntp_ts_lsw = ntp_lsw;
sti->ntp_ts_msw = ntp_msw;
e = get_ssrc(ssrc, &m->ssrc_hash);
if (G_UNLIKELY(!e)) {
@ -431,7 +432,8 @@ void ssrc_sender_report(struct call_media *m, const struct ssrc_sender_report *s
ilog(LOG_DEBUG, "SR from %s%x%s: RTP TS %u PC %u OC %u NTP TS %u/%u=%f",
FMT_M(sr->ssrc), sr->timestamp, sr->packet_count, sr->octet_count,
sr->ntp_msw, sr->ntp_lsw, seri->time_item.ntp_ts);
sr->ntp_msw, sr->ntp_lsw,
ntp_ts_to_double(seri->time_item.ntp_ts_msw, seri->time_item.ntp_ts_lsw));
mutex_unlock(&e->lock);
obj_put(e);
@ -563,7 +565,8 @@ void ssrc_receiver_rr_time(struct call_media *m, const struct ssrc_xr_rr_time *r
ilog(LOG_DEBUG, "XR RR TIME from %s%x%s: NTP TS %u/%u=%f",
FMT_M(rr->ssrc),
rr->ntp_msw, rr->ntp_lsw, srti->time_item.ntp_ts);
rr->ntp_msw, rr->ntp_lsw,
ntp_ts_to_double(srti->time_item.ntp_ts_msw, srti->time_item.ntp_ts_lsw));
mutex_unlock(&e->lock);
obj_put(e);


+ 1
- 1
include/ssrc.h View File

@ -114,7 +114,7 @@ enum ssrc_dir { // these values must not be used externally
struct ssrc_time_item {
int64_t received;
uint32_t ntp_middle_bits; // to match up with lsr/dlrr
double ntp_ts; // XXX convert to int?
int32_t ntp_ts_lsw, ntp_ts_msw;
};
struct ssrc_sender_report {
uint32_t ssrc;


Loading…
Cancel
Save