Browse Source

MT#55283 disable kernel RTCP FW if filtering

Change-Id: I9488b444d413d227153b2e73a3efe2facce98d26
rfuchs/dtls-ice
Richard Fuchs 3 months ago
parent
commit
e1cfefc07e
3 changed files with 13 additions and 2 deletions
  1. +1
    -2
      daemon/media_socket.c
  2. +11
    -0
      daemon/rtcp.c
  3. +1
    -0
      include/rtcp.h

+ 1
- 2
daemon/media_socket.c View File

@ -1393,7 +1393,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, "");
*/
@ -1719,7 +1718,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;


+ 11
- 0
daemon/rtcp.c View File

@ -272,6 +272,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 {
@ -366,9 +368,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,
@ -1650,3 +1654,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;
}

+ 1
- 0
include/rtcp.h View File

@ -27,6 +27,7 @@ struct rtcp_packet *rtcp_payload(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