[asterisk-commits] file: branch group/media_formats r406911 - in /team/group/media_formats: incl...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jan 29 06:23:00 CST 2014
Author: file
Date: Wed Jan 29 06:22:50 2014
New Revision: 406911
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=406911
Log:
Add _ng to all the new format stuff so Asterisk will build once again.
Modified:
team/group/media_formats/include/asterisk/format_cap_ng.h
team/group/media_formats/include/asterisk/format_ng.h
team/group/media_formats/main/format_cap_ng.c
team/group/media_formats/main/format_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=406911&r1=406910&r2=406911
==============================================================================
--- team/group/media_formats/include/asterisk/format_cap_ng.h (original)
+++ team/group/media_formats/include/asterisk/format_cap_ng.h Wed Jan 29 06:22:50 2014
@@ -47,7 +47,7 @@
* \retval ast_format_cap object on success.
* \retval NULL on failure.
*/
-struct ast_format_cap *ast_format_cap_alloc(enum ast_format_cap_flags flags);
+struct ast_format_cap *ast_format_cap_ng_alloc(enum ast_format_cap_flags flags);
/*!
* \brief Set the global framing.
@@ -55,7 +55,7 @@
* \param cap The capabilities structure.
* \param framing The framing value (in milliseconds).
*/
-void ast_format_cap_set_framing(struct ast_format_cap *cap, unsigned int framing);
+void ast_format_cap_ng_set_framing(struct ast_format_cap *cap, unsigned int framing);
/*!
* \brief Add format capability to capabilities structure.
@@ -71,7 +71,7 @@
*
* \note The order in which add is called determines the format preference order.
*/
-int ast_format_cap_add(struct ast_format_cap *cap, struct ast_format *format, unsigned int framing);
+int ast_format_cap_ng_add(struct ast_format_cap *cap, struct ast_format *format, unsigned int framing);
/*!
* \brief Add all codecs Asterisk knows about for a specific type to
@@ -87,7 +87,7 @@
*
* \note If AST_MEDIA_TYPE_UNKNOWN is passed as the type all known codecs will be added.
*/
-int ast_format_cap_add_all_by_type(struct ast_format_cap *cap, enum ast_media_type type);
+int ast_format_cap_ng_add_all_by_type(struct ast_format_cap *cap, enum ast_media_type type);
/*!
* \brief Append the formats in src to dst
@@ -98,7 +98,7 @@
* \retval 0 success
* \retval -1 failure
*/
-int ast_format_cap_append(struct ast_format_cap *dst, const struct ast_format_cap *src);
+int ast_format_cap_ng_append(struct ast_format_cap *dst, const struct ast_format_cap *src);
/*!
* \brief Get the number of formats present within the capabilities structure
@@ -107,7 +107,7 @@
*
* \return the number of formats
*/
-size_t ast_format_cap_count(const struct ast_format_cap *cap);
+size_t ast_format_cap_ng_count(const struct ast_format_cap *cap);
/*!
* \brief Get the format at a specific position
@@ -123,7 +123,7 @@
* \note The reference count of the returned format is increased. It must be released using ao2_ref
* or ao2_cleanup.
*/
-struct ast_format *ast_format_cap_get_format(const struct ast_format_cap *cap, int position);
+struct ast_format *ast_format_cap_ng_get_format(const struct ast_format_cap *cap, int position);
/*!
* \brief Get the framing for a format
@@ -133,7 +133,7 @@
*
* \return the framing (in milliseconds)
*/
-unsigned int ast_format_cap_get_framing(const struct ast_format_cap *cap, const struct ast_format *format);
+unsigned int ast_format_cap_ng_get_framing(const struct ast_format_cap *cap, const struct ast_format *format);
/*!
* \brief Remove format capability from capability structure.
@@ -144,7 +144,7 @@
* \retval 0, remove was successful
* \retval -1, remove failed. Could not find format to remove
*/
-int ast_format_cap_remove(struct ast_format_cap *cap, struct ast_format *format);
+int ast_format_cap_ng_remove(struct ast_format_cap *cap, struct ast_format *format);
/*!
* \brief Remove all formats matching a specific format type.
@@ -152,14 +152,14 @@
* \param cap The capabilities structure
* \param type The media type to remove formats of
*/
-void ast_format_cap_remove_bytype(struct ast_format_cap *cap, enum ast_media_type type);
+void ast_format_cap_ng_remove_bytype(struct ast_format_cap *cap, enum ast_media_type type);
/*!
* \brief Remove all format capabilities from capability structure
*
* \param cap The capabilities structure
*/
-void ast_format_cap_remove_all(struct ast_format_cap *cap);
+void ast_format_cap_ng_remove_all(struct ast_format_cap *cap);
/*!
* \brief Find if input ast_format is within the capabilities of the ast_format_cap object
@@ -171,7 +171,7 @@
* \note The reference count of the returned format is increased. It must be released using ao2_ref
* or ao2_cleanup.
*/
-struct ast_format *ast_format_cap_get_compatible_format(const struct ast_format_cap *cap, const struct ast_format *format);
+struct ast_format *ast_format_cap_ng_get_compatible_format(const struct ast_format_cap *cap, const struct ast_format *format);
/*!
* \brief Find if ast_format is within the capabilities of the ast_format_cap object.
@@ -179,7 +179,7 @@
* \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.
*/
-int ast_format_cap_iscompatible_format(const struct ast_format_cap *cap, const struct ast_format *format);
+int ast_format_cap_ng_iscompatible_format(const struct ast_format_cap *cap, const struct ast_format *format);
/*!
* \brief Find the compatible formats between two capabilities structures
@@ -195,7 +195,7 @@
*
* \note If failure occurs the result format capabilities structure may contain a partial result.
*/
-int ast_format_cap_get_compatible(const struct ast_format_cap *cap1, const struct ast_format_cap *cap2,
+int ast_format_cap_ng_get_compatible(const struct ast_format_cap *cap1, const struct ast_format_cap *cap2,
struct ast_format_cap *result);
/*!
@@ -207,7 +207,7 @@
* \retval 0 no joint capabilities exist
* \retval 1 joint capabilities exist
*/
-int ast_format_cap_iscompatible(const struct ast_format_cap *cap1, const struct ast_format_cap *cap2);
+int ast_format_cap_ng_iscompatible(const struct ast_format_cap *cap1, const struct ast_format_cap *cap2);
/*!
* \brief Find out if the capabilities structure has any formats
@@ -216,7 +216,7 @@
* \retval 1 true
* \retval 0 false, no formats of specific type.
*/
-int ast_format_cap_has_type(const struct ast_format_cap *cap, enum ast_media_type type);
+int ast_format_cap_ng_has_type(const struct ast_format_cap *cap, enum ast_media_type type);
/*! \brief Get the names of a set of formats
* \param buf a buffer for the output string
@@ -226,6 +226,6 @@
* 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.
*/
-char *ast_getformatname_multiple(char *buf, size_t size, struct ast_format_cap *cap);
+char *ast_getformatname_ng_multiple(char *buf, size_t size, struct ast_format_cap *cap);
#endif /* _AST_FORMAT_CAP_H */
Modified: team/group/media_formats/include/asterisk/format_ng.h
URL: http://svnview.digium.com/svn/asterisk/team/group/media_formats/include/asterisk/format_ng.h?view=diff&rev=406911&r1=406910&r2=406911
==============================================================================
--- team/group/media_formats/include/asterisk/format_ng.h (original)
+++ team/group/media_formats/include/asterisk/format_ng.h Wed Jan 29 06:22:50 2014
@@ -117,14 +117,14 @@
* \note The format is returned with reference count incremented. It must be released using
* ao2_ref or ao2_cleanup.
*/
-struct ast_format *ast_format_create(struct ast_codec *codec);
+struct ast_format *ast_format_ng_create(struct ast_codec *codec);
/*!
* \brief Compare two formats
*
* \retval ast_format_cmp_res representing the result of comparing format1 and format2.
*/
-enum ast_format_cmp_res ast_format_cmp(const struct ast_format *format1, const struct ast_format *format2);
+enum ast_format_cmp_res ast_format_ng_cmp(const struct ast_format *format1, const struct ast_format *format2);
/*1
* \brief Get a common joint capability between two formats
@@ -132,12 +132,12 @@
* \retval non-NULL if joint capability exists
* \retval NULL if no joint capability exists
*/
-struct ast_format *ast_format_joint(const struct ast_format *format1, const struct ast_format *format2);
+struct ast_format *ast_format_ng_joint(const struct ast_format *format1, const struct ast_format *format2);
/*!
* \brief Copy a media format
*/
-struct ast_format *ast_format_copy(struct ast_format *format);
+struct ast_format *ast_format_ng_copy(struct ast_format *format);
/*!
* \brief Set an attribute on a format to a specific value
@@ -149,7 +149,7 @@
* \retval 0 success
* \retval -1 failure
*/
-int ast_format_attribute_set(struct ast_format *format, const char *name, const char *value);
+int ast_format_ng_attribute_set(struct ast_format *format, const char *name, const char *value);
/*!
* \brief This function is used to have a media format aware module parse and interpret
@@ -162,7 +162,7 @@
* \retval 0 success, attribute values were valid
* \retval -1 failure, values were not acceptable
*/
-int ast_format_sdp_parse(struct ast_format *format, const char *attributes);
+int ast_format_ng_sdp_parse(struct ast_format *format, const char *attributes);
/*!
* \brief This function is used to produce an fmtp SDP line for an Asterisk format. The
@@ -172,7 +172,7 @@
* \param payload numerical payload for the fmtp line
* \param str structure that the fmtp line will be appended to
*/
-void ast_format_sdp_generate(const struct ast_format *format, unsigned int payload, struct ast_str **str);
+void ast_format_ng_sdp_generate(const struct ast_format *format, unsigned int payload, struct ast_str **str);
/*!
* \brief Register a format interface for use with the provided codec
@@ -195,6 +195,6 @@
* \retval 0 success
* \retval -1 failure
*/
-#define ast_format_interface_register(codec, interface) __ast_format_interface_register(codec, interface, ast_module_info->self)
+#define ast_format_ng_interface_register(codec, interface) __ast_format_interface_register(codec, interface, ast_module_info->self)
#endif /* _AST_FORMAT_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=406911&r1=406910&r2=406911
==============================================================================
--- team/group/media_formats/main/format_cap_ng.c (original)
+++ team/group/media_formats/main/format_cap_ng.c Wed Jan 29 06:22:50 2014
@@ -91,7 +91,7 @@
AST_VECTOR_FREE(&cap->preference_order);
}
-struct ast_format_cap *ast_format_cap_alloc(enum ast_format_cap_flags flags)
+struct ast_format_cap *ast_format_cap_ng_alloc(enum ast_format_cap_flags flags)
{
struct ast_format_cap *cap;
@@ -108,7 +108,7 @@
return cap;
}
-void ast_format_cap_set_framing(struct ast_format_cap *cap, unsigned int framing)
+void ast_format_cap_ng_set_framing(struct ast_format_cap *cap, unsigned int framing)
{
cap->framing = framing;
}
@@ -121,7 +121,7 @@
ao2_cleanup(framed->format);
}
-int ast_format_cap_add(struct ast_format_cap *cap, struct ast_format *format, unsigned int framing)
+int ast_format_cap_ng_add(struct ast_format_cap *cap, struct ast_format *format, unsigned int framing)
{
struct format_cap_framed *framed;
struct format_cap_framed_list *list;
@@ -152,7 +152,7 @@
return 0;
}
-int ast_format_cap_add_all_by_type(struct ast_format_cap *cap, enum ast_media_type type)
+int ast_format_cap_ng_add_all_by_type(struct ast_format_cap *cap, enum ast_media_type type)
{
int id;
@@ -170,7 +170,7 @@
continue;
}
- format = ast_format_create(codec);
+ format = ast_format_ng_create(codec);
ao2_ref(codec, -1);
if (!format) {
@@ -178,7 +178,7 @@
}
/* Use the global framing or default framing of the codec */
- res = ast_format_cap_add(cap, format, 0);
+ res = ast_format_cap_ng_add(cap, format, 0);
ao2_ref(format, -1);
if (res) {
@@ -189,25 +189,25 @@
return 0;
}
-int ast_format_cap_append(struct ast_format_cap *dst, const struct ast_format_cap *src)
+int ast_format_cap_ng_append(struct ast_format_cap *dst, const struct ast_format_cap *src)
{
int idx, res = 0;
for (idx = 0; (idx < AST_VECTOR_SIZE(&src->preference_order)) && !res; ++idx) {
struct format_cap_framed *framed = AST_VECTOR_GET(&src->preference_order, idx);
- res = ast_format_cap_add(dst, framed->format, framed->framing);
+ res = ast_format_cap_ng_add(dst, framed->format, framed->framing);
}
return res;
}
-size_t ast_format_cap_count(const struct ast_format_cap *cap)
+size_t ast_format_cap_ng_count(const struct ast_format_cap *cap)
{
return AST_VECTOR_SIZE(&cap->preference_order);
}
-struct ast_format *ast_format_cap_get_format(const struct ast_format_cap *cap, int position)
+struct ast_format *ast_format_cap_ng_get_format(const struct ast_format_cap *cap, int position)
{
struct format_cap_framed *framed;
@@ -221,7 +221,7 @@
return framed->format;
}
-unsigned int ast_format_cap_get_framing(const struct ast_format_cap *cap, const struct ast_format *format)
+unsigned int ast_format_cap_ng_get_framing(const struct ast_format_cap *cap, const struct ast_format *format)
{
unsigned int framing;
struct format_cap_framed_list *list;
@@ -235,7 +235,7 @@
list = AST_VECTOR_GET_ADDR(&cap->formats, format->codec->id);
AST_LIST_TRAVERSE(list, framed, entry) {
- enum ast_format_cmp_res res = ast_format_cmp(format, framed->format);
+ enum ast_format_cmp_res res = ast_format_ng_cmp(format, framed->format);
if (res == AST_FORMAT_CMP_NOT_EQUAL) {
continue;
@@ -275,7 +275,7 @@
*/
#define FORMAT_CAP_FRAMED_ELEM_CLEANUP(elem) ao2_cleanup((elem))
-int ast_format_cap_remove(struct ast_format_cap *cap, struct ast_format *format)
+int ast_format_cap_ng_remove(struct ast_format_cap *cap, struct ast_format *format)
{
struct format_cap_framed_list *list;
struct format_cap_framed *framed;
@@ -301,7 +301,7 @@
FORMAT_CAP_FRAMED_ELEM_CMP, FORMAT_CAP_FRAMED_ELEM_CLEANUP);
}
-void ast_format_cap_remove_bytype(struct ast_format_cap *cap, enum ast_media_type type)
+void ast_format_cap_ng_remove_bytype(struct ast_format_cap *cap, enum ast_media_type type)
{
int idx;
@@ -323,7 +323,7 @@
}
}
-void ast_format_cap_remove_all(struct ast_format_cap *cap)
+void ast_format_cap_ng_remove_all(struct ast_format_cap *cap)
{
format_cap_destroy(cap);
@@ -333,7 +333,7 @@
AST_VECTOR_INIT(&cap->preference_order, 5);
}
-struct ast_format *ast_format_cap_get_compatible_format(const struct ast_format_cap *cap, const struct ast_format *format)
+struct ast_format *ast_format_cap_ng_get_compatible_format(const struct ast_format_cap *cap, const struct ast_format *format)
{
struct format_cap_framed_list *list;
struct format_cap_framed *framed;
@@ -346,7 +346,7 @@
list = AST_VECTOR_GET_ADDR(&cap->formats, format->codec->id);
AST_LIST_TRAVERSE(list, framed, entry) {
- enum ast_format_cmp_res res = ast_format_cmp(format, framed->format);
+ enum ast_format_cmp_res res = ast_format_ng_cmp(format, framed->format);
if (res == AST_FORMAT_CMP_NOT_EQUAL) {
continue;
@@ -355,7 +355,7 @@
/* Replace any current result, this one will also be a subset OR an exact match */
ao2_cleanup(result);
- result = ast_format_joint(format, framed->format);
+ result = ast_format_ng_joint(format, framed->format);
/* If it's a match we can do no better so return asap */
if (res == AST_FORMAT_CMP_EQUAL) {
@@ -366,7 +366,7 @@
return result;
}
-int ast_format_cap_iscompatible_format(const struct ast_format_cap *cap, const struct ast_format *format)
+int ast_format_cap_ng_iscompatible_format(const struct ast_format_cap *cap, const struct ast_format *format)
{
struct format_cap_framed_list *list;
struct format_cap_framed *framed;
@@ -378,7 +378,7 @@
list = AST_VECTOR_GET_ADDR(&cap->formats, format->codec->id);
AST_LIST_TRAVERSE(list, framed, entry) {
- if (ast_format_cmp(format, framed->format) != AST_FORMAT_CMP_NOT_EQUAL) {
+ if (ast_format_ng_cmp(format, framed->format) != AST_FORMAT_CMP_NOT_EQUAL) {
return 1;
}
}
@@ -386,7 +386,7 @@
return 0;
}
-int ast_format_cap_has_type(const struct ast_format_cap *cap, enum ast_media_type type)
+int ast_format_cap_ng_has_type(const struct ast_format_cap *cap, enum ast_media_type type)
{
int idx;
@@ -401,7 +401,7 @@
return 0;
}
-int ast_format_cap_get_compatible(const struct ast_format_cap *cap1, const struct ast_format_cap *cap2,
+int ast_format_cap_ng_get_compatible(const struct ast_format_cap *cap1, const struct ast_format_cap *cap2,
struct ast_format_cap *result)
{
int idx, res = 0;
@@ -410,12 +410,12 @@
struct format_cap_framed *framed = AST_VECTOR_GET(&cap1->preference_order, idx);
struct ast_format *format;
- format = ast_format_cap_get_compatible_format(cap2, framed->format);
+ format = ast_format_cap_ng_get_compatible_format(cap2, framed->format);
if (!format) {
continue;
}
- res = ast_format_cap_add(result, format, framed->framing);
+ res = ast_format_cap_ng_add(result, format, framed->framing);
ao2_ref(format, -1);
if (res) {
@@ -426,14 +426,14 @@
return res;
}
-int ast_format_cap_iscompatible(const struct ast_format_cap *cap1, const struct ast_format_cap *cap2)
+int ast_format_cap_ng_iscompatible(const struct ast_format_cap *cap1, const struct ast_format_cap *cap2)
{
int idx;
for (idx = 0; idx < AST_VECTOR_SIZE(&cap1->preference_order); ++idx) {
struct format_cap_framed *framed = AST_VECTOR_GET(&cap1->preference_order, idx);
- if (ast_format_cap_iscompatible_format(cap2, framed->format) != AST_FORMAT_CMP_NOT_EQUAL) {
+ if (ast_format_cap_ng_iscompatible_format(cap2, framed->format) != AST_FORMAT_CMP_NOT_EQUAL) {
return 1;
}
}
@@ -441,7 +441,7 @@
return 0;
}
-char *ast_getformatname_multiple(char *buf, size_t size, struct ast_format_cap *cap)
+char *ast_getformatname_ng_multiple(char *buf, size_t size, struct ast_format_cap *cap)
{
int idx;
unsigned len;
Modified: team/group/media_formats/main/format_ng.c
URL: http://svnview.digium.com/svn/asterisk/team/group/media_formats/main/format_ng.c?view=diff&rev=406911&r1=406910&r2=406911
==============================================================================
--- team/group/media_formats/main/format_ng.c (original)
+++ team/group/media_formats/main/format_ng.c Wed Jan 29 06:22:50 2014
@@ -157,7 +157,7 @@
ao2_cleanup(format->codec);
}
-struct ast_format *ast_format_create(struct ast_codec *codec)
+struct ast_format *ast_format_ng_create(struct ast_codec *codec)
{
struct ast_format *format;
struct format_interface *format_interface;
@@ -178,7 +178,7 @@
return format;
}
-enum ast_format_cmp_res ast_format_cmp(const struct ast_format *format1, const struct ast_format *format2)
+enum ast_format_cmp_res ast_format_ng_cmp(const struct ast_format *format1, const struct ast_format *format2)
{
if (format1 == format2) {
return AST_FORMAT_CMP_EQUAL;
@@ -195,7 +195,7 @@
return AST_FORMAT_CMP_EQUAL;
}
-struct ast_format *ast_format_joint(const struct ast_format *format1, const struct ast_format *format2)
+struct ast_format *ast_format_ng_joint(const struct ast_format *format1, const struct ast_format *format2)
{
if (format1->codec != format2->codec) {
return NULL;
@@ -213,12 +213,12 @@
return format1->interface->format_get_joint(format1, format2);
}
-struct ast_format *ast_format_copy(struct ast_format *format)
+struct ast_format *ast_format_ng_copy(struct ast_format *format)
{
return ao2_bump(format);
}
-int ast_format_attribute_set(struct ast_format *format, const char *name, const char *value)
+int ast_format_ng_attribute_set(struct ast_format *format, const char *name, const char *value)
{
if (!format->interface || !format->interface->format_attribute_set) {
return -1;
@@ -227,7 +227,7 @@
return format->interface->format_attribute_set(format, name, value);
}
-int ast_format_sdp_parse(struct ast_format *format, const char *attributes)
+int ast_format_ng_sdp_parse(struct ast_format *format, const char *attributes)
{
if (!format->interface || !format->interface->format_sdp_parse) {
return -1;
@@ -236,7 +236,7 @@
return format->interface->format_sdp_parse(format, attributes);
}
-void ast_format_sdp_generate(const struct ast_format *format, unsigned int payload, struct ast_str **str)
+void ast_format_ng_sdp_generate(const struct ast_format *format, unsigned int payload, struct ast_str **str)
{
if (!format->interface || !format->interface->format_sdp_generate) {
return;
More information about the asterisk-commits
mailing list