MT#56128 add SDP manipulations to ng-client

Change-Id: I876aba63cc6875c9c2677f4a2bb2bde729a02f73
pull/1627/head
Richard Fuchs 2 years ago
parent 2a178b49b8
commit 088c4d9201

@ -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