From fc7b070030cc33029fc16a71ecd6bbe140bd105c Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Fri, 9 Dec 2022 14:26:53 +0100 Subject: Added RTP stream type in flow metadata --- example/ndpiReader.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'example/ndpiReader.c') diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 326197ee3..b384e4b5a 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -1527,6 +1527,32 @@ static void printFlow(u_int32_t id, struct ndpi_flow_info *flow, u_int16_t threa } } break; + + case INFO_RTP: + if(flow->rtp.stream_type != rtp_unknown) { + const char *what; + + switch(flow->rtp.stream_type) { + case rtp_audio: + what = "audio"; + break; + + case rtp_video: + what = "video"; + break; + + case rtp_audio_video: + what = "audio/video"; + break; + + default: + what = NULL; + break; + } + + if(what) + fprintf(out, "[RTP Stream Type: %s]", what); + } } if(flow->ssh_tls.advertised_alpns) -- cgit v1.2.3