FreeCalypso > hg > themwi-rtp-lib
annotate include/twjit.h @ 11:4f82b9c07ddb
twjit: update to stats
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 06 Jul 2024 01:57:52 +0000 |
parents | 117fa99ff871 |
children | 323957bebd53 |
rev | line source |
---|---|
3
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * Themyscira Wireless jitter buffer implementation: definition of |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 * structures and API functions. |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #pragma once |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 #include <stdint.h> |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 #include <stdbool.h> |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 #include <osmocom/core/linuxlist.h> |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 #include <osmocom/core/timer.h> |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 /* |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 * twjit configuration tunings, usually set via vty. |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 struct twrtp_jibuf_config { |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 /* buffer depth: starting minimum and high watermark */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 uint16_t bd_start; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 uint16_t bd_hiwat; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 /* interval for thinning of too-deep standing queue */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 uint16_t thinning_int; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 /* guard against time traveler RTP packets */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 uint16_t max_future_sec; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 /* min and max time delta in starting state, 0 means not set */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 uint16_t start_min_delta; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 uint16_t start_max_delta; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 }; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 /* |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 * Stats collected during the lifetime of a twjit instance. |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 struct twrtp_jibuf_stats { |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 /* normal operation */ |
11
4f82b9c07ddb
twjit: update to stats
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
35 uint32_t rx_packets; |
3
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 uint32_t delivered_pkt; |
11
4f82b9c07ddb
twjit: update to stats
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
37 uint32_t handovers_in; |
4f82b9c07ddb
twjit: update to stats
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
38 uint32_t handovers_out; |
3
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 /* undesirable, but not totally unexpected */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 uint32_t too_old; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 uint32_t underruns; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 uint32_t output_gaps; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 uint32_t thinning_drops; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 /* unusual error events */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 uint32_t bad_packets; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 uint32_t duplicate_ts; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 /* independent analysis of Rx packet stream */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 uint32_t ssrc_changes; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 uint32_t seq_skips; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 uint32_t seq_backwards; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 uint32_t seq_repeats; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 uint32_t intentional_gaps; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 uint32_t ts_resets; |
11
4f82b9c07ddb
twjit: update to stats
Mychaela Falconia <falcon@freecalypso.org>
parents:
9
diff
changeset
|
54 uint32_t jitter_max; |
3
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 }; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 /* |
9
117fa99ff871
twjit: implement proper analytics
Mychaela Falconia <falcon@freecalypso.org>
parents:
8
diff
changeset
|
58 * Info collected from the incoming RTP data stream |
117fa99ff871
twjit: implement proper analytics
Mychaela Falconia <falcon@freecalypso.org>
parents:
8
diff
changeset
|
59 * for the purpose of generating RTCP reception report blocks. |
117fa99ff871
twjit: implement proper analytics
Mychaela Falconia <falcon@freecalypso.org>
parents:
8
diff
changeset
|
60 */ |
117fa99ff871
twjit: implement proper analytics
Mychaela Falconia <falcon@freecalypso.org>
parents:
8
diff
changeset
|
61 struct twrtp_jibuf_rr_info { |
117fa99ff871
twjit: implement proper analytics
Mychaela Falconia <falcon@freecalypso.org>
parents:
8
diff
changeset
|
62 uint32_t rx_packets; |
117fa99ff871
twjit: implement proper analytics
Mychaela Falconia <falcon@freecalypso.org>
parents:
8
diff
changeset
|
63 uint32_t base_seq; |
117fa99ff871
twjit: implement proper analytics
Mychaela Falconia <falcon@freecalypso.org>
parents:
8
diff
changeset
|
64 uint32_t max_seq_ext; |
117fa99ff871
twjit: implement proper analytics
Mychaela Falconia <falcon@freecalypso.org>
parents:
8
diff
changeset
|
65 uint32_t expected_pkt; |
117fa99ff871
twjit: implement proper analytics
Mychaela Falconia <falcon@freecalypso.org>
parents:
8
diff
changeset
|
66 uint32_t jitter_accum; |
117fa99ff871
twjit: implement proper analytics
Mychaela Falconia <falcon@freecalypso.org>
parents:
8
diff
changeset
|
67 }; |
117fa99ff871
twjit: implement proper analytics
Mychaela Falconia <falcon@freecalypso.org>
parents:
8
diff
changeset
|
68 |
117fa99ff871
twjit: implement proper analytics
Mychaela Falconia <falcon@freecalypso.org>
parents:
8
diff
changeset
|
69 /* |
3
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 * Each twjit instance has two sub-buffers; each subbuf is a queue of |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 * received RTP packets that have the same SSRC and whose timestamps |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 * increment in the expected cadence, with each ts delta being an |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 * integral multiple of the samples-per-quantum constant. |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 struct twrtp_jibuf_sub { |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 uint32_t ssrc; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 uint32_t head_ts; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 struct llist_head queue; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 uint32_t depth; |
9
117fa99ff871
twjit: implement proper analytics
Mychaela Falconia <falcon@freecalypso.org>
parents:
8
diff
changeset
|
80 uint32_t delta_ms; /* used only in starting state */ |
3
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 /* thinning mechanism */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 uint16_t drop_int_count; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 /* running config for this subbuf */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 struct twrtp_jibuf_config conf; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 }; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 /* |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 * Each twjit instance is in one of 4 fundamental states at any moment, |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 * as enumerated here. |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 enum twrtp_jibuf_state { |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 TWJIT_STATE_EMPTY, |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 TWJIT_STATE_HUNT, |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 TWJIT_STATE_FLOWING, |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 TWJIT_STATE_HANDOVER, |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 }; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 /* Main structure for one instance of twjit */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 struct twrtp_jibuf_inst { |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 /* pointer to config structure given to twrtp_jibuf_create(), |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 * memory must remain valid, but content can change at any time. */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 struct twrtp_jibuf_config *ext_config; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 /* count of RTP timestamp units per quantum */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 uint32_t ts_quantum; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 /* quanta per second, used to scale max_future_sec */ |
8
95f6c8ce33b0
twjit: prep for rework of time delta handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
6
diff
changeset
|
106 uint16_t quanta_per_sec; |
95f6c8ce33b0
twjit: prep for rework of time delta handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
6
diff
changeset
|
107 /* scaling factors for time delta conversions */ |
95f6c8ce33b0
twjit: prep for rework of time delta handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
6
diff
changeset
|
108 uint16_t ts_units_per_ms; |
95f6c8ce33b0
twjit: prep for rework of time delta handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
6
diff
changeset
|
109 uint32_t ts_units_per_sec; |
95f6c8ce33b0
twjit: prep for rework of time delta handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
6
diff
changeset
|
110 uint32_t ns_to_ts_units; |
3
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 /* operational state */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 enum twrtp_jibuf_state state; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 struct twrtp_jibuf_sub sb[2]; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 uint8_t read_sb; /* 0 or 1 */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 uint8_t write_sb; /* ditto */ |
9
117fa99ff871
twjit: implement proper analytics
Mychaela Falconia <falcon@freecalypso.org>
parents:
8
diff
changeset
|
116 /* info about the most recent Rx packet */ |
3
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 uint32_t last_ssrc; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 uint32_t last_ts; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 uint16_t last_seq; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 bool got_first_packet; |
9
117fa99ff871
twjit: implement proper analytics
Mychaela Falconia <falcon@freecalypso.org>
parents:
8
diff
changeset
|
121 struct timespec last_arrival; |
117fa99ff871
twjit: implement proper analytics
Mychaela Falconia <falcon@freecalypso.org>
parents:
8
diff
changeset
|
122 uint32_t last_arrival_delta; |
117fa99ff871
twjit: implement proper analytics
Mychaela Falconia <falcon@freecalypso.org>
parents:
8
diff
changeset
|
123 /* analytics for RTCP RR */ |
117fa99ff871
twjit: implement proper analytics
Mychaela Falconia <falcon@freecalypso.org>
parents:
8
diff
changeset
|
124 struct twrtp_jibuf_rr_info rr_info; |
3
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 /* stats over lifetime of this instance */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 struct twrtp_jibuf_stats stats; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 }; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 /* twjit module API functions */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 struct twrtp_jibuf_inst *twrtp_jibuf_create(void *ctx, uint16_t quantum_ms, |
6
668b84c52094
twrtp_jibuf_create(): take quantum_ms & clock_khz arguments
Mychaela Falconia <falcon@freecalypso.org>
parents:
3
diff
changeset
|
132 uint16_t clock_khz, |
3
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 struct twrtp_jibuf_config *config); |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 void twrtp_jibuf_destroy(struct twrtp_jibuf_inst *twjit); |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 struct msgb; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 /* RTP input, takes ownership of msgb */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 void twrtp_jibuf_input(struct twrtp_jibuf_inst *twjit, struct msgb *msg); |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 /* output function, to be called by TDM/GSM/etc fixed-timing side */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 struct msgb *twrtp_jibuf_output(struct twrtp_jibuf_inst *twjit); |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 /* vty configuration functions */ |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 void twrtp_jibuf_init_defaults(struct twrtp_jibuf_config *config); |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 void twrtp_jibuf_vty_init(int twjit_node); |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 struct vty; |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 int twrtp_jibuf_config_write(struct vty *vty, |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 const struct twrtp_jibuf_config *conf, |
d10ea5dc61b3
twjit: initial import from previous work repository
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 const char *name, const char *prefix); |