Extended the API to calculate jitter

- ndpi_jitter_init()
- ndpi_jitter_free()
- ndpi_jitter_add_value()
This commit is contained in:
Luca Deri
2021-02-09 15:56:03 +01:00
parent b960809d3e
commit 1331e0aec9
4 changed files with 96 additions and 0 deletions
+6
View File
@@ -1404,6 +1404,12 @@ extern "C" {
/* ******************************* */
int ndpi_jitter_init(struct ndpi_jitter_struct *hw, u_int16_t num_periods);
void ndpi_jitter_free(struct ndpi_jitter_struct *hw);
float ndpi_jitter_add_value(struct ndpi_jitter_struct *s, const float value);
/* ******************************* */
const char* ndpi_data_ratio2str(float ratio);
void ndpi_data_print_window_values(struct ndpi_analyze_struct *s); /* debug */
+8
View File
@@ -1553,6 +1553,14 @@ struct ndpi_rsi_struct {
/* **************************************** */
struct ndpi_jitter_struct {
u_int8_t empty:1, jitter_ready:1, _notused:6;
u_int16_t num_values, next_index;
float *observations, last_value, jitter_total;
};
/* **************************************** */
typedef struct ndpi_ptree ndpi_ptree_t;
/* **************************************** */