[asterisk-dev] [Code Review] 3703: media_formats: Move format attribute modules over, tweak API, and fix some bugs.

Matt Jordan reviewboard at asterisk.org
Mon Jul 7 20:40:28 CDT 2014



> On July 2, 2014, 3:25 p.m., Corey Farrell wrote:
> > /team/group/media_formats-reviewed-trunk/res/res_format_attr_celt.c, lines 48-53
> > <https://reviewboard.asterisk.org/r/3703/diff/2/?file=62050#file62050line48>
> >
> >     All format_destroy callbacks are identical.  I think it would be better to make format.c responsible for freeing attribute data after calling the (optional) format_destroy callback.  This callback would exist in-case the attributes contain a pointer that must be free'd or reference released.  Maybe also rename the callback to format_cleanup?

I'm not sure I agree with this finding. Right now, the format attribute modules are completely responsible for managing attributes. That has the benefit of putting all the logic in a single module. Granted, right now, attributes are relatively simple structures, but there's no guarantee that will always be the case - and this design is more flexible for the future.


- Matt


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3703/#review12443
-----------------------------------------------------------


On July 3, 2014, 7:15 a.m., Joshua Colp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3703/
> -----------------------------------------------------------
> 
> (Updated July 3, 2014, 7:15 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-23957
>     https://issues.asterisk.org/jira/browse/ASTERISK-23957
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This change does a few things:
> 
> 1. Fixes an issue where direct format interfaces were treated as AO2 objects when they were not.
> 2. Added an ast_format_clone API call which clones and deep copies a format, returning one which can be safely modified.
> 3. Changed the format interface API so anything which manipulates the format returns a new format.
> 4. Added get/set functions for format attribute data.
> 5. Added an API call to replace the format in an RTP engine codecs structure.
> 6. Updated the res_format_attr_* modules to work with the new media formats work.
> 7. Added support for loading an interface module after a format has been created.
> 
> 
> Diffs
> -----
> 
>   /team/group/media_formats-reviewed-trunk/res/res_pjsip_sdp_rtp.c 417804 
>   /team/group/media_formats-reviewed-trunk/res/res_format_attr_silk.c 417804 
>   /team/group/media_formats-reviewed-trunk/res/res_format_attr_opus.c 417804 
>   /team/group/media_formats-reviewed-trunk/res/res_format_attr_h264.c 417804 
>   /team/group/media_formats-reviewed-trunk/res/res_format_attr_h263.c 417804 
>   /team/group/media_formats-reviewed-trunk/res/res_format_attr_celt.c 417804 
>   /team/group/media_formats-reviewed-trunk/main/rtp_engine.c 417804 
>   /team/group/media_formats-reviewed-trunk/main/format.c 417804 
>   /team/group/media_formats-reviewed-trunk/include/asterisk/rtp_engine.h 417804 
>   /team/group/media_formats-reviewed-trunk/include/asterisk/format.h 417804 
>   /team/group/media_formats-reviewed-trunk/channels/chan_sip.c 417804 
> 
> Diff: https://reviewboard.asterisk.org/r/3703/diff/
> 
> 
> Testing
> -------
> 
> Placed calls in and out, confirmed that the attribute stuff doesn't crash things and that received SDP is parsed and interpreted. What doesn't currently work is passing this information through so outgoing calls have the correct attributes.
> 
> 
> Thanks,
> 
> Joshua Colp
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140708/80eedc76/attachment.html>


More information about the asterisk-dev mailing list