Changes between Version 6 and Version 7 of JBuf_Spec
- Timestamp:
- Feb 10, 2023 10:46:59 AM (15 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
JBuf_Spec
v6 v7 41 41 42 42 For example, when the optimum/target latency is 3 frames (or 60ms) and current latency is 10 frames, the jitter buffer will schedule to discard a frame with calculation as follow: 43 - {{{Overflow}}} or difference between actual & target latencies = 10 - 3 frames = 7 frames.43 - {{{Overflow}}} or difference between actual & target latencies is {{{10 - 3 frames = 7 frames}}}. 44 44 - Use the following formula for calculating the target time for adjusting the latency (i.e: by discarding the overflow of 7 frames above): 45 45 {{{ … … 57 57 */ 58 58 }}} 59 At this point, the target time is 2000 + (8000 * 3/99) = 2242ms or discard rate is {{{target-time / overflow}}} = 2242 / 7 = 320 ms per frame. So the jitter buffer will discard a frame with timestamp 320ms (or frame to be played 320ms later). 60 61 Few additional notes: 59 At this point, the target time is {{{2000 + (8000 * 3/99) = 2242ms}}} or discard rate is {{{target-time / overflow = 2242 / 7 = 320 ms per frame}}}. So the jitter buffer will discard a frame with timestamp 320ms (or frame to be played 320ms later). 60 There are also few notes: 62 61 - If the frame with that timestamp is not available in the jitter buffer yet, the calculation will be done again later. If the burst level is changed when the calculation is redone, the frame to discard may be changed too (no longer frame with timestamp 320ms). 63 62 - If the scheduled frame timestamp is lower than {{{PJMEDIA_JBUF_DISC_MIN_GAP}}} (i.e: 200ms), the jitter buffer will use {{{PJMEDIA_JBUF_DISC_MIN_GAP}}} instead, so the discard rate will not be faster than {{{PJMEDIA_JBUF_DISC_MIN_GAP}}}.