[svn-commits] rmudgett: branch group/media_formats-reviewed-trunk r418707 - in /team/group/...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jul 15 14:01:50 CDT 2014


Author: rmudgett
Date: Tue Jul 15 14:01:44 2014
New Revision: 418707

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=418707
Log:
chan_vpb: Get it to compile.

* Changes necessary to get chan_vpb to compile.

* Fixed ast_t_format_cap_append() by adding the missing the tag parameter
when REF_DEBUG is not defined.

Modified:
    team/group/media_formats-reviewed-trunk/channels/chan_vpb.cc
    team/group/media_formats-reviewed-trunk/include/asterisk/format.h
    team/group/media_formats-reviewed-trunk/include/asterisk/format_cap.h

Modified: team/group/media_formats-reviewed-trunk/channels/chan_vpb.cc
URL: http://svnview.digium.com/svn/asterisk/team/group/media_formats-reviewed-trunk/channels/chan_vpb.cc?view=diff&rev=418707&r1=418706&r2=418707
==============================================================================
--- team/group/media_formats-reviewed-trunk/channels/chan_vpb.cc (original)
+++ team/group/media_formats-reviewed-trunk/channels/chan_vpb.cc Tue Jul 15 14:01:44 2014
@@ -2506,8 +2506,15 @@
 	int group = -1;
 
 	if (!(ast_format_cap_iscompatible_format(cap, ast_format_slin))) {
-		char tmp[256];
-		ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format '%s'\n", ast_getformatname_multiple(tmp, sizeof(tmp), cap));
+		struct ast_str *buf;
+
+		buf = ast_str_create(256);
+		if (!buf) {
+			return NULL;
+		}
+		ast_log(LOG_NOTICE, "Asked to create a channel for unsupported formats: %s\n",
+			ast_format_cap_get_names(cap, &buf));
+		ast_free(buf);
 		return NULL;
 	}
 
@@ -2629,9 +2636,9 @@
 		ast_free(bridges);
 	}
 
-	ao2_ref(vpb_tech.capabilities, -1);
+	ao2_cleanup(vpb_tech.capabilities);
 	vpb_tech.capabilities = NULL;
-	ao2_ref(vpb_tech_indicate.capabilities, -1);
+	ao2_cleanup(vpb_tech_indicate.capabilities);
 	vpb_tech_indicate.capabilities = NULL;
 	return 0;
 }
@@ -2676,8 +2683,8 @@
 	if (!vpb_tech_indicate.capabilities) {
 		return AST_MODULE_LOAD_DECLINE;
 	}
-	ast_format_cap_add(vpb_tech.capabilities, ast_format_slin, 0);
-	ast_format_cap_add(vpb_tech_indicate.capabilities, ast_format_slin, 0);
+	ast_format_cap_append(vpb_tech.capabilities, ast_format_slin, 0);
+	ast_format_cap_append(vpb_tech_indicate.capabilities, ast_format_slin, 0);
 	try {
 		num_cards = vpb_get_num_cards();
 	} catch (std::exception e) {

Modified: team/group/media_formats-reviewed-trunk/include/asterisk/format.h
URL: http://svnview.digium.com/svn/asterisk/team/group/media_formats-reviewed-trunk/include/asterisk/format.h?view=diff&rev=418707&r1=418706&r2=418707
==============================================================================
--- team/group/media_formats-reviewed-trunk/include/asterisk/format.h (original)
+++ team/group/media_formats-reviewed-trunk/include/asterisk/format.h Tue Jul 15 14:01:44 2014
@@ -23,10 +23,11 @@
  * \author Joshua Colp <jcolp at digium.com>
  */
 
+#include "asterisk/codec.h"
+
 #ifndef _AST_FORMAT_H_
 #define _AST_FORMAT_H_
 
-struct ast_codec;
 struct ast_format;
 
 /*! \brief Format comparison results */

Modified: team/group/media_formats-reviewed-trunk/include/asterisk/format_cap.h
URL: http://svnview.digium.com/svn/asterisk/team/group/media_formats-reviewed-trunk/include/asterisk/format_cap.h?view=diff&rev=418707&r1=418706&r2=418707
==============================================================================
--- team/group/media_formats-reviewed-trunk/include/asterisk/format_cap.h (original)
+++ team/group/media_formats-reviewed-trunk/include/asterisk/format_cap.h Tue Jul 15 14:01:44 2014
@@ -114,7 +114,7 @@
 #else
 #define ast_format_cap_append(cap, format, framing) \
 	__ast_format_cap_append((cap), (format), (framing))
-#define ast_t_format_cap_append(cap, format, framing) \
+#define ast_t_format_cap_append(cap, format, framing, tag) \
 	__ast_format_cap_append((cap), (format), (framing))
 #endif
 




More information about the svn-commits mailing list