From d1e2720b399870d3513a879a50a21d3da11975fd Mon Sep 17 00:00:00 2001 From: Ricardas Stoma Date: Wed, 8 Sep 2021 16:10:54 +0000 Subject: [PATCH] TT#14008 show codec name in media stats closes #1347 Change-Id: Iba796f585ae93a17347dea96f91472a60bf32b60 --- daemon/call_interfaces.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/daemon/call_interfaces.c b/daemon/call_interfaces.c index 9df598f8d..a26fd083e 100644 --- a/daemon/call_interfaces.c +++ b/daemon/call_interfaces.c @@ -1691,16 +1691,21 @@ static void ng_stats_media(bencode_item_t *list, const struct call_media *m, bencode_item_t *dict, *streams = NULL, *flags; GList *l; struct packet_stream *ps; + const struct rtp_payload_type *rtp_pt = NULL; if (!list) goto stats; + rtp_pt = __rtp_stats_codec((struct call_media *)m); + dict = bencode_list_add_dictionary(list); bencode_dictionary_add_integer(dict, "index", m->index); bencode_dictionary_add_str(dict, "type", &m->type); if (m->protocol) bencode_dictionary_add_string(dict, "protocol", m->protocol->name); + if (rtp_pt) + bencode_dictionary_add_str_dup(dict, "codec", &rtp_pt->encoding_with_params); streams = bencode_dictionary_add_list(dict, "streams");