Browse Source

MT#56128 add SDP manipulations to ng-client

Change-Id: I876aba63cc6875c9c2677f4a2bb2bde729a02f73
pull/1627/head
Richard Fuchs 3 years ago
parent
commit
088c4d9201
1 changed files with 22 additions and 0 deletions
  1. +22
    -0
      utils/rtpengine-ng-client

+ 22
- 0
utils/rtpengine-ng-client View File

@ -131,6 +131,16 @@ my @replace_opts = qw(
force-increment-sdp-version
);
my @sdp_attr_sections = qw(
global
audio
video
);
my @sdp_attr_commands = qw(
add
remove
);
my %getopt = (
'json' => \$options{'json'},
'proxy-address=s' => \$options{'proxy-address'},
@ -161,6 +171,11 @@ for my $flag (@codec_opts) {
for my $flag (@replace_opts) {
$getopt{"replace-$flag"} = \$options{"replace-$flag"};
}
for my $sect (@sdp_attr_sections) {
for my $cmd (@sdp_attr_commands) {
$getopt{"sdp-attr-$sect-$cmd=s@"} = \$options{"sdp-attr-$sect-$cmd"};
}
}
GetOptions(%getopt) or die;
@ -206,6 +221,13 @@ for my $x (@codec_opts) {
}
}
}
for my $sect (@sdp_attr_sections) {
for my $cmd (@sdp_attr_commands) {
if ($options{"sdp-attr-$sect-$cmd"} && @{$options{"sdp-attr-$sect-$cmd"}}) {
$packet{'sdp-attr'}{$sect}{$cmd} = $options{"sdp-attr-$sect-$cmd"};
}
}
}
sub slurp_file {
local $/ = undef;


Loading…
Cancel
Save