osmo-bts[master]: Fix RTP timestamps in case of DTX

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Jun 5 09:34:10 UTC 2016


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/196/2/src/common/l1sap.c
File src/common/l1sap.c:

PS2, Line 75: 8 samples
I think this could deserve some more verbose description.  Particulraly where the '8 samples' comes from.  It's 8 samples per milli-second (8000 Hz) as per spec. Also, it is 26 TDMA frames, not bursts

What about a set of #defines (if we don't already have them or some of them) which should probably be part of libosmo-abis/trau:

#define GSM_VOICE_SAMPLE_RATE_HZ 8000
#define GSM_VOICE_SAMPLES_PER_MS (GSM_VOICE_SAMPLE_RATE_HZ/1000)
#define GSM_VOICE_MULTIFRAME 26
#define GSM_RTP_FRAME_DURATION_MS 20
#define GSM_SAMPLES_PER_RTP_FRAME (GSM_RTP_FRAME_DURATION_MS*GSM_VOICE_SAMPLES_PER_MS)
#define GSM_TDMA_FRAME_MS (120 / GSM_VOICE_MULTIFRAME)

uint32_t ms_passed = (fn - last_fn) * GSM_TDMA_FRAME_MS;
uin32_t samples_passed = ms_passed * GSM_VOICE_SAMPLES_PER_MS;

and then calculate the rounded value?  I think this is much easier to understand, as otherwise nobody will remember the details of the computation...


-- 
To view, visit https://gerrit.osmocom.org/196
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If1677ddcf754b29990ff7cd846e11c32e3d30b33
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list