[asterisk-commits] branch oej/test-this-branch r10653 - in
/team/oej/test-this-branch: ./ channe...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Feb 21 12:12:39 MST 2006
Author: oej
Date: Tue Feb 21 13:12:31 2006
New Revision: 10653
URL: http://svn.digium.com/view/asterisk?rev=10653&view=rev
Log:
Integrating the jitterbuffer branch
Modified:
team/oej/test-this-branch/Makefile
team/oej/test-this-branch/channel.c
team/oej/test-this-branch/channels/chan_iax2.c
team/oej/test-this-branch/channels/chan_sip.c
team/oej/test-this-branch/channels/chan_zap.c
team/oej/test-this-branch/configs/sip.conf.sample
team/oej/test-this-branch/configs/zapata.conf.sample
team/oej/test-this-branch/frame.c
team/oej/test-this-branch/include/asterisk/channel.h
team/oej/test-this-branch/include/asterisk/frame.h
team/oej/test-this-branch/rtp.c
team/oej/test-this-branch/translate.c
Modified: team/oej/test-this-branch/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/Makefile?rev=10653&r1=10652&r2=10653&view=diff
==============================================================================
--- team/oej/test-this-branch/Makefile (original)
+++ team/oej/test-this-branch/Makefile Tue Feb 21 13:12:31 2006
@@ -83,6 +83,9 @@
# Uncomment next one to enable ast_frame tracing (for debugging)
TRACE_FRAMES = #-DTRACE_FRAMES
+
+# Uncomment next one to enable the asterisk generic jitterbuffer
+GENERIC_JB = #-DAST_JB
# Uncomment next one to enable malloc debugging
# You can view malloc debugging with:
@@ -340,6 +343,7 @@
ASTCFLAGS+= $(DEBUG_THREADS)
ASTCFLAGS+= $(TRACE_FRAMES)
+ASTCFLAGS+= $(GENERIC_JB)
ASTCFLAGS+= $(MALLOC_DEBUG)
ASTCFLAGS+= $(BUSYDETECT)
ASTCFLAGS+= $(OPTIONS)
@@ -355,7 +359,7 @@
cdr.o tdd.o acl.o rtp.o udptl.o manager.o asterisk.o \
dsp.o chanvars.o indications.o autoservice.o db.o privacy.o \
astmm.o enum.o srv.o dns.o aescrypt.o aestab.o aeskey.o \
- utils.o plc.o jitterbuf.o dnsmgr.o devicestate.o \
+ utils.o plc.o jitterbuf.o scx_jitterbuf.o abstract_jb.o dnsmgr.o devicestate.o \
netsock.o slinfactory.o ast_expr2.o ast_expr2f.o \
cryptostub.o sha1.o
Modified: team/oej/test-this-branch/channel.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/channel.c?rev=10653&r1=10652&r2=10653&view=diff
==============================================================================
--- team/oej/test-this-branch/channel.c (original)
+++ team/oej/test-this-branch/channel.c Tue Feb 21 13:12:31 2006
@@ -1005,6 +1005,11 @@
while ((vardata = AST_LIST_REMOVE_HEAD(headp, entries)))
ast_var_delete(vardata);
+
+#ifdef AST_JB
+ /* Destroy the jitterbuffer */
+ ast_jb_destroy(chan);
+#endif /* AST_JB */
free(chan);
AST_LIST_UNLOCK(&channels);
@@ -3265,6 +3270,10 @@
int watch_c0_dtmf;
int watch_c1_dtmf;
void *pvt0, *pvt1;
+#ifdef AST_JB
+ /* Indicates whether a frame was queued into a jitterbuffer */
+ int frame_put_in_jb;
+#endif /* AST_JB */
int to;
cs[0] = c0;
@@ -3276,6 +3285,11 @@
watch_c0_dtmf = config->flags & AST_BRIDGE_DTMF_CHANNEL_0;
watch_c1_dtmf = config->flags & AST_BRIDGE_DTMF_CHANNEL_1;
+#ifdef AST_JB
+ /* Check the need of a jitterbuffer for each channel */
+ ast_jb_do_usecheck(c0, c1);
+#endif /* AST_JB */
+
for (;;) {
if ((c0->tech_pvt != pvt0) || (c1->tech_pvt != pvt1) ||
(o0nativeformats != c0->nativeformats) ||
@@ -3292,8 +3306,17 @@
}
} else
to = -1;
+#ifdef AST_JB
+ /* Calculate the appropriate max sleep interval - in general, this is the time,
+ left to the closest jb delivery moment */
+ to = ast_jb_get_when_to_wakeup(c0, c1, to);
+#endif /* AST_JB */
who = ast_waitfor_n(cs, 2, &to);
if (!who) {
+#ifdef AST_JB
+ /* No frame received within the specified timeout - check if we have to deliver now */
+ ast_jb_get_and_deliver(c0, c1);
+#endif /* AST_JB */
ast_log(LOG_DEBUG, "Nobody there, continuing...\n");
if (c0->_softhangup == AST_SOFTHANGUP_UNBRIDGE || c1->_softhangup == AST_SOFTHANGUP_UNBRIDGE) {
if (c0->_softhangup == AST_SOFTHANGUP_UNBRIDGE)
@@ -3313,6 +3336,11 @@
ast_log(LOG_DEBUG, "Didn't get a frame from channel: %s\n",who->name);
break;
}
+
+#ifdef AST_JB
+ /* Try add the frame info the who's bridged channel jitterbuff */
+ frame_put_in_jb = !ast_jb_put((who == c0) ? c1 : c0, f);
+#endif /* AST_JB */
if ((f->frametype == AST_FRAME_CONTROL) && !(config->flags & AST_BRIDGE_IGNORE_SIGS)) {
if ((f->subclass == AST_CONTROL_HOLD) || (f->subclass == AST_CONTROL_UNHOLD) ||
@@ -3354,7 +3382,18 @@
last = who;
#endif
tackygoto:
+#ifdef AST_JB
+ /* Write immediately frames, not passed through jb */
+ if(!frame_put_in_jb)
+ {
+ ast_write((who == c0) ? c1 : c0, f);
+ }
+
+ /* Check if we have to deliver now */
+ ast_jb_get_and_deliver(c0, c1);
+#else /* AST_JB */
ast_write((who == c0) ? c1 : c0, f);
+#endif /* AST_JB */
}
}
ast_frfree(f);
Modified: team/oej/test-this-branch/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/channels/chan_iax2.c?rev=10653&r1=10652&r2=10653&view=diff
==============================================================================
--- team/oej/test-this-branch/channels/chan_iax2.c (original)
+++ team/oej/test-this-branch/channels/chan_iax2.c Tue Feb 21 13:12:31 2006
@@ -1413,6 +1413,9 @@
the IAX thread with the iaxsl lock held. */
struct iax_frame *fr = data;
fr->retrans = -1;
+#ifdef AST_JB
+ fr->af.has_timing_info = 0;
+#endif /* AST_JB */
if (iaxs[fr->callno] && !ast_test_flag(iaxs[fr->callno], IAX_ALREADYGONE))
iax2_queue_frame(fr->callno, &fr->af);
/* Free our iax frame */
Modified: team/oej/test-this-branch/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/channels/chan_sip.c?rev=10653&r1=10652&r2=10653&view=diff
==============================================================================
--- team/oej/test-this-branch/channels/chan_sip.c (original)
+++ team/oej/test-this-branch/channels/chan_sip.c Tue Feb 21 13:12:31 2006
@@ -153,6 +153,19 @@
#define SIP_MAX_LINES 64 /*!< Max amount of lines in SIP attachment (like SDP) */
#define SIP_MAX_PACKET 4096 /*!< Also from RFC 3261 (2543), should sub headers tho */
+
+#ifdef AST_JB
+#include "asterisk/abstract_jb.h"
+/* Global jitterbuffer configuration - by default, jb is disabled */
+static struct ast_jb_conf default_jbconf =
+{
+ .flags = 0,
+ .max_size = -1,
+ .resync_threshold = -1,
+ .impl = ""
+};
+static struct ast_jb_conf global_jbconf;
+#endif /* AST_JB */
static const char desc[] = "Session Initiation Protocol (SIP)";
static const char config[] = "sip.conf";
@@ -720,6 +733,9 @@
struct ast_variable *chanvars; /*!< Channel variables to set for call */
struct sip_pvt *next; /*!< Next dialog in chain */
struct sip_invite_param *options; /*!< Options for INVITE */
+#ifdef AST_JB
+ struct ast_jb_conf jbconf;
+#endif /* AST_JB */
} *iflist = NULL;
#define FLAG_RESPONSE (1 << 0)
@@ -982,7 +998,11 @@
.type = "SIP",
.description = "Session Initiation Protocol (SIP)",
.capabilities = ((AST_FORMAT_MAX_AUDIO << 1) - 1),
+#ifdef AST_JB
+ .properties = AST_CHAN_TP_WANTSJITTER | AST_CHAN_TP_CREATESJITTER,
+#else /* AST_JB */
.properties = AST_CHAN_TP_WANTSJITTER,
+#endif /* AST_JB */
.requester = sip_request_call,
.devicestate = sip_devicestate,
.call = sip_call,
@@ -2958,6 +2978,14 @@
for (v = i->chanvars ; v ; v = v->next)
pbx_builtin_setvar_helper(tmp,v->name,v->value);
+#ifdef AST_JB
+ /* Configure the new channel jb */
+ if(tmp != NULL && i != NULL && i->rtp != NULL)
+ {
+ ast_jb_configure(tmp, &i->jbconf);
+ }
+#endif /* AST_JB */
+
return tmp;
}
@@ -3252,6 +3280,11 @@
if ((ast_test_flag(p, SIP_DTMF) == SIP_DTMF_RFC2833) || (ast_test_flag(p, SIP_DTMF) == SIP_DTMF_AUTO))
p->noncodeccapability |= AST_RTP_DTMF;
ast_string_field_set(p, context, default_context);
+
+#ifdef AST_JB
+ /* Assign default jb conf to the new sip_pvt */
+ memcpy(&p->jbconf, &global_jbconf, sizeof(struct ast_jb_conf));
+#endif /* AST_JB */
/* Add to active dialog list */
ast_mutex_lock(&iflock);
@@ -12216,6 +12249,14 @@
for (; v; v = v->next) {
if (handle_common_options(&peerflags, &mask, v))
continue;
+#ifdef AST_JB
+ /* handle jb conf */
+ if(ast_jb_read_conf(&global_jbconf, v->name, v->value) == 0)
+ {
+ v = v->next;
+ continue;
+ }
+#endif /* AST_JB */
if (realtime && !strcasecmp(v->name, "regseconds")) {
ast_get_time_t(v->value, ®seconds, 0);
@@ -12478,6 +12519,11 @@
global_relaxdtmf = FALSE;
global_callevents = FALSE;
global_t1min = DEFAULT_T1MIN;
+
+#ifdef AST_JB
+ /* Copy the default jb config over global_jbconf */
+ memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf));
+#endif /* AST_JB */
/* Read the [general] config section of sip.conf (or from realtime config) */
for (v = ast_variable_browse(cfg, "general"); v; v = v->next) {
Modified: team/oej/test-this-branch/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/channels/chan_zap.c?rev=10653&r1=10652&r2=10653&view=diff
==============================================================================
--- team/oej/test-this-branch/channels/chan_zap.c (original)
+++ team/oej/test-this-branch/channels/chan_zap.c Tue Feb 21 13:12:31 2006
@@ -107,6 +107,21 @@
#define SMDI_MD_WAIT_TIMEOUT 1500 /* 1.5 seconds */
#endif
+<<<<<<< .working
+#ifdef AST_JB
+#include "asterisk/abstract_jb.h"
+/* Global jitterbuffer configuration - by default, jb is disabled */
+static struct ast_jb_conf default_jbconf =
+{
+ .flags = 0,
+ .max_size = -1,
+ .resync_threshold = -1,
+ .impl = ""
+};
+static struct ast_jb_conf global_jbconf;
+#endif /* AST_JB */
+
+#ifndef ZT_SIG_EM_E1
#ifndef ZT_SIG_HARDHDLC
#error "Your zaptel is too old. please update"
#endif
@@ -704,6 +719,9 @@
#endif
int polarity;
int dsp_features;
+#ifdef AST_JB
+ struct ast_jb_conf jbconf;
+#endif /* AST_JB */
} *iflist = NULL, *ifend = NULL;
@@ -5240,6 +5258,13 @@
}
} else
ast_log(LOG_WARNING, "Unable to allocate channel structure\n");
+#ifdef AST_JB
+ /* Configure the new channel jb */
+ if(tmp != NULL && i != NULL)
+ {
+ ast_jb_configure(tmp, &i->jbconf);
+ }
+#endif /* AST_JB */
return tmp;
}
@@ -7053,6 +7078,10 @@
for (x=0;x<3;x++)
tmp->subs[x].zfd = -1;
tmp->channel = channel;
+#ifdef AST_JB
+ /* Assign default jb conf to the new zt_pvt */
+ memcpy(&tmp->jbconf, &global_jbconf, sizeof(struct ast_jb_conf));
+#endif /* AST_JB */
}
if (tmp) {
@@ -10446,8 +10475,20 @@
}
}
#endif
+#ifdef AST_JB
+ /* Copy the default jb config over global_jbconf */
+ memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf));
+#endif /* AST_JB */
v = ast_variable_browse(cfg, "channels");
while(v) {
+#ifdef AST_JB
+ /* handle jb conf */
+ if(ast_jb_read_conf(&global_jbconf, v->name, v->value) == 0)
+ {
+ v = v->next;
+ continue;
+ }
+#endif /* AST_JB */
/* Create the interface list */
if (!strcasecmp(v->name, "channel")
#ifdef ZAPATA_PRI
Modified: team/oej/test-this-branch/configs/sip.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/configs/sip.conf.sample?rev=10653&r1=10652&r2=10653&view=diff
==============================================================================
--- team/oej/test-this-branch/configs/sip.conf.sample (original)
+++ team/oej/test-this-branch/configs/sip.conf.sample Tue Feb 21 13:12:31 2006
@@ -261,6 +261,32 @@
; destinations which do not have a prior
; account relationship with your server.
+;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
+; jb-enable = yes ; Enables the use of a jitterbuffer on the receiving side of a
+ ; SIP channel. Defaults to "no". An enabled jitterbuffer will
+ ; be used only if the sending side can create and the receiving
+ ; side can not accept jitter. The SIP channel can accept jitter,
+ ; thus a jitterbuffer on the receive SIP side will be used only
+ ; if it is forced and enabled.
+
+; jb-force = no ; Forces the use of a jitterbuffer on the receive side of a SIP
+ ; channel. Defaults to "no".
+
+; jb-max-size = 200 ; Max length of the jitterbuffer in milliseconds.
+
+; jb-resynch-threshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is
+ ; resynchronized. Useful to improve the quality of the voice, with
+ ; big jumps in/broken timestamps, usualy sent from exotic devices
+ ; and programs. Defaults to 1000.
+
+; jb-impl = fixed ; Jitterbuffer implementation, used on the receiving side of a SIP
+ ; channel. Two implementation are currenlty available - "fixed"
+ ; (with size always equals to jb-max-size) and "adaptive" (with
+ ; variable size, actually the new jb of IAX2). Defaults to fixed.
+
+; jb-log = no ; Enables jitterbuffer frame logging. Defaults to "no".
+;-----------------------------------------------------------------------------------
+
[authentication]
; Global credentials for outbound calls, i.e. when a proxy challenges your
; Asterisk server for authentication. These credentials override
Modified: team/oej/test-this-branch/configs/zapata.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/configs/zapata.conf.sample?rev=10653&r1=10652&r2=10653&view=diff
==============================================================================
--- team/oej/test-this-branch/configs/zapata.conf.sample (original)
+++ team/oej/test-this-branch/configs/zapata.conf.sample Tue Feb 21 13:12:31 2006
@@ -485,6 +485,33 @@
;
;jitterbuffers=4
;
+;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
+; jb-enable = yes ; Enables the use of a jitterbuffer on the receiving side of a
+ ; ZAP channel. Defaults to "no". An enabled jitterbuffer will
+ ; be used only if the sending side can create and the receiving
+ ; side can not accept jitter. The ZAP channel can't accept jitter,
+ ; thus an enabled jitterbuffer on the receive ZAP side will always
+ ; be used if the sending side can create jitter or if ZAP jb is
+ ; forced.
+
+; jb-force = no ; Forces the use of a jitterbuffer on the receive side of a ZAP
+ ; channel. Defaults to "no".
+
+; jb-max-size = 200 ; Max length of the jitterbuffer in milliseconds.
+
+; jb-resynch-threshold = 1000 ; Jump in the frame timestamps over which the jitterbuffer is
+ ; resynchronized. Useful to improve the quality of the voice, with
+ ; big jumps in/broken timestamps, usualy sent from exotic devices
+ ; and programs. Defaults to 1000.
+
+; jb-impl = fixed ; Jitterbuffer implementation, used on the receiving side of a SIP
+ ; channel. Two implementation are currenlty available - "fixed"
+ ; (with size always equals to jb-max-size) and "adaptive" (with
+ ; variable size, actually the new jb of IAX2). Defaults to fixed.
+
+; jb-log = no ; Enables jitterbuffer frame logging. Defaults to "no".
+;-----------------------------------------------------------------------------------
+;
; You can define your own custom ring cadences here. You can define up to 8
; pairs. If the silence is negative, it indicates where the callerid spill is
; to be placed. Also, if you define any custom cadences, the default cadences
Modified: team/oej/test-this-branch/frame.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/frame.c?rev=10653&r1=10652&r2=10653&view=diff
==============================================================================
--- team/oej/test-this-branch/frame.c (original)
+++ team/oej/test-this-branch/frame.c Tue Feb 21 13:12:31 2006
@@ -319,6 +319,16 @@
out->offset = fr->offset;
out->src = NULL;
out->data = fr->data;
+#ifdef AST_JB
+ /* Copy the timing data */
+ out->has_timing_info = fr->has_timing_info;
+ if(fr->has_timing_info)
+ {
+ out->ts = fr->ts;
+ out->len = fr->len;
+ out->seqno = fr->seqno;
+ }
+#endif /* AST_JB */
} else {
out = fr;
}
@@ -382,6 +392,15 @@
out->prev = NULL;
out->next = NULL;
memcpy(out->data, f->data, out->datalen);
+#ifdef AST_JB
+ out->has_timing_info = f->has_timing_info;
+ if(f->has_timing_info)
+ {
+ out->ts = f->ts;
+ out->len = f->len;
+ out->seqno = f->seqno;
+ }
+#endif /* AST_JB */
return out;
}
Modified: team/oej/test-this-branch/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/include/asterisk/channel.h?rev=10653&r1=10652&r2=10653&view=diff
==============================================================================
--- team/oej/test-this-branch/include/asterisk/channel.h (original)
+++ team/oej/test-this-branch/include/asterisk/channel.h Tue Feb 21 13:12:31 2006
@@ -86,6 +86,10 @@
#ifndef _ASTERISK_CHANNEL_H
#define _ASTERISK_CHANNEL_H
+#ifdef AST_JB
+#include "asterisk/abstract_jb.h"
+#endif /* AST_JB */
+
#include <unistd.h>
#ifdef POLLCOMPAT
#include "asterisk/poll-compat.h"
@@ -427,12 +431,24 @@
/*! For easy linking */
AST_LIST_ENTRY(ast_channel) list;
+
+#ifdef AST_JB
+ /*! The jitterbuffer state */
+ struct ast_jb jb;
+#endif /* AST_JB */
};
/* \defgroup chanprop Channel tech properties:
\brief Channels have this property if they can accept input with jitter; i.e. most VoIP channels */
/* @{ */
#define AST_CHAN_TP_WANTSJITTER (1 << 0)
+
+#ifdef AST_JB
+/* \defgroup chanprop Channel tech properties:
+ \brief Channels have this property if they can create jitter; i.e. most VoIP channels */
+/* @{ */
+#define AST_CHAN_TP_CREATESJITTER (1 << 1)
+#endif /* AST_JB */
/* This flag has been deprecated by the transfercapbilty data member in struct ast_channel */
/* #define AST_FLAG_DIGITAL (1 << 0) */ /* if the call is a digital ISDN call */
Modified: team/oej/test-this-branch/include/asterisk/frame.h
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/include/asterisk/frame.h?rev=10653&r1=10652&r2=10653&view=diff
==============================================================================
--- team/oej/test-this-branch/include/asterisk/frame.h (original)
+++ team/oej/test-this-branch/include/asterisk/frame.h Tue Feb 21 13:12:31 2006
@@ -109,6 +109,16 @@
struct ast_frame *prev;
/*! Next/Prev for linking stand alone frames */
struct ast_frame *next;
+#ifdef AST_JB
+ /*! Timing data flag */
+ int has_timing_info;
+ /*! Timestamp in milliseconds */
+ long ts;
+ /*! Length in milliseconds */
+ long len;
+ /*! Sequence number */
+ int seqno;
+#endif /* AST_JB */
};
/*! Queueing a null frame is fairly common, so we declare a global null frame object
Modified: team/oej/test-this-branch/rtp.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/rtp.c?rev=10653&r1=10652&r2=10653&view=diff
==============================================================================
--- team/oej/test-this-branch/rtp.c (original)
+++ team/oej/test-this-branch/rtp.c Tue Feb 21 13:12:31 2006
@@ -428,7 +428,10 @@
int padding;
int mark;
int ext;
+ /* Remove the variable for the pointless loop */
+#ifndef AST_JB
int x;
+#endif /* AST_JB */
char iabuf[INET_ADDRSTRLEN];
unsigned int timestamp;
unsigned int *rtpheader;
@@ -569,6 +572,8 @@
if (!rtp->lastrxts)
rtp->lastrxts = timestamp;
+ /* Remove this pointless loop - it will generate unnecessary CPU load on a big jump in seqno. */
+#ifndef AST_JB
if (rtp->rxseqno) {
for (x=rtp->rxseqno + 1; x < seqno; x++) {
/* Queue empty frames */
@@ -580,6 +585,7 @@
rtp->f.src = "RTPMissedFrame";
}
}
+#endif /* AST_JB */
rtp->rxseqno = seqno;
if (rtp->dtmfcount) {
@@ -611,6 +617,13 @@
if (rtp->f.subclass == AST_FORMAT_SLINEAR)
ast_frame_byteswap_be(&rtp->f);
calc_rxstamp(&rtp->f.delivery, rtp, timestamp, mark);
+#ifdef AST_JB
+ /* Add timing data to let ast_generic_bridge() put the frame into a jitterbuf */
+ rtp->f.has_timing_info = 1;
+ rtp->f.ts = timestamp / 8;
+ rtp->f.len = rtp->f.samples / 8;
+ rtp->f.seqno = seqno;
+#endif /* AST_JB */
} else {
/* Video -- samples is # of samples vs. 90000 */
if (!rtp->lastividtimestamp)
Modified: team/oej/test-this-branch/translate.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/translate.c?rev=10653&r1=10652&r2=10653&view=diff
==============================================================================
--- team/oej/test-this-branch/translate.c (original)
+++ team/oej/test-this-branch/translate.c Tue Feb 21 13:12:31 2006
@@ -156,6 +156,17 @@
struct ast_trans_pvt *p;
struct ast_frame *out;
struct timeval delivery;
+#ifdef AST_JB
+ int has_timing_info;
+ long ts;
+ long len;
+ int seqno;
+
+ has_timing_info = f->has_timing_info;
+ ts = f->ts;
+ len = f->len;
+ seqno = f->seqno;
+#endif /* AST_JB */
p = path;
/* Feed the first frame into the first translator */
p->step->framein(p->state, f);
@@ -210,6 +221,15 @@
/* Invalidate prediction if we're entering a silence period */
if (out->frametype == AST_FRAME_CNG)
path->nextout = ast_tv(0, 0);
+#ifdef AST_JB
+ out->has_timing_info = has_timing_info;
+ if(has_timing_info)
+ {
+ out->ts = ts;
+ out->len = len;
+ out->seqno = seqno;
+ }
+#endif /* AST_JB */
return out;
}
p = p->next;
More information about the asterisk-commits
mailing list