mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-26 12:37:26 +00:00
fix rtp break on blocking sockets
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7830 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
d00a0fadc2
commit
8869ac665b
@ -787,7 +787,7 @@ void sofia_glue_tech_patch_sdp(private_object_t *tech_pvt)
|
|||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%s I/O Error\n", switch_channel_get_name(tech_pvt->channel));
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%s I/O Error\n", switch_channel_get_name(tech_pvt->channel));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
tech_pvt->iananame = switch_core_session_strdup(tech_pvt->session, "NO-NAME");
|
tech_pvt->iananame = switch_core_session_strdup(tech_pvt->session, "PROXY");
|
||||||
tech_pvt->rm_rate = 8000;
|
tech_pvt->rm_rate = 8000;
|
||||||
tech_pvt->codec_ms = 20;
|
tech_pvt->codec_ms = 20;
|
||||||
}
|
}
|
||||||
|
@ -94,33 +94,32 @@ static switch_status_t switch_raw_destroy(switch_codec_t *codec)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static switch_status_t switch_nn_init(switch_codec_t *codec, switch_codec_flag_t flags, const switch_codec_settings_t *codec_settings)
|
static switch_status_t switch_proxy_init(switch_codec_t *codec, switch_codec_flag_t flags, const switch_codec_settings_t *codec_settings)
|
||||||
{
|
{
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static switch_status_t switch_nn_encode(switch_codec_t *codec,
|
static switch_status_t switch_proxy_encode(switch_codec_t *codec,
|
||||||
switch_codec_t *other_codec,
|
switch_codec_t *other_codec,
|
||||||
void *decoded_data,
|
void *decoded_data,
|
||||||
uint32_t decoded_data_len,
|
uint32_t decoded_data_len,
|
||||||
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate,
|
uint32_t decoded_rate, void *encoded_data, uint32_t * encoded_data_len, uint32_t * encoded_rate,
|
||||||
unsigned int *flag)
|
unsigned int *flag)
|
||||||
{
|
{
|
||||||
/* NOOP indicates that the audio in is already the same as the audio out, so no conversion was necessary. */
|
return SWITCH_STATUS_FALSE;
|
||||||
return SWITCH_STATUS_NOOP;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static switch_status_t switch_nn_decode(switch_codec_t *codec,
|
static switch_status_t switch_proxy_decode(switch_codec_t *codec,
|
||||||
switch_codec_t *other_codec,
|
switch_codec_t *other_codec,
|
||||||
void *encoded_data,
|
void *encoded_data,
|
||||||
uint32_t encoded_data_len,
|
uint32_t encoded_data_len,
|
||||||
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate,
|
uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate,
|
||||||
unsigned int *flag)
|
unsigned int *flag)
|
||||||
{
|
{
|
||||||
return SWITCH_STATUS_NOOP;
|
return SWITCH_STATUS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static switch_status_t switch_nn_destroy(switch_codec_t *codec)
|
static switch_status_t switch_proxy_destroy(switch_codec_t *codec)
|
||||||
{
|
{
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -300,11 +299,11 @@ SWITCH_MODULE_LOAD_FUNCTION(core_pcm_load)
|
|||||||
/* connect my internal structure to the blank pointer passed to me */
|
/* connect my internal structure to the blank pointer passed to me */
|
||||||
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
|
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
|
||||||
|
|
||||||
SWITCH_ADD_CODEC(codec_interface, "NO-NAME PASS-THROUGH");
|
SWITCH_ADD_CODEC(codec_interface, "PROXY PASS-THROUGH");
|
||||||
switch_core_codec_add_implementation(pool, codec_interface,
|
switch_core_codec_add_implementation(pool, codec_interface,
|
||||||
SWITCH_CODEC_TYPE_AUDIO, 0, "NO-NAME", NULL, 8000, 8000, 0,
|
SWITCH_CODEC_TYPE_AUDIO, 0, "PROXY", NULL, 8000, 8000, 0,
|
||||||
20000, 160, 320, 320, 1, 1, 12,
|
20000, 160, 320, 320, 1, 1, 12,
|
||||||
switch_nn_init, switch_nn_encode, switch_nn_decode, switch_nn_destroy);
|
switch_proxy_init, switch_proxy_encode, switch_proxy_decode, switch_proxy_destroy);
|
||||||
|
|
||||||
SWITCH_ADD_CODEC(codec_interface, "RAW Signed Linear (16 bit)");
|
SWITCH_ADD_CODEC(codec_interface, "RAW Signed Linear (16 bit)");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user