[asterisk-commits] file: branch group/media_formats r406488 - in /team/group/media_formats: incl...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Jan 25 10:37:58 CST 2014
Author: file
Date: Sat Jan 25 10:37:54 2014
New Revision: 406488
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=406488
Log:
Add a function to return the number of formats in a capabilities structure.
Modified:
team/group/media_formats/include/asterisk/format_cap_ng.h
team/group/media_formats/main/format_cap_ng.c
Modified: team/group/media_formats/include/asterisk/format_cap_ng.h
URL: http://svnview.digium.com/svn/asterisk/team/group/media_formats/include/asterisk/format_cap_ng.h?view=diff&rev=406488&r1=406487&r2=406488
==============================================================================
--- team/group/media_formats/include/asterisk/format_cap_ng.h (original)
+++ team/group/media_formats/include/asterisk/format_cap_ng.h Sat Jan 25 10:37:54 2014
@@ -89,4 +89,13 @@
*/
int ast_format_cap_append(struct ast_format_cap *dst, const struct ast_format_cap *src);
+/*!
+ * \brief Get the number of formats present within the capabilities structure
+ *
+ * \param cap The capabilities structure
+ *
+ * \return the number of formats
+ */
+size_t ast_format_cap_count(const struct ast_format_cap *cap);
+
#endif /* _AST_FORMAT_CAP_H */
Modified: team/group/media_formats/main/format_cap_ng.c
URL: http://svnview.digium.com/svn/asterisk/team/group/media_formats/main/format_cap_ng.c?view=diff&rev=406488&r1=406487&r2=406488
==============================================================================
--- team/group/media_formats/main/format_cap_ng.c (original)
+++ team/group/media_formats/main/format_cap_ng.c Sat Jan 25 10:37:54 2014
@@ -162,4 +162,9 @@
}
return res;
+}
+
+size_t ast_format_cap_count(const struct ast_format_cap *cap)
+{
+ return AST_VECTOR_SIZE(&cap->preference_order);
}
More information about the asterisk-commits
mailing list