[asterisk-bugs] [JIRA] (ASTERISK-21981) Pass-through support for Opus and VP8 formats

Lorenzo Miniero (JIRA) noreply at issues.asterisk.org
Thu Jul 18 09:06:03 CDT 2013


     [ https://issues.asterisk.org/jira/browse/ASTERISK-21981?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lorenzo Miniero updated ASTERISK-21981:
---------------------------------------

    Attachment: asterisk_opus+vp8_passthrough_20130718.patch

I've worked on changing the patch according to Matt's points. So far I've implemented a new resource module to handle Opus-related SDP, as Matt asked. I still haven't touched the FIR-related code, as I've a couple of doubts related to the new module.

I implemented a new resource module:

* res_format_attr_opus.c (opus.h contains the keys)

basing on the existing CELT and SILK modules, as they shared a couple of attributes (Opus is based on those two codecs anyway). When testing it, though, I've encountered a couple of situations that puzzled me:

# According to draft-ietf-payload-rtp-opus, almost all of the parameters you can negotiate are put in a single fmtp attribute (e.g., "a=fmtp:101 stereo=1; sprop-stereo=1"). My module takes care of this by making use of strstr to check for a parameter in order to parse it. The problem is that in Asterisk, if fmtp parameters are separated by whitespaces (as in the example I put before) only the first one is passed to the parser. Removing the whitespace ("a=fmtp:101 stereo=1;sprop-stereo=1") passes the whole string to the parser successfully. Is this a known issue/limitation? I guess this can be blamed on the sscanf format that is used to parse the fmtp in chan_sip.c in the first place. 

# I then tried a simple scenario, where an Opus compliant softphone (Alice) calls another one (Bob) through Asterisk. I've noticed that my module parses the parameters correctly, but Asterisk doesn't make use of the parameters provided by Alice in order to generate the parameters for the call towards Bob: the defaults I placed there are still generated. This makes sense if we consider that it's Alice's opus_attr structure that is updated when parsing, while to generate the SDP for Bob a different opus_attr (related to that leg) is going to be used, but shouldn't the original opus_attr for Alice going to be used as a basis to generate the offer to send Bob in the current Asterisk architecture for passthrough codecs? Or am I missing something in the format modules specification that may help in that sense?


Apart from that, I've removed all the unneeded warning messages, and also the infamous opus_samples method. As of now, when querying the number of samples via ast_codec_get_samples, the method always returns 960 for Opus: this assumes 20ms of audio (the same incorrect assumption was already there as well for CELT) considering that the sampling rate in Opus is always advertised as 48kHz.

I'm attaching the updated patch as asterisk_opus+vp8_passthrough_20130718.patch.
                
> Pass-through support for Opus and VP8 formats
> ---------------------------------------------
>
>                 Key: ASTERISK-21981
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21981
>             Project: Asterisk
>          Issue Type: New Feature
>      Security Level: None
>          Components: Formats/General
>            Reporter: Tzafrir Cohen
>         Attachments: asterisk_opus+vp8_passthrough_20130718.patch, asterisk_opus+vp8_passthrough.patch
>
>
> Following discussions on the asterisk-dev mailing list, I create a bug for Lorenzo Miniero to merge the parts of his WebRTC codecs patch that can be merged.
> See:
> http://lists.digium.com/pipermail/asterisk-dev/2013-May/060388.html
> http://lists.digium.com/pipermail/asterisk-dev/2013-May/060419.html
> (If this is a duplicate: sorry for the noise. I failed to find it)
> Including this patch should allow for a review in time before the Asterisk 12 deadline. I marked this as "major" as I think this is an important feature missing in Asterisk right now. Supporting the formats is the least we can do.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list