[asterisk-bugs] [JIRA] (ASTERISK-23957) Media format improvements: implement attribute caching
Joshua Colp (JIRA)
noreply at issues.asterisk.org
Wed Jul 2 11:25:56 CDT 2014
[ https://issues.asterisk.org/jira/browse/ASTERISK-23957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joshua Colp updated ASTERISK-23957:
-----------------------------------
Reviewboard Link: https://reviewboard.asterisk.org/r/3703/
> Media format improvements: implement attribute caching
> ------------------------------------------------------
>
> Key: ASTERISK-23957
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-23957
> Project: Asterisk
> Issue Type: Improvement
> Security Level: None
> Components: Core/General, Core/RTP, Resources/res_format_attr_celt, Resources/res_format_attr_h263, Resources/res_format_attr_h264, Resources/res_format_attr_silk
> Reporter: Matt Jordan
>
> Format attributes are still not implemented fully in the new media format architecture branch ({{team/group/media_formats-reviewed-trunk}}). There are a few considerations that have been uncovered that will require changes to the existing format API:
> # Attributes are mutable. They are typically generated from an SDP, or explicitly via a {{set}} call. The attributes must be stored in an object provided by the various attribute resource modules, and must be associated with the format from the RTP instance.
> # Formats are immutable. In many ways, this contradicts the first point - you cannot store an attribute object provided by a resource module on an immutable object.
> The way this should be handled is as follows:
> * Any operation that modifies an attribute (either through an SDP or by an explicit {{set}} call) must return a new {{ast_format}} object. The caller of the function is responsible for re-storing the new {{ast_format}} object in the appropriate locations.
> * An operation that creates a new {{ast_format}} object should clone the format; retrieve the attributes that are currently in the format, and update the attributes appropriately. Attributes can be mutable if desired; however, that is implementation specific in the resource modules themselves.
> To support this, the format API should be changed as follows:
> # The {{format_attribute_set}} callback and {{format_sdp_parse}} callback on the {{ast_format_interface}} should be changed to return a new {{ast_format}} object. The {{struct ast_format}} passed into these functions should be made {{const}}.
> # The {{format}} API should provide a new function, {{ast_format_clone}}. This should return a new {{struct ast_format}} that is a deep copy of a passed in {{const struct ast_format}}.
> # The {{ast_format_interface}} should provide a {{format_clone}} callback called by {{ast_format_clone}}. This should instruct the {{ast_format_interface}} implementation to copy the attributes in the private {{void *}}.
> Once these modifications are made, the various Resource modules can be updated with the new callbacks.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list