|
|
|
@ -161,6 +161,7 @@ static int call_avpf2avp_rtcp(str *s, struct packet_stream *);
|
|
|
|
static int call_savpf2avp_rtcp(str *s, struct packet_stream *);
|
|
|
|
static int call_savpf2avp_rtcp(str *s, struct packet_stream *);
|
|
|
|
//static int call_savpf2savp_rtcp(str *s, struct packet_stream *);
|
|
|
|
//static int call_savpf2savp_rtcp(str *s, struct packet_stream *);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void unkernelize(struct packet_stream *);
|
|
|
|
|
|
|
|
|
|
|
|
/* ********** */
|
|
|
|
/* ********** */
|
|
|
|
|
|
|
|
|
|
|
|
@ -435,6 +436,7 @@ void kernelize(struct packet_stream *stream) {
|
|
|
|
|
|
|
|
|
|
|
|
reti.src_addr.family = reti.dst_addr.family;
|
|
|
|
reti.src_addr.family = reti.dst_addr.family;
|
|
|
|
reti.src_addr.port = sink->sfd->fd.localport;
|
|
|
|
reti.src_addr.port = sink->sfd->fd.localport;
|
|
|
|
|
|
|
|
reti.ssrc = sink->crypto.ssrc;
|
|
|
|
|
|
|
|
|
|
|
|
ifa = g_atomic_pointer_get(&sink->media->local_address);
|
|
|
|
ifa = g_atomic_pointer_get(&sink->media->local_address);
|
|
|
|
if (reti.src_addr.family == AF_INET)
|
|
|
|
if (reti.src_addr.family == AF_INET)
|
|
|
|
@ -860,6 +862,12 @@ kernel_check:
|
|
|
|
if (PS_ISSET(stream, NO_KERNEL_SUPPORT))
|
|
|
|
if (PS_ISSET(stream, NO_KERNEL_SUPPORT))
|
|
|
|
goto forward;
|
|
|
|
goto forward;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (sink && sink->crypto.ssrc_mismatch && !stun_ret) {
|
|
|
|
|
|
|
|
ilog(LOG_INFO, "SSRC changed, unkernelizing media stream");
|
|
|
|
|
|
|
|
__unkernelize(stream);
|
|
|
|
|
|
|
|
goto forward;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (PS_ISSET(stream, CONFIRMED) && sink && PS_ARESET2(sink, CONFIRMED, FILLED))
|
|
|
|
if (PS_ISSET(stream, CONFIRMED) && sink && PS_ARESET2(sink, CONFIRMED, FILLED))
|
|
|
|
kernelize(stream);
|
|
|
|
kernelize(stream);
|
|
|
|
|
|
|
|
|
|
|
|
@ -1378,6 +1386,7 @@ static void callmaster_timer(void *ptr) {
|
|
|
|
struct stream_fd *sfd;
|
|
|
|
struct stream_fd *sfd;
|
|
|
|
struct rtp_stats *rs;
|
|
|
|
struct rtp_stats *rs;
|
|
|
|
unsigned int pt;
|
|
|
|
unsigned int pt;
|
|
|
|
|
|
|
|
struct rtp_ssrc_entry *cur_ssrc;
|
|
|
|
|
|
|
|
|
|
|
|
ZERO(hlp);
|
|
|
|
ZERO(hlp);
|
|
|
|
|
|
|
|
|
|
|
|
@ -1444,6 +1453,11 @@ static void callmaster_timer(void *ptr) {
|
|
|
|
mutex_lock(&sink->out_lock);
|
|
|
|
mutex_lock(&sink->out_lock);
|
|
|
|
if (sink->crypto.params.crypto_suite
|
|
|
|
if (sink->crypto.params.crypto_suite
|
|
|
|
&& ke->target.encrypt.last_index - sink->crypto.last_index > 0x4000) {
|
|
|
|
&& ke->target.encrypt.last_index - sink->crypto.last_index > 0x4000) {
|
|
|
|
|
|
|
|
// Keep the SSRC list in sync too.
|
|
|
|
|
|
|
|
cur_ssrc = find_ssrc(ke->target.ssrc, sink->crypto.ssrc_list);
|
|
|
|
|
|
|
|
if (cur_ssrc)
|
|
|
|
|
|
|
|
cur_ssrc->index = ke->target.encrypt.last_index;
|
|
|
|
|
|
|
|
|
|
|
|
sink->crypto.last_index = ke->target.encrypt.last_index;
|
|
|
|
sink->crypto.last_index = ke->target.encrypt.last_index;
|
|
|
|
update = 1;
|
|
|
|
update = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -2931,6 +2945,7 @@ void call_destroy(struct call *c) {
|
|
|
|
dtls_shutdown(ps);
|
|
|
|
dtls_shutdown(ps);
|
|
|
|
ps->sfd = NULL;
|
|
|
|
ps->sfd = NULL;
|
|
|
|
crypto_cleanup(&ps->crypto);
|
|
|
|
crypto_cleanup(&ps->crypto);
|
|
|
|
|
|
|
|
free_ssrc_list(ps->crypto.ssrc_list);
|
|
|
|
|
|
|
|
|
|
|
|
ps->rtp_sink = NULL;
|
|
|
|
ps->rtp_sink = NULL;
|
|
|
|
ps->rtcp_sink = NULL;
|
|
|
|
ps->rtcp_sink = NULL;
|
|
|
|
|