diff options
author | Luca Deri <deri@ntop.org> | 2025-02-20 22:59:23 +0100 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2025-02-20 22:59:23 +0100 |
commit | 30c3613f2fae705a284284794b5367ad7c7374ae (patch) | |
tree | 6c1dde2ffe84ed942608cfa44208316c3c89d946 /example/ndpiReader.c | |
parent | 9ee24d5bc110307b988554d83d1a88a6ad63490e (diff) |
Improved RTP dissection with EVS and other mobile voice codecs
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r-- | example/ndpiReader.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index e96b31a36..cf84390dd 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -1872,9 +1872,21 @@ static void printFlow(u_int32_t id, struct ndpi_flow_info *flow, u_int16_t threa if((flow->detected_protocol.proto.master_protocol == NDPI_PROTOCOL_RTP) || (flow->detected_protocol.proto.app_protocol == NDPI_PROTOCOL_RTP)) { - fprintf(out, "[Payload Type: %s (%u)]", - ndpi_rtp_payload_type2str(flow->rtp.payload_type), - flow->rtp.payload_type); + if (flow->rtp[0 /* cli -> srv */].payload_detected || flow->rtp[1].payload_detected) { + fprintf(out, "[Payload Type: "); + + if (flow->rtp[0].payload_detected) + fprintf(out, "%s (%u.%u)", + ndpi_rtp_payload_type2str(flow->rtp[0].payload_type, flow->rtp[0].evs_subtype), flow->rtp[0].payload_type, flow->rtp[0].evs_subtype); + + if(flow->rtp[1 /* srv -> cli */].payload_detected) { + if (flow->rtp[0].payload_detected) fprintf(out, " / "); + + fprintf(out, "%s (%u.%u)]", + ndpi_rtp_payload_type2str(flow->rtp[1].payload_type, flow->rtp[1].evs_subtype), flow->rtp[1].payload_type, flow->rtp[1].evs_subtype); + } else + fprintf(out, "]"); + } } fprintf(out, "[%s]", |