mgcp: Move Annex A counting out of patch/count method
mgcp_patch_and_count has grown due supporting linearizing timestamps,
ssrc and other things for equipment like the ip.access nanoBTS. Fight
back and move the Annex A code into a dedicated method.
The result is updated as we now count after all the patching and for
the Annex A code no change in SSRC can be detected.
diff --git a/openbsc/include/openbsc/mgcp_internal.h b/openbsc/include/openbsc/mgcp_internal.h
index 3bccb39..0ec18cd 100644
--- a/openbsc/include/openbsc/mgcp_internal.h
+++ b/openbsc/include/openbsc/mgcp_internal.h
@@ -54,17 +54,22 @@
uint32_t orig_ssrc;
- uint16_t base_seq;
int seq_offset;
- int cycles;
int32_t timestamp_offset;
uint32_t packet_duration;
- uint32_t jitter;
- int32_t transit;
struct mgcp_rtp_stream_state in_stream;
struct mgcp_rtp_stream_state out_stream;
+
+ /* jitter and packet loss calculation */
+ int stats_initialized;
+ uint16_t stats_base_seq;
+ uint16_t stats_max_seq;
+ uint32_t stats_ssrc;
+ uint32_t stats_jitter;
+ int32_t stats_transit;
+ int stats_cycles;
};
struct mgcp_rtp_codec {