From 34759b7c4890ff21d1c1f889afefee74cf06eda0 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 18 Sep 2018 10:28:22 -0400 Subject: [PATCH] add ability to specify payload type in pcap replay script Change-Id: I819dd012ee45cc50c57d9129d1f8c99963c0483f --- utils/kernel-intercept-pcap-replay.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/kernel-intercept-pcap-replay.pl b/utils/kernel-intercept-pcap-replay.pl index 067d7fd74..13e8161b1 100755 --- a/utils/kernel-intercept-pcap-replay.pl +++ b/utils/kernel-intercept-pcap-replay.pl @@ -1,5 +1,8 @@ #!/usr/bin/perl +# Usage: $0 [payload type num] [payload type str] +# Ex: $0 foo.pcap +# Ex: $0 foo.pcap 97 opus/48000 use strict; use warnings; use Net::Pcap; @@ -52,6 +55,9 @@ for my $key (@tag_keys) { put_meta("STREAM $stream->{stream_id} details", "TAG $tag_id MEDIA $stream->{media_id} COMPONENT $stream->{component} ". "FLAGS 0"); + if ($ARGV[2]) { + put_meta("MEDIA $stream->{media_id} PAYLOAD TYPE $ARGV[1]", $ARGV[2]); + } my @ret = msg_ret(7, '', 'I I I I', 'I I I a256', $cid, 0, 0, $sname); my $sid = $ret[3];