mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
format_cap: Perform codec lookups by pointer instead of name
ASTERISK-28416 #close Change-Id: I069420875ebdbcaada52d92599a5f7de3cb2cdf4
This commit is contained in:
committed by
George Joseph
parent
cc71be0078
commit
4964302984
@@ -314,4 +314,17 @@ struct ast_format *ast_format_cache_get_slin_by_rate(unsigned int rate);
|
||||
*/
|
||||
int ast_format_cache_is_slinear(struct ast_format *format);
|
||||
|
||||
/*!
|
||||
* \brief Retrieve a format from the cache by its codec
|
||||
*
|
||||
* \param codec The codec to search by
|
||||
*
|
||||
* \retval non-NULL if found
|
||||
* \retval NULL if not found
|
||||
*
|
||||
* \note The returned format has its reference count incremented. It must be
|
||||
* dropped using ao2_ref or ao2_cleanup.
|
||||
*/
|
||||
struct ast_format *ast_format_cache_get_by_codec(const struct ast_codec *codec);
|
||||
|
||||
#endif /* _AST_FORMAT_CACHE_H */
|
||||
|
Reference in New Issue
Block a user