mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-24 20:24:16 +00:00
add rtp-autoflush profile param and rtp_autoflush var to skip timer sleeps when the socket has data ready and refactor the jitter buffer code out into a different function and fix it so it works in blocking mode too
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12854 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
7b72eceba2
commit
7119462aa1
5 files changed
+68
-59
No files matched your search
@@ -181,6 +181,7 @@ typedef enum {
|
||||
PFLAG_MANAGE_SHARED_APPEARANCE,
|
||||
PFLAG_DISABLE_SRV,
|
||||
PFLAG_DISABLE_NAPTR,
|
||||
PFLAG_AUTOFLUSH,
|
||||
|
||||
/* No new flags below this line */
|
||||
PFLAG_MAX
|
||||
|
||||
@@ -1655,6 +1655,12 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
|
||||
} else {
|
||||
sofia_clear_pflag(profile, PFLAG_PASS_RFC2833);
|
||||
}
|
||||
} else if (!strcasecmp(var, "rtp-autoflush")) {
|
||||
if (switch_true(val)) {
|
||||
sofia_set_pflag(profile, PFLAG_AUTOFLUSH);
|
||||
} else {
|
||||
sofia_clear_pflag(profile, PFLAG_AUTOFLUSH);
|
||||
}
|
||||
} else if (!strcasecmp(var, "inbound-codec-negotiation")) {
|
||||
if (!strcasecmp(val, "greedy")) {
|
||||
sofia_set_pflag(profile, PFLAG_GREEDY);
|
||||
@@ -2181,6 +2187,12 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
||||
if (switch_true(val)) {
|
||||
sofia_set_pflag(profile, PFLAG_PASS_RFC2833);
|
||||
}
|
||||
} else if (!strcasecmp(var, "rtp-autoflush")) {
|
||||
if (switch_true(val)) {
|
||||
sofia_set_pflag(profile, PFLAG_AUTOFLUSH);
|
||||
} else {
|
||||
sofia_clear_pflag(profile, PFLAG_AUTOFLUSH);
|
||||
}
|
||||
} else if (!strcasecmp(var, "inbound-codec-negotiation")) {
|
||||
if (!strcasecmp(val, "greedy")) {
|
||||
sofia_set_pflag(profile, PFLAG_GREEDY);
|
||||
|
||||
@@ -2054,6 +2054,12 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
|
||||
flags |= SWITCH_RTP_FLAG_PASS_RFC2833;
|
||||
}
|
||||
|
||||
|
||||
if (sofia_test_pflag(tech_pvt->profile, PFLAG_AUTOFLUSH)
|
||||
|| ((val = switch_channel_get_variable(tech_pvt->channel, "rtp_autoflush")) && switch_true(val))) {
|
||||
flags |= SWITCH_RTP_FLAG_AUTOFLUSH;
|
||||
}
|
||||
|
||||
if (!(sofia_test_pflag(tech_pvt->profile, PFLAG_REWRITE_TIMESTAMPS) ||
|
||||
((val = switch_channel_get_variable(tech_pvt->channel, "rtp_rewrite_timestamps")) && !switch_true(val)))) {
|
||||
flags |= SWITCH_RTP_FLAG_RAW_WRITE;
|
||||
|
||||
Reference in new issue
Block a user