MT#55283 disable kernel RTCP FW if filtering

Change-Id: I9488b444d413d227153b2e73a3efe2facce98d26
(cherry picked from commit e1cfefc07e)
pull/2058/head
Richard Fuchs 7 months ago
parent 8f6af92d27
commit 6c6dc64ff4

@ -1389,7 +1389,6 @@ bool get_consecutive_ports(socket_intf_list_q *out, unsigned int num_ports, unsi
for (l = log->list.head; l; l = l->next) {
loc = l->data;
inet_ntop(loc->spec->local_address.addr.family->af, &loc->spec->local_address.addr.u, ip, sizeof(ip));
ilog(LOG_DEBUG, "XXXXXXXXXX IP: %s", ip);
}
ilog(LOG_DEBUG, "");
*/
@ -1653,7 +1652,7 @@ static const char *kernelize_target(kernelize_state *s, struct packet_stream *st
reti->rtp = 1;
reti->ssrc_req = 1;
if (!MEDIA_ISSET(media, TRANSCODING)) {
if (rtcp_kernel_fw(media)) {
reti->rtcp_fw = 1;
if (media->protocol->avpf)
reti->rtcp_fb_fw = 1;

@ -271,6 +271,8 @@ struct rtcp_handler {
void (*finish)(struct rtcp_process_ctx *, call_t *, const endpoint_t *, const endpoint_t *,
int64_t);
void (*destroy)(struct rtcp_process_ctx *);
bool no_kernel_fw;
};
// collection of all handler types
struct rtcp_handlers {
@ -365,9 +367,11 @@ static struct rtcp_handler transcode_handlers = {
.common = transcode_common,
.rr = transcode_rr,
.sr = transcode_sr,
.no_kernel_fw = true,
};
static struct rtcp_handler sink_handlers = {
.common = sink_common,
.no_kernel_fw = true,
};
static struct rtcp_handler transcode_handlers_wrap = {
.common = transcode_common_wrap,
@ -1636,3 +1640,10 @@ out:
static void sink_common(struct rtcp_process_ctx *ctx, struct rtcp_packet *common) {
ctx->discard = 1;
}
bool rtcp_kernel_fw(struct call_media *media) {
if (!media->rtcp_handler)
return true;
return !media->rtcp_handler->no_kernel_fw;
}

@ -24,6 +24,7 @@ int rtcp_payload(struct rtcp_packet **out, str *p, const str *s);
int rtcp_parse(GQueue *q, struct media_packet *);
void rtcp_list_free(GQueue *q);
bool rtcp_kernel_fw(struct call_media *);
rtcp_filter_func rtcp_avpf2avp_filter;

Loading…
Cancel
Save