From d84dcbd2ecd28bd57e1f17bc00dc6390cbbd0cda Mon Sep 17 00:00:00 2001 From: "henrik.lundin" Date: Tue, 18 Aug 2015 04:46:46 -0700 Subject: [PATCH] rtpAnalyze matlab tool: filter out RTCP packets This change relates to the matlab tool rtpAnalyze. With this change, RTP packets with payload types 72 through 76 are removed. In IETF RFC3551, section "Payload Type Definitions", this range is marked as reserved so that RTCP and RTP packets can be reliably distinguished. BUG=webrtc:2692 TBR=tina.legrand@webrtc.org NOTRY=true Review URL: https://codereview.webrtc.org/1284423006 Cr-Commit-Position: refs/heads/master@{#9724} --- tools/matlab/rtpAnalyze.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/matlab/rtpAnalyze.m b/tools/matlab/rtpAnalyze.m index eb0cb8f586..c51af9cca5 100644 --- a/tools/matlab/rtpAnalyze.m +++ b/tools/matlab/rtpAnalyze.m @@ -17,6 +17,18 @@ function rtpAnalyze( input_file ) [SeqNo,TimeStamp,ArrTime,Size,PT,M,SSRC] = importfile(input_file); +%% Filter out RTCP packets. +% These appear as RTP packets having payload types 72 through 76. +ix = not(ismember(PT, 72:76)); +fprintf('Removing %i RTCP packets\n', length(SeqNo) - sum(ix)); +SeqNo = SeqNo(ix); +TimeStamp = TimeStamp(ix); +ArrTime = ArrTime(ix); +Size = Size(ix); +PT = PT(ix); +M = M(ix); +SSRC = SSRC(ix); + %% Find streams. [uSSRC, ~, uix] = unique(SSRC);