[asterisk-dev] Media Formats: ast_best_codec and cached formats questions

Matthew Jordan mjordan at digium.com
Sun Jun 22 11:01:01 CDT 2014


On Sun, Jun 22, 2014 at 10:12 AM, Joshua Colp <jcolp at digium.com> wrote:
> Matthew Jordan wrote:
>>
>> On Sun, Jun 22, 2014 at 9:46 AM, Joshua Colp<jcolp at digium.com>  wrote:
>>>
>>> Matthew Jordan wrote:
>>>>
>>>> A few questions for those working on the media format improvements:
>>>>
>>
>> <snip>
>>
>>>> 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.
>>>
>>
>> There's something of a chicken&  egg problem here.
>>
>>
>> We can't generate a format properly until we have the codec. Those
>> codecs are loadable modules: they may be present, they may not ever be
>> present. And they may load late in the startup sequence.
>
>
> Not completely. Built-in codecs are initialized in the core at a specific
> point, it is guaranteed for them to exist after that. If you create formats
> using them and cache them after that then all is well. What you can't do is
> exactly what you said - create a cached format for a codec that isn't
> loaded. Heck, it may not never be loaded if you allow that. For that case I
> would expect that a single module would register the codec and also create
> the cached format.
>

I'll start down the path of making the built-in codecs created the
cached formats.

I think we'll have to address what is built-in and what is not at some
point, as well as what occurs when a codec module loads and wants to
replace a built-in. That can come after getting this monster to link,
however.

-- 
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org



More information about the asterisk-dev mailing list