annotate doc/RTP-analysis @ 183:452c1d5a6268

libgsmefr BFI w/o data: emit zero output after decoder reset In real-life usage, each EFR decoder session will most likely begin with lots of BFI frames before the first real frame arrives. However, because the spec-defined home state of the decoder is speech rather than CN, our regular logic for BFI w/o data would have to feed pseudorandom noise to the decoder (in the "fixed codebook excitation pulses" part), which is silly to do at the beginning of the decoder session right out of reset. Therefore, let's check reset_flag_old, and if we are still in the reset state, simply emit zero output.
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 03 Jan 2023 00:12:18 +0000
parents 9fb22fa4d373
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
173
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
1 The present package includes a number of utilities for analyzing RTP streams
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
2 that have been captured with tcpdump or equivalent tools in pcap format. In
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
3 order to use any of these utilities, you need to have a pcap file (obviously),
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
4 and you need to identify the RTP stream to be analyzed or extracted by either
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
5 source or destination IP:port. All tools begin by applying a filter,
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
6 considering only those packets that are UDP in IPv4 (no IPv6 support currently),
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
7 and only those that match the specified source or destination IP:port. Every
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
8 matched packet is checked for a valid RTP header, and then the actual RTP stream
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
9 analysis or extraction takes place, depending on the specific tool:
136
8eb0e7a39409 doc: document command line utilities
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
173
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
11 rtp-cont-check This program checks the selected RTP stream for continuity. It
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
12 verifies that every matched packet has the same SSRC, that the
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
13 sequence number always increments by 1 from each individual
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
14 packet to the next, and that the RTP header timestamp always
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
15 increments by 160 units. (The assumption is that the
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
16 application at hand is in the traditional telephony domain,
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
17 with a sampling rate of 8000 samples/s and 20 ms packetization
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
18 for RTP.) This tool also looks at the capture time deltas
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
19 between successive packets and reports the observed minimum and
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
20 maximum; by seeing min and max delta-T, a developer can easily
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
21 notice timing aberrations that aren't caught by RTP header
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
22 sequence number and timestamp checks.
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
23
176
9fb22fa4d373 doc/RTP-analysis: document rtp-g711-extr
Mychaela Falconia <falcon@freecalypso.org>
parents: 173
diff changeset
24 rtp-g711-extr This program focuses on a single selected RTP stream like the
9fb22fa4d373 doc/RTP-analysis: document rtp-g711-extr
Mychaela Falconia <falcon@freecalypso.org>
parents: 173
diff changeset
25 others, enforces its continuity just like rtp-cont-check, and
9fb22fa4d373 doc/RTP-analysis: document rtp-g711-extr
Mychaela Falconia <falcon@freecalypso.org>
parents: 173
diff changeset
26 then further enforces that every RTP packet be a 160-byte
9fb22fa4d373 doc/RTP-analysis: document rtp-g711-extr
Mychaela Falconia <falcon@freecalypso.org>
parents: 173
diff changeset
27 payload, presumed to be either PCMU or PCMA. (The payload type
9fb22fa4d373 doc/RTP-analysis: document rtp-g711-extr
Mychaela Falconia <falcon@freecalypso.org>
parents: 173
diff changeset
28 number is NOT considered, only the payload length.) The
9fb22fa4d373 doc/RTP-analysis: document rtp-g711-extr
Mychaela Falconia <falcon@freecalypso.org>
parents: 173
diff changeset
29 selected G.711 RTP stream is then extracted and written into a
9fb22fa4d373 doc/RTP-analysis: document rtp-g711-extr
Mychaela Falconia <falcon@freecalypso.org>
parents: 173
diff changeset
30 raw binary file.
9fb22fa4d373 doc/RTP-analysis: document rtp-g711-extr
Mychaela Falconia <falcon@freecalypso.org>
parents: 173
diff changeset
31
173
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
32 rtp-gsmfr-extr This program focuses on a single selected RTP stream like the
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
33 others, enforces its continuity just like rtp-cont-check, but
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
34 then further enforces that every RTP packet be one of these 3
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
35 possibilities: a GSM FR1 codec frame, a GSM EFR codec frame or
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
36 a Themyscira BFI marker as defined in the RTP-BFI-extension
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
37 document. (The payload type number is NOT considered, only the
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
38 payload length and the characteristic signature of each of the
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
39 3 allowed possibilities.) The selected RTP stream is then
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
40 extracted and written into a gsmx file (see Binary-file-format),
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
41 which can then be analyzed with gsmrec-dump or decoded to
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
42 playable WAV with gsmfr-decode or gsmefr-decode.
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
43
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
44 rtp-jitter-view This program analyzes a single selected RTP stream just like
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
45 rtp-cont-check, but instead of reporting minimum and maximum
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
46 time deltas for the entire stream, it prints the individual
aaa0380f9958 doc/RTP-analysis: document new tools
Mychaela Falconia <falcon@freecalypso.org>
parents: 136
diff changeset
47 capture time delta between every successive pair of packets.