aboutsummaryrefslogtreecommitdiffstats
path: root/rtp.c
diff options
context:
space:
mode:
authormartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-16 05:10:35 +0000
committermartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-16 05:10:35 +0000
commitc3ef7b672f25621ba670ba22955a3dfc0953c739 (patch)
tree25d33da4ebede3baf10bbd03a14ef1333cc1ad4a /rtp.c
parent5dd6c3c66f480f29669530224f0f26eb3005ca73 (diff)
Show the names of the codecs instead of the numbers (bug #92)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1348 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'rtp.c')
-rwxr-xr-xrtp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/rtp.c b/rtp.c
index 484a4f694..03606b024 100755
--- a/rtp.c
+++ b/rtp.c
@@ -477,7 +477,7 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp)
// assumes that the RTP packet contained one Speex frame
break;
default:
- ast_log(LOG_NOTICE, "Unable to calculate samples for format %d\n", rtp->f.subclass);
+ ast_log(LOG_NOTICE, "Unable to calculate samples for format %s\n", ast_getformatname(rtp->f.subclass));
break;
}
} else {
@@ -927,7 +927,7 @@ static int ast_rtp_raw_write(struct ast_rtp *rtp, struct ast_frame *f, int codec
// assumes that the RTP packet contains one Speex frame
break;
default:
- ast_log(LOG_WARNING, "Not sure about timestamp format for codec format %d\n", f->subclass);
+ ast_log(LOG_WARNING, "Not sure about timestamp format for codec format %s\n", ast_getformatname(f->subclass));
}
/* Re-calculate last TS */
@@ -995,13 +995,13 @@ int ast_rtp_write(struct ast_rtp *rtp, struct ast_frame *_f)
codec = ast_rtp_lookup_code(rtp, 1, subclass);
if (codec < 0) {
- ast_log(LOG_WARNING, "Don't know how to send format %d packets with RTP\n", _f->subclass);
+ ast_log(LOG_WARNING, "Don't know how to send format %s packets with RTP\n", ast_getformatname(_f->subclass));
return -1;
}
if (rtp->lasttxformat != subclass) {
/* New format, reset the smoother */
- ast_log(LOG_DEBUG, "Ooh, format changed from %d to %d\n", rtp->lasttxformat, subclass);
+ ast_log(LOG_DEBUG, "Ooh, format changed from %s to %s\n", ast_getformatname(rtp->lasttxformat), ast_getformatname(subclass));
rtp->lasttxformat = subclass;
if (rtp->smoother)
ast_smoother_free(rtp->smoother);
@@ -1062,7 +1062,7 @@ int ast_rtp_write(struct ast_rtp *rtp, struct ast_frame *_f)
ast_rtp_raw_write(rtp, f, codec);
break;
default:
- ast_log(LOG_WARNING, "Not sure about sending format %d packets\n", subclass);
+ ast_log(LOG_WARNING, "Not sure about sending format %s packets\n", ast_getformatname(subclass));
// fall through to...
case AST_FORMAT_H261:
case AST_FORMAT_H263: