make a way to get the jitter buffer down to the codecs

This commit is contained in:
Anthony Minessale committed 2012-10-18 15:29:00 -04:00
1 parent 50cd5c28f5
commit 986fede6b0
14 files changed
+87 -16

No files matched your search

+11
View File
@@ -320,9 +320,20 @@ static switch_status_t switch_silk_decode(switch_codec_t *codec,
struct silk_context *context = codec->private_info;
SKP_int16 ret, len;
int16_t *target = decoded_data;
switch_core_session_t *session = codec->session;
stfu_instance_t *jb;
*decoded_data_len = 0;
if (session) {
jb = switch_core_session_get_jb(session, SWITCH_MEDIA_TYPE_AUDIO);
}
if (jb) {
/* to allow compile */
jb = NULL;
}
do {
ret = SKP_Silk_SDK_Decode(context->dec_state,
&context->decoder_object,
+21 -1
View File
@@ -306,6 +306,24 @@ char *generate_pai_str(private_object_t *tech_pvt)
return pai;
}
static stfu_instance_t *sofia_get_jb(switch_core_session_t *session, switch_media_type_t type)
{
private_object_t *tech_pvt = (private_object_t *) switch_core_session_get_private(session);
switch_rtp_t *rtp;
if (type == SWITCH_MEDIA_TYPE_AUDIO) {
rtp = tech_pvt->rtp_session;
} else {
rtp = tech_pvt->video_rtp_session;
}
if (rtp && switch_rtp_ready(rtp)) {
return switch_rtp_get_jitter_buffer(rtp);
}
return NULL;
}
/* map QSIG cause codes to SIP from RFC4497 section 8.4.1 */
static int hangup_cause_to_sip(switch_call_cause_t cause)
{
@@ -4501,7 +4519,9 @@ switch_io_routines_t sofia_io_routines = {
/*.receive_event */ sofia_receive_event,
/*.state_change */ NULL,
/*.read_video_frame */ sofia_read_video_frame,
/*.write_video_frame */ sofia_write_video_frame
/*.write_video_frame */ sofia_write_video_frame,
/*.state_run*/ NULL,
/*.get_jb*/ sofia_get_jb
};
switch_state_handler_table_t sofia_event_handlers = {