[asterisk-dev] [Code Review] 3512: media formats: Convert the translation core over
Joshua Colp
reviewboard at asterisk.org
Wed May 7 17:40:12 CDT 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3512/#review11844
-----------------------------------------------------------
team/group/media_formats-reviewed/main/codec.c
<https://reviewboard.asterisk.org/r/3512/#comment21707>
This will no longer work because original_id no longer exists, it's been removed as part of the legacy format API. What I'd suggest doing is a simple pointer comparison. Only 1 structure will ever exist for a codec, it gets used everywhere.
team/group/media_formats-reviewed/main/translate.c
<https://reviewboard.asterisk.org/r/3512/#comment21708>
Don't create a format here using this method - translator codecs have a field called "format" which is the name of a cached format. If that exists use it to get the format, and if it does not then fall back to this method.
As well - this function will get called multiple times so ideally only set the main frame details up once instead of each time, like was done in the past.
Type, format, mallocd, offset, src, and data.
- Joshua Colp
On May 2, 2014, 2:51 p.m., Kevin Harwell wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3512/
> -----------------------------------------------------------
>
> (Updated May 2, 2014, 2:51 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Bugs: SWP-6725
> https://issues.asterisk.org/jira/browse/SWP-6725
>
>
> Repository: Asterisk
>
>
> Description
> -------
>
> Updated the translation core (translate.c) to use the new media format API.
>
>
> Diffs
> -----
>
> team/group/media_formats-reviewed/main/translate.c 413195
> team/group/media_formats-reviewed/main/format.c 413195
> team/group/media_formats-reviewed/main/codec.c 413195
> team/group/media_formats-reviewed/include/asterisk/translate.h 413195
> team/group/media_formats-reviewed/include/asterisk/format.h 413195
> team/group/media_formats-reviewed/include/asterisk/codec.h 413195
>
> Diff: https://reviewboard.asterisk.org/r/3512/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Kevin Harwell
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140507/e1fb5bfb/attachment.html>
More information about the asterisk-dev
mailing list