MT#55283 move rtp_stats to bufferpool

... and definition into kernel header. Also add the clock rate as an
informational value.

Change-Id: I8c1a32c71050d8966617890d8699b4a404923a10
pull/1826/head
Richard Fuchs 2 years ago
parent 263234b1c7
commit b3d50ccb7f

@ -888,7 +888,7 @@ static int __wildcard_endpoint_map(struct call_media *media, unsigned int num_po
}
static void __rtp_stats_free(void *p) {
g_slice_free1(sizeof(struct rtp_stats), p);
bufferpool_unref(p);
}
struct packet_stream *__packet_stream_new(call_t *call) {
@ -1155,8 +1155,9 @@ void __rtp_stats_update(GHashTable *dst, struct codec_store *cs) {
if (rs)
continue;
rs = g_slice_alloc0(sizeof(*rs));
rs = bufferpool_alloc0(shm_bufferpool, sizeof(*rs));
rs->payload_type = pt->payload_type;
rs->clock_rate = pt->clock_rate;
g_hash_table_insert(dst, GINT_TO_POINTER(rs->payload_type), rs);
}

@ -62,14 +62,6 @@ struct global_rate_min_max_avg {
};
struct rtp_stats {
unsigned int payload_type;
atomic64 packets;
atomic64 bytes;
atomic64 kernel_packets;
atomic64 kernel_bytes;
};
struct codec_stats {
char *chain;
char *chain_brief;

@ -46,4 +46,13 @@ struct stream_stats {
atomic64 last_packet;
};
struct rtp_stats {
unsigned int payload_type;
uint32_t clock_rate;
atomic64 packets;
atomic64 bytes;
atomic64 kernel_packets;
atomic64 kernel_bytes;
};
#endif

Loading…
Cancel
Save