mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
Add pass through support for Opus and VP8; Opus format attribute negotiation
This patch adds pass through support for Opus and VP8. That includes: * Format attribute negotiation for Opus. Note that unlike some other codecs, the draft RFC specifies having spaces delimiting the attributes in addition to ';', so you have "attra=X; attrb=Y". This broke the attribute parsing in chan_sip, so a small tweak was also included in this patch for that. * A format attribute negotiation module for Opus, res_format_attr_opus * Fast picture update for VP8. Since VP8 uses a different RTCP packet number than FIR, this really is specific to VP8 at this time. Note that the format attribute negotiation in res_pjsip_sdp_rtp was written by mjordan. The rest of this patch was written completely by Lorenzo Miniero. Review: https://reviewboard.asterisk.org/r/2723/ (closes issue ASTERISK-21981) Reported by: Tzafrir Cohen patches: asterisk_opus+vp8_passthrough_20130718.patch uploaded by lminiero (License 6518) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397526 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1097,9 +1097,13 @@ int ast_codec_get_samples(struct ast_frame *f)
|
||||
return 160;
|
||||
}
|
||||
case AST_FORMAT_CELT:
|
||||
/* TODO The assumes 20ms delivery right now, which is incorrect */
|
||||
/* TODO This assumes 20ms delivery right now, which is incorrect */
|
||||
samples = ast_format_rate(&f->subclass.format) / 50;
|
||||
break;
|
||||
case AST_FORMAT_OPUS:
|
||||
/* TODO This assumes 20ms delivery right now, which is incorrect */
|
||||
samples = 960;
|
||||
break;
|
||||
default:
|
||||
ast_log(LOG_WARNING, "Unable to calculate samples for format %s\n", ast_getformatname(&f->subclass.format));
|
||||
}
|
||||
|
Reference in New Issue
Block a user