MT#63317 print exts for forwarded packets

Change-Id: I8c133696219db536ee5c9fedd62a79bf6d658ce9
pull/2008/head
Richard Fuchs 5 months ago
parent e046eecb96
commit 9ef7c87e6f

@ -2152,12 +2152,22 @@ static void codec_add_raw_packet_dup(struct media_packet *mp, unsigned int clock
// don't just duplicate the string. need to ensure enough room
// if encryption is enabled on this stream
// or for RTP header extensions
size_t ext_len = mp->sink.rtpext->length(mp);
p->s.s = bufferpool_alloc(media_bufferpool, mp->raw.len + ext_len + RTP_BUFFER_TAIL_ROOM);
memcpy(p->s.s, mp->raw.s, mp->raw.len);
p->s.len = mp->raw.len;
if (mp->rtp) {
size_t ext_len = mp->sink.rtpext->length(mp);
size_t tot_len = sizeof(*mp->rtp) + ext_len + mp->payload.len;
p->s.s = bufferpool_alloc(media_bufferpool, tot_len + RTP_BUFFER_TAIL_ROOM);
p->s.len = tot_len;
p->rtp = (struct rtp_header *) p->s.s;
*p->rtp = *mp->rtp;
mp->sink.rtpext->print(p->rtp, p->s.s + sizeof(*p->rtp), mp);
memcpy(p->s.s + sizeof(*p->rtp) + ext_len, mp->payload.s, mp->payload.len);
}
else {
p->s.s = bufferpool_alloc(media_bufferpool, mp->raw.len + RTP_BUFFER_TAIL_ROOM);
memcpy(p->s.s, mp->raw.s, mp->raw.len);
p->s.len = mp->raw.len;
}
p->free_func = bufferpool_unref;
p->rtp = (struct rtp_header *) p->s.s;
codec_add_raw_packet_common(mp, clockrate, p);
}

@ -436,9 +436,9 @@ a=rtcp:PORT
SDP
snd($sock_a, $port_b, rtp( 8, 1000, 3000+160*0, 0x1234, "\x10" . ("\x00" x 158) . "\x50", [[1, "foo"], [2, "woot"], [3, "meh"], [4, "yugh"]]));
rcv($sock_b, $port_a, rtpm(8, 1000, 3000+160*0, 0x1234, "\x10" . ("\x00" x 158) . "\x50", [[1, "foo"], [2, "woot"], [3, "meh"], [4, "yugh"]]));
rcv($sock_b, $port_a, rtpm(8, 1000, 3000+160*0, 0x1234, "\x10" . ("\x00" x 158) . "\x50", [[2, "woot"]]));
snd($sock_b, $port_a, rtp( 8, 8000, 7000+160*0, 0x6543, "\x10" . ("\x00" x 158) . "\x50", [[1, "foo"], [2, "woot"], [3, "meh"], [4, "yugh"]]));
rcv($sock_a, $port_b, rtpm(8, 8000, 7000+160*0, 0x6543, "\x10" . ("\x00" x 158) . "\x50", [[1, "foo"], [2, "woot"], [3, "meh"], [4, "yugh"]]));
rcv($sock_a, $port_b, rtpm(8, 8000, 7000+160*0, 0x6543, "\x10" . ("\x00" x 158) . "\x50", [[1, "foo"], [2, "woot"]])); # XXX should be just 2 ?
@ -505,9 +505,9 @@ a=rtcp:PORT
SDP
snd($sock_a, $port_b, rtp( 8, 1000, 3000+160*0, 0x1234, "\x39" . ("\x29" x 158) . "\x74", [[1, "foo"], [2, "blah"], [4, "argh"], [3, "yikes"]]));
rcv($sock_b, $port_a, rtpm(8, 1000, 3000+160*0, 0x1234, "\x39" . ("\x29" x 158) . "\x74", [[1, "foo"], [2, "blah"], [4, "argh"], [3, "yikes"]]));
rcv($sock_b, $port_a, rtpm(8, 1000, 3000+160*0, 0x1234, "\x39" . ("\x29" x 158) . "\x74", [[1, "foo"], [2, "blah"], [3, "yikes"]]));
snd($sock_b, $port_a, rtp( 8, 8000, 7000+160*0, 0x6543, "\x39" . ("\x29" x 158) . "\x74", [[1, "foo"], [2, "blah"], [4, "argh"], [3, "yikes"]]));
rcv($sock_a, $port_b, rtpm(8, 8000, 7000+160*0, 0x6543, "\x39" . ("\x29" x 158) . "\x74", [[1, "foo"], [2, "blah"], [4, "argh"], [3, "yikes"]]));
rcv($sock_a, $port_b, rtpm(8, 8000, 7000+160*0, 0x6543, "\x39" . ("\x29" x 158) . "\x74", [[1, "foo"], [2, "blah"]]));

Loading…
Cancel
Save