mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-10 14:51:09 +00:00
Fixup some bridge and format capabilities comments and whitespace.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -86,7 +86,8 @@ void ast_format_cap_add(struct ast_format_cap *cap, const struct ast_format *for
|
|||||||
void ast_format_cap_add_all_by_type(struct ast_format_cap *cap, enum ast_format_type type);
|
void ast_format_cap_add_all_by_type(struct ast_format_cap *cap, enum ast_format_type type);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Add all known formats to the capabilities structure using default format attribute. */
|
* \brief Add all known formats to the capabilities structure using default format attribute.
|
||||||
|
*/
|
||||||
void ast_format_cap_add_all(struct ast_format_cap *cap);
|
void ast_format_cap_add_all(struct ast_format_cap *cap);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -166,8 +167,8 @@ int ast_format_cap_get_compatible_format(const struct ast_format_cap *cap, const
|
|||||||
/*!
|
/*!
|
||||||
* \brief Find if ast_format is within the capabilities of the ast_format_cap object.
|
* \brief Find if ast_format is within the capabilities of the ast_format_cap object.
|
||||||
*
|
*
|
||||||
* retval 1 format is compatible with formats held in ast_format_cap object.
|
* \retval 1 format is compatible with formats held in ast_format_cap object.
|
||||||
* retval 0 format is not compatible with any formats in ast_format_cap object.
|
* \retval 0 format is not compatible with any formats in ast_format_cap object.
|
||||||
*/
|
*/
|
||||||
int ast_format_cap_iscompatible(const struct ast_format_cap *cap, const struct ast_format *format);
|
int ast_format_cap_iscompatible(const struct ast_format_cap *cap, const struct ast_format *format);
|
||||||
|
|
||||||
@@ -259,7 +260,6 @@ void ast_format_cap_iter_start(struct ast_format_cap *cap);
|
|||||||
*
|
*
|
||||||
* ast_format_cap_iter_start(cap);
|
* ast_format_cap_iter_start(cap);
|
||||||
* while (!ast_format_cap_iter_next(cap, &format)) {
|
* while (!ast_format_cap_iter_next(cap, &format)) {
|
||||||
*
|
|
||||||
* }
|
* }
|
||||||
* ast_format_cap_iter_end(Cap);
|
* ast_format_cap_iter_end(Cap);
|
||||||
*
|
*
|
||||||
@@ -303,6 +303,6 @@ void ast_format_cap_from_old_bitfield(struct ast_format_cap *dst, uint64_t src);
|
|||||||
* ex: for format=AST_FORMAT_GSM|AST_FORMAT_SPEEX|AST_FORMAT_ILBC it will return "0x602 (GSM|SPEEX|ILBC)"
|
* ex: for format=AST_FORMAT_GSM|AST_FORMAT_SPEEX|AST_FORMAT_ILBC it will return "0x602 (GSM|SPEEX|ILBC)"
|
||||||
* \return The return value is buf.
|
* \return The return value is buf.
|
||||||
*/
|
*/
|
||||||
char* ast_getformatname_multiple(char *buf, size_t size, struct ast_format_cap *cap);
|
char *ast_getformatname_multiple(char *buf, size_t size, struct ast_format_cap *cap);
|
||||||
|
|
||||||
#endif /* _AST_FORMATCAP_H */
|
#endif /* _AST_FORMATCAP_H */
|
||||||
|
@@ -638,9 +638,10 @@ static int bridge_make_compatible(struct ast_bridge *bridge, struct ast_bridge_c
|
|||||||
ast_format_copy(&formats[0], ast_channel_readformat(bridge_channel->chan));
|
ast_format_copy(&formats[0], ast_channel_readformat(bridge_channel->chan));
|
||||||
ast_format_copy(&formats[1], ast_channel_writeformat(bridge_channel->chan));
|
ast_format_copy(&formats[1], ast_channel_writeformat(bridge_channel->chan));
|
||||||
|
|
||||||
/* Are the formats currently in use something ths bridge can handle? */
|
/* Are the formats currently in use something this bridge can handle? */
|
||||||
if (!ast_format_cap_iscompatible(bridge->technology->format_capabilities, ast_channel_readformat(bridge_channel->chan))) {
|
if (!ast_format_cap_iscompatible(bridge->technology->format_capabilities, ast_channel_readformat(bridge_channel->chan))) {
|
||||||
struct ast_format best_format;
|
struct ast_format best_format;
|
||||||
|
|
||||||
ast_best_codec(bridge->technology->format_capabilities, &best_format);
|
ast_best_codec(bridge->technology->format_capabilities, &best_format);
|
||||||
|
|
||||||
/* Read format is a no go... */
|
/* Read format is a no go... */
|
||||||
@@ -662,6 +663,7 @@ static int bridge_make_compatible(struct ast_bridge *bridge, struct ast_bridge_c
|
|||||||
|
|
||||||
if (!ast_format_cap_iscompatible(bridge->technology->format_capabilities, &formats[1])) {
|
if (!ast_format_cap_iscompatible(bridge->technology->format_capabilities, &formats[1])) {
|
||||||
struct ast_format best_format;
|
struct ast_format best_format;
|
||||||
|
|
||||||
ast_best_codec(bridge->technology->format_capabilities, &best_format);
|
ast_best_codec(bridge->technology->format_capabilities, &best_format);
|
||||||
|
|
||||||
/* Write format is a no go... */
|
/* Write format is a no go... */
|
||||||
|
Reference in New Issue
Block a user