From 9090afbfe9a4f9a422409c3f9d410bc3c14fc741 Mon Sep 17 00:00:00 2001 From: Jiri Novak Date: Tue, 13 Dec 2016 13:28:30 +0100 Subject: Save RTP audio to file: RTP Stream Analysis dialog allows save audio for non G.711 codecs and mixed codecs - spaghetti code for save was split into separate functions - code saves G.711 only, all other codecs are saved as silence with correct duration - code is ready to include other codecs - code supports 8000 Hz sampling rate only, other rates are rejected with warning - bidirectional stream (forward and reverse) creates stereo .au file - output is based on timestamps in RTP streams - save operation is slower than before because it is set of seek() - one per each codec sample - code allows align of save audio: - as it is - each stream is saved from its beginning, no aling - to start of each other - later stream is prepended with silence - align saved audio to beginning of capture file - each stream is prepended with silence - save to raw works correctly now - only payload is saved - old code was inserting G.711 silence time to time to raw data Bug: 13242 Change-Id: I74d02a1cc1c75acf9ffe930d078c00a0555cbfb6 Reviewed-on: https://code.wireshark.org/review/19245 Petri-Dish: Anders Broman Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- ui/tap-rtp-analysis.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ui/tap-rtp-analysis.h') diff --git a/ui/tap-rtp-analysis.h b/ui/tap-rtp-analysis.h index af41ff1291..2c782a36f0 100644 --- a/ui/tap-rtp-analysis.h +++ b/ui/tap-rtp-analysis.h @@ -107,8 +107,15 @@ typedef struct _tap_rtp_stat_t { guint16 pt; int reg_pt; guint32 first_packet_num; + guint last_payload_len; } tap_rtp_stat_t; +typedef struct _tap_rtp_save_data_t { + guint32 timestamp; + unsigned int payload_type; + size_t payload_len; +} tap_rtp_save_data_t; + #define PT_UNDEFINED -1 /* status flags for the flags parameter in tap_rtp_stat_t */ -- cgit v1.2.3