diff options
author | David Vossel <dvossel@digium.com> | 2011-02-22 23:04:49 +0000 |
---|---|---|
committer | David Vossel <dvossel@digium.com> | 2011-02-22 23:04:49 +0000 |
commit | d760e81f37b231a99865a40f67838c51079ed4f8 (patch) | |
tree | b061487de973558358757bd1b6e457aaccf41638 /res | |
parent | 736133f874f270be81810c2c1fb36c47e6a479bf (diff) |
Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd audio ConfBridge, and other stuff
-Functional changes
1. Dynamic global format list build by codecs defined in codecs.conf
2. SILK 8khz, 12khz, 16khz, and 24khz with custom attributes defined in codecs.conf
3. Negotiation of SILK attributes in chan_sip.
4. SPEEX 32khz with translation
5. SLINEAR 8khz, 12khz, 24khz, 32khz, 44.1khz, 48khz, 96khz, 192khz with translation
using codec_resample.c
6. Various changes to RTP code required to properly handle the dynamic format list
and formats with attributes.
7. ConfBridge now dynamically jumps to the best possible sample rate. This allows
for conferences to take advantage of HD audio (Which sounds awesome)
8. Audiohooks are no longer limited to 8khz audio, and most effects have been
updated to take advantage of this such as Volume, DENOISE, PITCH_SHIFT.
9. codec_resample now uses its own code rather than depending on libresample.
-Organizational changes
Global format list is moved from frame.c to format.c
Various format specific functions moved from frame.c to format.c
Review: https://reviewboard.asterisk.org/r/1104/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r-- | res/res_mutestream.c | 2 | ||||
-rw-r--r-- | res/res_rtp_asterisk.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/res/res_mutestream.c b/res/res_mutestream.c index 4faf46478..41b2fd831 100644 --- a/res/res_mutestream.c +++ b/res/res_mutestream.c @@ -173,7 +173,7 @@ static struct ast_datastore *initialize_mutehook(struct ast_channel *chan) ast_datastore_free(datastore); return NULL; } - ast_audiohook_init(&mute->audiohook, AST_AUDIOHOOK_TYPE_MANIPULATE, "Mute"); + ast_audiohook_init(&mute->audiohook, AST_AUDIOHOOK_TYPE_MANIPULATE, "Mute", AST_AUDIOHOOK_MANIPULATE_ALL_RATES); mute->audiohook.manipulate_callback = mute_callback; datastore->data = mute; return datastore; diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index 0082fda96..b2004efab 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -1250,6 +1250,8 @@ static int ast_rtp_write(struct ast_rtp_instance *instance, struct ast_frame *fr switch (subclass.id) { case AST_FORMAT_SPEEX: case AST_FORMAT_SPEEX16: + case AST_FORMAT_SPEEX32: + case AST_FORMAT_SILK: case AST_FORMAT_G723_1: case AST_FORMAT_SIREN7: case AST_FORMAT_SIREN14: @@ -2292,7 +2294,7 @@ static struct ast_frame *ast_rtp_read(struct ast_rtp_instance *instance, int rtc if (AST_FORMAT_GET_TYPE(rtp->f.subclass.format.id) == AST_FORMAT_TYPE_AUDIO) { rtp->f.samples = ast_codec_get_samples(&rtp->f); - if ((rtp->f.subclass.format.id == AST_FORMAT_SLINEAR) || (rtp->f.subclass.format.id == AST_FORMAT_SLINEAR16)) { + if (ast_format_is_slinear(&rtp->f.subclass.format)) { ast_frame_byteswap_be(&rtp->f); } calc_rxstamp(&rtp->f.delivery, rtp, timestamp, mark); |