[asterisk-dev] A thread for format work

Joshua Colp jcolp at digium.com
Tue Apr 29 06:55:06 CDT 2014


Matthew Jordan wrote:

<snip>

> <snip>
>
>
>     The ability to set the framing per-format, globally in a
>     capabilities structure, and to get the framing already exists. What
>     doesn't exist is adding a format and then setting the framing as two
>     separate API calls. That is something that could be added but to
>     make sure you set the right format (format capabilities can contain
>     multiple formats of the same codec) you have to keep that format
>     around, in which case why not just add/set in the same API call?
>
>
> We may end up needing that API call sometime down the road. For example,
> if an Offer arrives with a new ptime attribute, it may be easier to
> modify an existing ast_format_cap structure rather than create a new
> one. But currently I just need the packetization values.

Since ptime in SIP applies to the media stream (and not to a specific 
media format) you can actually set a global framing value using 
ast_format_cap_set_framing. This applies to all media formats within a 
capabilities structure, unless one is specified for the format explicitly.

> What API call provides them? I must be missing it, because I couldn't
> seem to find it in format_cap.h. (I could be just going crazy however)

For getting them you use ast_format_cap_get_framing.

-- 
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