Browse Source

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
commit
b3d50ccb7f
3 changed files with 12 additions and 10 deletions
  1. +3
    -2
      daemon/call.c
  2. +0
    -8
      include/statistics.h
  3. +9
    -0
      kernel-module/common_stats.h

+ 3
- 2
daemon/call.c View File

@ -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);
}


+ 0
- 8
include/statistics.h View File

@ -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;


+ 9
- 0
kernel-module/common_stats.h View File

@ -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