[Asterisk-code-review] Streams: Add features for Advanced Codec Negotiation (asterisk[master])

George Joseph asteriskteam at digium.com
Fri Jun 26 14:10:00 CDT 2020


Hello Friendly Automation, 

I'd like you to reexamine a change. Please visit

    https://gerrit.asterisk.org/c/asterisk/+/14577

to look at the new patch set (#2).

Change subject: Streams:  Add features for Advanced Codec Negotiation
......................................................................

Streams:  Add features for Advanced Codec Negotiation

The Streams API becomes the home for the core ACN capabilities.
These include...

 * Parsing and formatting of codec negotation preferences.
 * Resolving pending streams and topologies with those configured
   using configured preferences.
 * Utility functions for creating string representations of
   streams, topologies, and negotiation preferences.

For codec negotiation preferences:
 * Added ast_stream_codec_prefs_parse() which takes a string
   representation of codec negotiation preferences, which
   may come from a pjsip endpoint for example, and populates
   a ast_stream_codec_negotiation_prefs structure.
 * Added ast_stream_codec_prefs_to_str() which does the reverse.
 * Added many functions to parse individual parameter name
   and value strings to their respectrive enum values, and the
   reverse.

For streams:
 * Added ast_stream_create_resolved() which takes a "live" stream
   and resolves it with a configured stream and the negotiation
   preferences to create a new stream.
 * Added ast_stream_to_str() which create a string representation
   of a stream suitable for debug or display purposes.

For topology:
 * Added ast_stream_topology_create_resolved() which takes a "live"
   topology and resolves it, stream by stream, with a configured
   topology stream and the negotiation preferences to create a new
   topology.
 * Added ast_stream_topology_to_str() which create a string
   representation of a topology suitable for debug or display
   purposes.
 * Renamed ast_format_caps_from_topology() to
   ast_stream_topology_get_formats() to be more consistent with
   the existing ast_stream_get_formats().

Additional changes:
 * ast_format_cap_get_names() now passes back "(null format)"
   if the supplied format caps is NULL or "" if there was another
   error.  It always returns a valid string now.  You can also
   now pass NULL as the ast_str** and the function will allocate
   an internal buffer for the response and automatically free it
   when the format caps object is destroyed.  Finally, if you do
   pass in an ast_str**, the function now appends the results to
   the buffer instead of replacing buffer contents.  Handy for
   prepending other identifying info to the ast_str.

Change-Id: I2df77dedd0c72c52deb6e329effe057a8e06cd56
---
M channels/chan_pjsip.c
A doc/CHANGES-staging/ACN_streams.txt
A doc/UPGRADE-staging/ACN_streams.txt
M include/asterisk/format_cap.h
M include/asterisk/stream.h
M main/channel.c
M main/core_unreal.c
M main/format_cap.c
M main/stream.c
M tests/test_format_cap.c
M tests/test_stream.c
11 files changed, 938 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/77/14577/2
-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14577
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I2df77dedd0c72c52deb6e329effe057a8e06cd56
Gerrit-Change-Number: 14577
Gerrit-PatchSet: 2
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200626/8d7a6701/attachment.html>


More information about the asterisk-code-review mailing list