diff options
author | matteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-02-18 18:15:30 +0000 |
---|---|---|
committer | matteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-02-18 18:15:30 +0000 |
commit | 28be2d6a7cb7f8915b0f346a9a2c02dd2fc5bf1f (patch) | |
tree | 0de34ae75587bde85880b54639d681ab4e4b986a /rtp.c | |
parent | 08261a60e010fae1f1ecb545a98fccbde00b59b6 (diff) |
mar feb 18 19:15:15 CET 2003
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@618 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'rtp.c')
-rwxr-xr-x | rtp.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -116,7 +116,7 @@ void ast_rtp_set_callback(struct ast_rtp *rtp, ast_rtp_callback callback) static struct ast_frame *send_dtmf(struct ast_rtp *rtp) { - printf("Sending dtmf: %d (%c)\n", rtp->resp, rtp->resp); + ast_log(LOG_DEBUG, "Sending dtmf: %d (%c)\n", rtp->resp, rtp->resp); rtp->f.frametype = AST_FRAME_DTMF; rtp->f.subclass = rtp->resp; rtp->f.datalen = 0; @@ -325,7 +325,7 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp) /* Send any pending DTMF */ if (rtp->resp && !rtp->dtmfcount) { - printf("Sending pending DTMF\n"); + ast_log(LOG_DEBUG, "Sending pending DTMF\n"); return send_dtmf(rtp); } rtp->f.mallocd = 0; @@ -581,7 +581,7 @@ static int ast_rtp_raw_write(struct ast_rtp *rtp, struct ast_frame *f, int codec pred = rtp->lastts + f->datalen * 8; break; case AST_FORMAT_GSM: - pred = rtp->lastts + f->datalen * 20 / 33; + pred = rtp->lastts + (f->datalen * 160 / 33); break; case AST_FORMAT_G723_1: pred = rtp->lastts + g723_samples(f->data, f->datalen); @@ -596,7 +596,7 @@ static int ast_rtp_raw_write(struct ast_rtp *rtp, struct ast_frame *f, int codec /* If it's close to ou prediction, go for it */ if (abs(rtp->lastts - pred) < 640) rtp->lastts = pred; -#if 0 +#if 1 else printf("Difference is %d, ms is %d\n", abs(rtp->lastts - pred), ms); #endif |