[asterisk-dev] Media Formats: ast_best_codec and cached formats questions
Joshua Colp
jcolp at digium.com
Sun Jun 22 09:46:15 CDT 2014
Matthew Jordan wrote:
> A few questions for those working on the media format improvements:
>
> 1) ast_best_codec: This function is supposed to pick the best format
> from a capabilities structure and return it, best being decided by a
> hard coded list within Asterisk. Luckily, chan_sip/chan_pjsip no
> longer use this.
>
> I don't think we really want to enforce a prioritization of formats -
> doing so has historically been bad for Asterisk (plenty of e-mails and
> bug reports on this subject). Rather, if you've configured a device to
> support a particular list of formats, then that is the list we use in
> the order you've specified.
>
> Since this was historically called by lots of channel drivers, I'm
> recommending we keep it but make it return the first format in the
> capability structure (the highest priority format). For most users of
> this function - who typically take the format and insert it into the
> capabilities structure at position 0 - that's a NoOp.
>
> For the rest of the core, I say we remove usage of this function.
Agreed.
> 2) Cached formats: who is supposed to define these things? Thanks to
> Corey's patches compilation succeeds, but linking fails big time. I'm
> not sure where/who the creator of these structures is supposed to be.
I don't think anything, yet. Something in the core should though.
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
More information about the asterisk-dev
mailing list