[asterisk-commits] dvossel: branch dvossel/fixtheworld_phase1_step3 r302163 - in /team/dvossel/f...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jan 17 14:54:38 CST 2011
Author: dvossel
Date: Mon Jan 17 14:54:27 2011
New Revision: 302163
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=302163
Log:
change ast_cap to ast_format_cap
Modified:
team/dvossel/fixtheworld_phase1_step3/apps/app_confbridge.c
team/dvossel/fixtheworld_phase1_step3/apps/app_meetme.c
team/dvossel/fixtheworld_phase1_step3/apps/app_originate.c
team/dvossel/fixtheworld_phase1_step3/apps/app_parkandannounce.c
team/dvossel/fixtheworld_phase1_step3/apps/app_rpt.c
team/dvossel/fixtheworld_phase1_step3/apps/app_voicemail.c
team/dvossel/fixtheworld_phase1_step3/bridges/bridge_multiplexed.c
team/dvossel/fixtheworld_phase1_step3/bridges/bridge_simple.c
team/dvossel/fixtheworld_phase1_step3/bridges/bridge_softmix.c
team/dvossel/fixtheworld_phase1_step3/channels/chan_console.c
team/dvossel/fixtheworld_phase1_step3/channels/chan_iax2.c
team/dvossel/fixtheworld_phase1_step3/channels/chan_local.c
team/dvossel/fixtheworld_phase1_step3/channels/chan_oss.c
team/dvossel/fixtheworld_phase1_step3/channels/chan_sip.c
team/dvossel/fixtheworld_phase1_step3/channels/sip/include/sip.h
team/dvossel/fixtheworld_phase1_step3/funcs/func_channel.c
team/dvossel/fixtheworld_phase1_step3/include/asterisk/bridging_technology.h
team/dvossel/fixtheworld_phase1_step3/include/asterisk/channel.h
team/dvossel/fixtheworld_phase1_step3/include/asterisk/data.h
team/dvossel/fixtheworld_phase1_step3/include/asterisk/format_cap.h
team/dvossel/fixtheworld_phase1_step3/include/asterisk/format_pref.h
team/dvossel/fixtheworld_phase1_step3/include/asterisk/frame.h
team/dvossel/fixtheworld_phase1_step3/include/asterisk/pbx.h
team/dvossel/fixtheworld_phase1_step3/include/asterisk/rtp_engine.h
team/dvossel/fixtheworld_phase1_step3/include/asterisk/speech.h
team/dvossel/fixtheworld_phase1_step3/include/asterisk/translate.h
team/dvossel/fixtheworld_phase1_step3/main/bridging.c
team/dvossel/fixtheworld_phase1_step3/main/ccss.c
team/dvossel/fixtheworld_phase1_step3/main/channel.c
team/dvossel/fixtheworld_phase1_step3/main/data.c
team/dvossel/fixtheworld_phase1_step3/main/dial.c
team/dvossel/fixtheworld_phase1_step3/main/features.c
team/dvossel/fixtheworld_phase1_step3/main/file.c
team/dvossel/fixtheworld_phase1_step3/main/format_cap.c
team/dvossel/fixtheworld_phase1_step3/main/format_pref.c
team/dvossel/fixtheworld_phase1_step3/main/frame.c
team/dvossel/fixtheworld_phase1_step3/main/manager.c
team/dvossel/fixtheworld_phase1_step3/main/pbx.c
team/dvossel/fixtheworld_phase1_step3/main/rtp_engine.c
team/dvossel/fixtheworld_phase1_step3/main/translate.c
team/dvossel/fixtheworld_phase1_step3/pbx/pbx_spool.c
team/dvossel/fixtheworld_phase1_step3/res/res_agi.c
team/dvossel/fixtheworld_phase1_step3/res/res_calendar.c
team/dvossel/fixtheworld_phase1_step3/res/res_clioriginate.c
team/dvossel/fixtheworld_phase1_step3/res/res_speech.c
team/dvossel/fixtheworld_phase1_step3/tests/test_format_api.c
Modified: team/dvossel/fixtheworld_phase1_step3/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/apps/app_confbridge.c?view=diff&rev=302163&r1=302162&r2=302163
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/apps/app_confbridge.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/apps/app_confbridge.c Mon Jan 17 14:54:27 2011
@@ -567,18 +567,18 @@
if (!(conference_bridge->playback_chan)) {
int cause;
- struct ast_cap *cap = ast_cap_alloc();
+ struct ast_format_cap *cap = ast_format_cap_alloc();
struct ast_format tmpfmt;
if (!cap) {
return -1;
}
- ast_cap_add(cap, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR, 0));
+ ast_format_cap_add(cap, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR, 0));
if (!(conference_bridge->playback_chan = ast_request("Bridge", cap, NULL, "", &cause))) {
ast_mutex_unlock(&conference_bridge->playback_lock);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
return -1;
}
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
conference_bridge->playback_chan->bridge = conference_bridge->bridge;
Modified: team/dvossel/fixtheworld_phase1_step3/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/apps/app_meetme.c?view=diff&rev=302163&r1=302162&r2=302163
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/apps/app_meetme.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/apps/app_meetme.c Mon Jan 17 14:54:27 2011
@@ -1189,7 +1189,7 @@
struct ast_conference *cnf;
struct dahdi_confinfo dahdic = { 0, };
int confno_int = 0;
- struct ast_cap *cap_slin = ast_cap_alloc();
+ struct ast_format_cap *cap_slin = ast_format_cap_alloc();
struct ast_format tmp_fmt;
AST_LIST_LOCK(&confs);
@@ -1202,7 +1202,7 @@
if (cnf || (!make && !dynamic) || !cap_slin)
goto cnfout;
- ast_cap_add(cap_slin, ast_format_set(&tmp_fmt, AST_FORMAT_SLINEAR, 0));
+ ast_format_cap_add(cap_slin, ast_format_set(&tmp_fmt, AST_FORMAT_SLINEAR, 0));
/* Make a new one */
if (!(cnf = ast_calloc(1, sizeof(*cnf))) ||
!(cnf->usercontainer = ao2_container_alloc(1, NULL, user_no_cmp))) {
@@ -1278,7 +1278,7 @@
conf_map[confno_int] = 1;
cnfout:
- cap_slin = ast_cap_destroy(cap_slin);
+ cap_slin = ast_format_cap_destroy(cap_slin);
if (cnf)
ast_atomic_fetchadd_int(&cnf->refcount, refcount);
@@ -2256,13 +2256,13 @@
int setusercount = 0;
int confsilence = 0, totalsilence = 0;
char *mailbox, *context;
- struct ast_cap *cap_slin = ast_cap_alloc();
+ struct ast_format_cap *cap_slin = ast_format_cap_alloc();
struct ast_format tmpfmt;
if (!cap_slin) {
goto conf_run_cleanup;
}
- ast_cap_add(cap_slin, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR, 0));
+ ast_format_cap_add(cap_slin, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR, 0));
if (!(user = ao2_alloc(sizeof(*user), NULL))) {
goto conf_run_cleanup;
@@ -3827,7 +3827,7 @@
conf_run_cleanup:
- cap_slin = ast_cap_destroy(cap_slin);
+ cap_slin = ast_format_cap_destroy(cap_slin);
return ret;
}
Modified: team/dvossel/fixtheworld_phase1_step3/apps/app_originate.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/apps/app_originate.c?view=diff&rev=302163&r1=302162&r2=302163
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/apps/app_originate.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/apps/app_originate.c Mon Jan 17 14:54:27 2011
@@ -106,13 +106,13 @@
static const unsigned int timeout = 30;
static const char default_exten[] = "s";
struct ast_format tmpfmt;
- struct ast_cap *cap_slin = ast_cap_alloc();
+ struct ast_format_cap *cap_slin = ast_format_cap_alloc();
ast_autoservice_start(chan);
if (!cap_slin) {
goto return_cleanup;
}
- ast_cap_add(cap_slin, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR, 0));
+ ast_format_cap_add(cap_slin, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR, 0));
if (ast_strlen_zero(data)) {
ast_log(LOG_ERROR, "Originate() requires arguments\n");
@@ -200,7 +200,7 @@
break;
}
}
- cap_slin = ast_cap_destroy(cap_slin);
+ cap_slin = ast_format_cap_destroy(cap_slin);
ast_autoservice_stop(chan);
return res;
Modified: team/dvossel/fixtheworld_phase1_step3/apps/app_parkandannounce.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/apps/app_parkandannounce.c?view=diff&rev=302163&r1=302162&r2=302163
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/apps/app_parkandannounce.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/apps/app_parkandannounce.c Mon Jan 17 14:54:27 2011
@@ -97,7 +97,7 @@
struct outgoing_helper oh = { 0, };
int outstate;
struct ast_format tmpfmt;
- struct ast_cap *cap_slin = ast_cap_alloc();
+ struct ast_format_cap *cap_slin = ast_format_cap_alloc();
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(template);
@@ -114,7 +114,7 @@
res = -1;
goto parkcleanup;
}
- ast_cap_add(cap_slin, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR, 0));
+ ast_format_cap_add(cap_slin, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR, 0));
s = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, s);
@@ -212,7 +212,7 @@
ast_hangup(dchan);
parkcleanup:
- cap_slin = ast_cap_destroy(cap_slin);
+ cap_slin = ast_format_cap_destroy(cap_slin);
return res;
}
Modified: team/dvossel/fixtheworld_phase1_step3/apps/app_rpt.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/apps/app_rpt.c?view=diff&rev=302163&r1=302162&r2=302163
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/apps/app_rpt.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/apps/app_rpt.c Mon Jan 17 14:54:27 2011
@@ -882,7 +882,7 @@
static int setrtx_check(struct rpt *myrpt);
static int channel_revert(struct rpt *myrpt);
static int channel_steer(struct rpt *myrpt, char *data);
-static struct ast_cap *get_slin_cap(struct ast_cap *cap);
+static struct ast_format_cap *get_slin_cap(struct ast_format_cap *cap);
AST_MUTEX_DEFINE_STATIC(nodeloglock);
@@ -1070,14 +1070,14 @@
#endif /* APP_RPT_LOCK_DEBUG */
-static struct ast_cap *get_slin_cap(struct ast_cap *cap)
+static struct ast_format_cap *get_slin_cap(struct ast_format_cap *cap)
{
struct ast_format tmp;
- cap = ast_cap_alloc();
+ cap = ast_format_cap_alloc();
if (!cap) {
return NULL;
}
- ast_cap_add(cap, ast_format_set(&tmp, AST_FORMAT_SLINEAR, 0));
+ ast_format_cap_add(cap, ast_format_set(&tmp, AST_FORMAT_SLINEAR, 0));
return cap;
}
@@ -3973,7 +3973,7 @@
char decimals[MAXREMSTR];
char mystr[200];
struct dahdi_params par;
-struct ast_cap *cap = NULL;
+struct ast_format_cap *cap = NULL;
/* get a pointer to myrpt */
myrpt = mytele->rpt;
@@ -4017,7 +4017,7 @@
/* allocate a pseudo-channel thru asterisk */
mychannel = ast_request("DAHDI", get_slin_cap(cap), NULL, "pseudo", NULL);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
if (!mychannel)
{
fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
@@ -5301,12 +5301,12 @@
int res;
int stopped,congstarted,dialtimer,lastcidx,aborted;
struct ast_channel *mychannel,*genchannel;
-struct ast_cap *cap = NULL;
+struct ast_format_cap *cap = NULL;
myrpt->mydtmf = 0;
/* allocate a pseudo-channel thru asterisk */
mychannel = ast_request("DAHDI", get_slin_cap(cap), NULL, "pseudo", NULL);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
if (!mychannel)
{
fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
@@ -5333,7 +5333,7 @@
}
/* allocate a pseudo-channel thru asterisk */
genchannel = ast_request("DAHDI", get_slin_cap(cap), NULL, "pseudo", NULL);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
if (!genchannel)
{
fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
@@ -5705,7 +5705,7 @@
int reconnects = 0;
int i,n;
struct dahdi_confinfo ci; /* conference info */
- struct ast_cap *cap = NULL;
+ struct ast_format_cap *cap = NULL;
val = node_lookup(myrpt,node);
if (!val){
@@ -5810,7 +5810,7 @@
}
*tele++ = 0;
l->chan = ast_request(deststr, get_slin_cap(cap), NULL, tele, NULL);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
if (l->chan){
ast_set_read_format_by_id(l->chan, AST_FORMAT_SLINEAR);
ast_set_write_format_by_id(l->chan, AST_FORMAT_SLINEAR);
@@ -5846,7 +5846,7 @@
}
/* allocate a pseudo-channel thru asterisk */
l->pchan = ast_request("DAHDI", get_slin_cap(cap), NULL, "pseudo", NULL);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
if (!l->pchan){
ast_log(LOG_WARNING,"rpt connect: Sorry unable to obtain pseudo channel\n");
ast_hangup(l->chan);
@@ -10360,7 +10360,7 @@
char *val, *s, *s1, *s2, *tele;
char tmp[300], deststr[300] = "";
char sx[320],*sy;
- struct ast_cap *cap = NULL;
+ struct ast_format_cap *cap = NULL;
val = node_lookup(myrpt,l->name);
@@ -10397,7 +10397,7 @@
l->thisconnected = 0;
l->newkey = 0;
l->chan = ast_request(deststr, get_slin_cap(cap), NULL, tele, NULL);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
if (l->chan){
ast_set_read_format_by_id(l->chan, AST_FORMAT_SLINEAR);
ast_set_write_format_by_id(l->chan, AST_FORMAT_SLINEAR);
@@ -10764,7 +10764,7 @@
struct rpt_link *l,*m;
struct rpt_tele *telem;
char tmpstr[300],lstr[MAXLINKLIST];
-struct ast_cap *cap = NULL;
+struct ast_format_cap *cap = NULL;
if (myrpt->p.archivedir) mkdir(myrpt->p.archivedir,0600);
@@ -10818,7 +10818,7 @@
}
*tele++ = 0;
myrpt->rxchannel = ast_request(tmpstr, get_slin_cap(cap), NULL, tele, NULL);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
myrpt->dahdirxchannel = NULL;
if (!strcasecmp(tmpstr,"DAHDI"))
myrpt->dahdirxchannel = myrpt->rxchannel;
@@ -10877,7 +10877,7 @@
}
*tele++ = 0;
myrpt->txchannel = ast_request(tmpstr, get_slin_cap(cap), NULL, tele, NULL);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
if (!strcasecmp(tmpstr,"DAHDI"))
myrpt->dahditxchannel = myrpt->txchannel;
if (myrpt->txchannel)
@@ -10934,7 +10934,7 @@
ast_indicate(myrpt->txchannel,AST_CONTROL_RADIO_UNKEY);
/* allocate a pseudo-channel thru asterisk */
myrpt->pchannel = ast_request("DAHDI", get_slin_cap(cap), NULL, "pseudo", NULL);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
if (!myrpt->pchannel)
{
fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
@@ -10954,7 +10954,7 @@
{
/* allocate a pseudo-channel thru asterisk */
myrpt->dahditxchannel = ast_request("DAHDI", get_slin_cap(cap), NULL, "pseudo", NULL);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
if (!myrpt->dahditxchannel)
{
fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
@@ -10974,7 +10974,7 @@
}
/* allocate a pseudo-channel thru asterisk */
myrpt->monchannel = ast_request("DAHDI", get_slin_cap(cap), NULL, "pseudo", NULL);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
if (!myrpt->monchannel)
{
fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
@@ -11070,7 +11070,7 @@
}
/* allocate a pseudo-channel thru asterisk */
myrpt->parrotchannel = ast_request("DAHDI", get_slin_cap(cap), NULL, "pseudo", NULL);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
if (!myrpt->parrotchannel)
{
fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
@@ -11089,7 +11089,7 @@
#endif
/* allocate a pseudo-channel thru asterisk */
myrpt->voxchannel = ast_request("DAHDI", get_slin_cap(cap), NULL, "pseudo", NULL);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
if (!myrpt->voxchannel)
{
fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
@@ -11108,7 +11108,7 @@
#endif
/* allocate a pseudo-channel thru asterisk */
myrpt->txpchannel = ast_request("DAHDI", get_slin_cap(cap), NULL, "pseudo", NULL);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
if (!myrpt->txpchannel)
{
fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
@@ -13176,7 +13176,7 @@
struct dahdi_radio_param z;
struct rpt_tele *telem;
int numlinks;
- struct ast_cap *cap = NULL;
+ struct ast_format_cap *cap = NULL;
nullfd = open("/dev/null",O_RDWR);
if (ast_strlen_zero(data)) {
@@ -13666,7 +13666,7 @@
ast_set_write_format_by_id(l->chan,AST_FORMAT_SLINEAR);
/* allocate a pseudo-channel thru asterisk */
l->pchan = ast_request("DAHDI", get_slin_cap(cap), NULL, "pseudo", NULL);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
if (!l->pchan)
{
fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
@@ -13811,7 +13811,7 @@
}
*tele++ = 0;
myrpt->rxchannel = ast_request(myrpt->rxchanname, get_slin_cap(cap), NULL, tele, NULL);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
myrpt->dahdirxchannel = NULL;
if (!strcasecmp(myrpt->rxchanname,"DAHDI"))
myrpt->dahdirxchannel = myrpt->rxchannel;
@@ -13855,7 +13855,7 @@
}
*tele++ = 0;
myrpt->txchannel = ast_request(myrpt->txchanname, get_slin_cap(cap), NULL, tele, NULL);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
if (!strncasecmp(myrpt->txchanname,"DAHDI",3))
myrpt->dahditxchannel = myrpt->txchannel;
if (myrpt->txchannel)
@@ -13895,7 +13895,7 @@
}
/* allocate a pseudo-channel thru asterisk */
myrpt->pchannel = ast_request("DAHDI", get_slin_cap(cap), NULL, "pseudo", NULL);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
if (!myrpt->pchannel)
{
fprintf(stderr,"rpt:Sorry unable to obtain pseudo channel\n");
Modified: team/dvossel/fixtheworld_phase1_step3/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/apps/app_voicemail.c?view=diff&rev=302163&r1=302162&r2=302163
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/apps/app_voicemail.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/apps/app_voicemail.c Mon Jan 17 14:54:27 2011
@@ -12304,7 +12304,7 @@
/* normally this is done in the channel driver */
ast_format_set(&test_channel1->writeformat, AST_FORMAT_GSM, 0);
- ast_cap_add(test_channel1->nativeformats, &test_channel1->writeformat);
+ ast_format_cap_add(test_channel1->nativeformats, &test_channel1->writeformat);
ast_format_set(&test_channel1->rawwriteformat, AST_FORMAT_GSM, 0);
ast_format_set(&test_channel1->readformat, AST_FORMAT_GSM, 0);
ast_format_set(&test_channel1->rawreadformat, AST_FORMAT_GSM, 0);
Modified: team/dvossel/fixtheworld_phase1_step3/bridges/bridge_multiplexed.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/bridges/bridge_multiplexed.c?view=diff&rev=302163&r1=302162&r2=302163
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/bridges/bridge_multiplexed.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/bridges/bridge_multiplexed.c Mon Jan 17 14:54:27 2011
@@ -308,7 +308,7 @@
if ((ast_format_cmp(&c0->writeformat, &c1->readformat) == AST_FORMAT_CMP_EQUAL) &&
(ast_format_cmp(&c0->readformat, &c1->writeformat) == AST_FORMAT_CMP_EQUAL) &&
- (ast_cap_identical(c0->nativeformats, c1->nativeformats))) {
+ (ast_format_cap_identical(c0->nativeformats, c1->nativeformats))) {
return 0;
}
@@ -398,12 +398,12 @@
if (!(multiplexed_threads = ao2_container_alloc(MULTIPLEXED_BUCKETS, NULL, NULL))) {
return AST_MODULE_LOAD_DECLINE;
}
- if (!(multiplexed_bridge.format_capabilities = ast_cap_alloc())) {
+ if (!(multiplexed_bridge.format_capabilities = ast_format_cap_alloc())) {
return AST_MODULE_LOAD_DECLINE;
}
- ast_cap_add_all_by_type(multiplexed_bridge.format_capabilities, AST_FORMAT_TYPE_AUDIO);
- ast_cap_add_all_by_type(multiplexed_bridge.format_capabilities, AST_FORMAT_TYPE_VIDEO);
- ast_cap_add_all_by_type(multiplexed_bridge.format_capabilities, AST_FORMAT_TYPE_TEXT);
+ ast_format_cap_add_all_by_type(multiplexed_bridge.format_capabilities, AST_FORMAT_TYPE_AUDIO);
+ ast_format_cap_add_all_by_type(multiplexed_bridge.format_capabilities, AST_FORMAT_TYPE_VIDEO);
+ ast_format_cap_add_all_by_type(multiplexed_bridge.format_capabilities, AST_FORMAT_TYPE_TEXT);
return ast_bridge_technology_register(&multiplexed_bridge);
}
Modified: team/dvossel/fixtheworld_phase1_step3/bridges/bridge_simple.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/bridges/bridge_simple.c?view=diff&rev=302163&r1=302162&r2=302163
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/bridges/bridge_simple.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/bridges/bridge_simple.c Mon Jan 17 14:54:27 2011
@@ -53,7 +53,7 @@
/* See if we need to make these compatible */
if ((ast_format_cmp(&c0->writeformat, &c1->readformat) == AST_FORMAT_CMP_EQUAL) &&
(ast_format_cmp(&c0->readformat, &c1->writeformat) == AST_FORMAT_CMP_EQUAL) &&
- (ast_cap_identical(c0->nativeformats, c1->nativeformats))) {
+ (ast_format_cap_identical(c0->nativeformats, c1->nativeformats))) {
return 0;
}
@@ -93,18 +93,18 @@
static int unload_module(void)
{
- ast_cap_destroy(simple_bridge.format_capabilities);
+ ast_format_cap_destroy(simple_bridge.format_capabilities);
return ast_bridge_technology_unregister(&simple_bridge);
}
static int load_module(void)
{
- if (!(simple_bridge.format_capabilities = ast_cap_alloc())) {
+ if (!(simple_bridge.format_capabilities = ast_format_cap_alloc())) {
return AST_MODULE_LOAD_DECLINE;
}
- ast_cap_add_all_by_type(simple_bridge.format_capabilities, AST_FORMAT_TYPE_AUDIO);
- ast_cap_add_all_by_type(simple_bridge.format_capabilities, AST_FORMAT_TYPE_VIDEO);
- ast_cap_add_all_by_type(simple_bridge.format_capabilities, AST_FORMAT_TYPE_TEXT);
+ ast_format_cap_add_all_by_type(simple_bridge.format_capabilities, AST_FORMAT_TYPE_AUDIO);
+ ast_format_cap_add_all_by_type(simple_bridge.format_capabilities, AST_FORMAT_TYPE_VIDEO);
+ ast_format_cap_add_all_by_type(simple_bridge.format_capabilities, AST_FORMAT_TYPE_TEXT);
return ast_bridge_technology_register(&simple_bridge);
}
Modified: team/dvossel/fixtheworld_phase1_step3/bridges/bridge_softmix.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/bridges/bridge_softmix.c?view=diff&rev=302163&r1=302162&r2=302163
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/bridges/bridge_softmix.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/bridges/bridge_softmix.c Mon Jan 17 14:54:27 2011
@@ -293,20 +293,20 @@
static int unload_module(void)
{
- ast_cap_destroy(softmix_bridge.format_capabilities);
+ ast_format_cap_destroy(softmix_bridge.format_capabilities);
return ast_bridge_technology_unregister(&softmix_bridge);
}
static int load_module(void)
{
struct ast_format tmp;
- if (!(softmix_bridge.format_capabilities = ast_cap_alloc())) {
+ if (!(softmix_bridge.format_capabilities = ast_format_cap_alloc())) {
return AST_MODULE_LOAD_DECLINE;
}
#ifdef SOFTMIX_16_SUPPORT
- ast_cap_add(softmix_bridge.format_capabilities, ast_format_set(&tmp, AST_FORMAT_SLINEAR16, 0));
+ ast_format_cap_add(softmix_bridge.format_capabilities, ast_format_set(&tmp, AST_FORMAT_SLINEAR16, 0));
#else
- ast_cap_add(softmix_bridge.format_capabilities, ast_format_set(&tmp, AST_FORMAT_SLINEAR, 0));
+ ast_format_cap_add(softmix_bridge.format_capabilities, ast_format_set(&tmp, AST_FORMAT_SLINEAR, 0));
#endif
return ast_bridge_technology_register(&softmix_bridge);
}
Modified: team/dvossel/fixtheworld_phase1_step3/channels/chan_console.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/channels/chan_console.c?view=diff&rev=302163&r1=302162&r2=302163
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/channels/chan_console.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/channels/chan_console.c Mon Jan 17 14:54:27 2011
@@ -183,7 +183,7 @@
static struct ast_jb_conf global_jbconf;
/*! Channel Technology Callbacks @{ */
-static struct ast_channel *console_request(const char *type, struct ast_cap *cap,
+static struct ast_channel *console_request(const char *type, struct ast_format_cap *cap,
const struct ast_channel *requestor, void *data, int *cause);
static int console_digit_begin(struct ast_channel *c, char digit);
static int console_digit_end(struct ast_channel *c, char digit, unsigned int duration);
@@ -420,7 +420,7 @@
chan->tech = &console_tech;
ast_format_set(&chan->readformat, AST_FORMAT_SLINEAR16, 0);
ast_format_set(&chan->writeformat, AST_FORMAT_SLINEAR16, 0);
- ast_cap_add(chan->nativeformats, &chan->readformat);
+ ast_format_cap_add(chan->nativeformats, &chan->readformat);
chan->tech_pvt = ref_pvt(pvt);
pvt->owner = chan;
@@ -442,7 +442,7 @@
return chan;
}
-static struct ast_channel *console_request(const char *type, struct ast_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *console_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
{
struct ast_channel *chan = NULL;
struct console_pvt *pvt;
@@ -453,7 +453,7 @@
return NULL;
}
- if (!(ast_cap_has_joint(cap, console_tech.capabilities))) {
+ if (!(ast_format_cap_has_joint(cap, console_tech.capabilities))) {
ast_log(LOG_NOTICE, "Channel requested with unsupported format(s): '%s'\n", ast_getformatname_multiple(buf, sizeof(buf), cap));
goto return_unref;
}
@@ -1449,7 +1449,7 @@
static int unload_module(void)
{
- console_tech.capabilities = ast_cap_destroy(console_tech.capabilities);
+ console_tech.capabilities = ast_format_cap_destroy(console_tech.capabilities);
ast_channel_unregister(&console_tech);
ast_cli_unregister_multiple(cli_console, ARRAY_LEN(cli_console));
@@ -1470,10 +1470,10 @@
struct ast_format tmpfmt;
PaError res;
- if (!(console_tech.capabilities = ast_cap_alloc())) {
+ if (!(console_tech.capabilities = ast_format_cap_alloc())) {
return AST_MODULE_LOAD_DECLINE;
}
- ast_cap_add(console_tech.capabilities, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR16, 0));
+ ast_format_cap_add(console_tech.capabilities, ast_format_set(&tmpfmt, AST_FORMAT_SLINEAR16, 0));
init_pvt(&globals, NULL);
Modified: team/dvossel/fixtheworld_phase1_step3/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/channels/chan_iax2.c?view=diff&rev=302163&r1=302162&r2=302163
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/channels/chan_iax2.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/channels/chan_iax2.c Mon Jan 17 14:54:27 2011
@@ -1191,7 +1191,7 @@
static int send_command_immediate(struct chan_iax2_pvt *, char, int, unsigned int, const unsigned char *, int, int);
static int send_command_locked(unsigned short callno, char, int, unsigned int, const unsigned char *, int, int);
static int send_command_transfer(struct chan_iax2_pvt *, char, int, unsigned int, const unsigned char *, int);
-static struct ast_channel *iax2_request(const char *type, struct ast_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
+static struct ast_channel *iax2_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
static struct ast_frame *iax2_read(struct ast_channel *c);
static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, struct ast_variable *alt, int temponly);
static struct iax2_user *build_user(const char *name, struct ast_variable *v, struct ast_variable *alt, int temponly);
@@ -1639,15 +1639,15 @@
static iax2_format iax2_codec_choose(struct ast_codec_pref *pref, iax2_format formats, int find_best)
{
- struct ast_cap *cap;
+ struct ast_format_cap *cap;
struct ast_format tmpfmt;
iax2_format format = 0;
- if ((cap = ast_cap_alloc())) {
+ if ((cap = ast_format_cap_alloc())) {
ast_format_clear(&tmpfmt);
- ast_cap_from_old_bitfield(cap, formats);
+ ast_format_cap_from_old_bitfield(cap, formats);
ast_codec_choose(pref, cap, find_best, &tmpfmt);
format = ast_format_to_old_bitfield(&tmpfmt);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
}
return format;
@@ -1655,16 +1655,16 @@
static iax2_format iax2_best_codec(iax2_format formats)
{
- struct ast_cap *cap = ast_cap_alloc();
+ struct ast_format_cap *cap = ast_format_cap_alloc();
struct ast_format tmpfmt;
if (!cap) {
return 0;
}
ast_format_clear(&tmpfmt);
- ast_cap_from_old_bitfield(cap, formats);
+ ast_format_cap_from_old_bitfield(cap, formats);
ast_best_codec(cap, &tmpfmt);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
return ast_format_to_old_bitfield(&tmpfmt);
}
@@ -1680,14 +1680,14 @@
static char *iax2_getformatname_multiple(char *codec_buf, size_t len, iax2_format format)
{
- struct ast_cap *cap = ast_cap_alloc();
+ struct ast_format_cap *cap = ast_format_cap_alloc();
if (!cap) {
return "(Nothing)";
}
- ast_cap_from_old_bitfield(cap, format);
+ ast_format_cap_from_old_bitfield(cap, format);
ast_getformatname_multiple(codec_buf, len, cap);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
return codec_buf;
}
@@ -1695,15 +1695,15 @@
static int iax2_parse_allow_disallow(struct ast_codec_pref *pref, iax2_format *formats, const char *list, int allowing)
{
int res;
- struct ast_cap *cap = ast_cap_alloc();
+ struct ast_format_cap *cap = ast_format_cap_alloc();
if (!cap) {
return 1;
}
- ast_cap_from_old_bitfield(cap, *formats);
+ ast_format_cap_from_old_bitfield(cap, *formats);
res = ast_parse_allow_disallow(pref, cap, list, allowing);
- *formats = ast_cap_to_old_bitfield(cap);
- cap = ast_cap_destroy(cap);
+ *formats = ast_format_cap_to_old_bitfield(cap);
+ cap = ast_format_cap_destroy(cap);
return res;
}
@@ -1712,13 +1712,13 @@
static int iax2_data_add_codecs(struct ast_data *root, const char *node_name, iax2_format formats)
{
int res;
- struct ast_cap *cap = ast_cap_alloc();
+ struct ast_format_cap *cap = ast_format_cap_alloc();
if (!cap) {
return -1;
}
- ast_cap_from_old_bitfield(cap, formats);
+ ast_format_cap_from_old_bitfield(cap, formats);
res = ast_data_add_codecs(root, node_name, cap);
- cap = ast_cap_destroy(cap);
+ cap = ast_format_cap_destroy(cap);
return res;
}
@@ -4645,11 +4645,11 @@
memcpy(&ourprefs, &prefs, sizeof(ourprefs));
if (c) {
struct ast_format tmpfmt;
- ast_cap_iter_start(c->nativeformats);
- while (!(ast_cap_iter_next(c->nativeformats, &tmpfmt))) {
+ ast_format_cap_iter_start(c->nativeformats);
+ while (!(ast_format_cap_iter_next(c->nativeformats, &tmpfmt))) {
ast_codec_pref_prepend(&ourprefs, &tmpfmt, 1);
}
- ast_cap_iter_end(c->nativeformats);
+ ast_format_cap_iter_end(c->nativeformats);
}
ast_codec_pref_convert(&ourprefs, cai->prefs, sizeof(cai->prefs), 1);
return 0;
@@ -4678,12 +4678,12 @@
/* Move the calling channel's native codec to the top of the preference list */
if (c) {
struct ast_format tmpfmt;
- ast_cap_iter_start(c->nativeformats);
- while (!(ast_cap_iter_next(c->nativeformats, &tmpfmt))) {
+ ast_format_cap_iter_start(c->nativeformats);
+ while (!(ast_format_cap_iter_next(c->nativeformats, &tmpfmt))) {
ast_debug(1, "prepending %s to prefs\n", ast_getformatname(&tmpfmt));
ast_codec_pref_prepend(&ourprefs, &tmpfmt, 1);
}
- ast_cap_iter_end(c->nativeformats);
+ ast_format_cap_iter_end(c->nativeformats);
}
ast_codec_pref_convert(&ourprefs, cai->prefs, sizeof(cai->prefs), 1);
ast_copy_string(cai->context, peer->context, sizeof(cai->context));
@@ -5219,7 +5219,7 @@
if (pds.password)
ast_string_field_set(iaxs[callno], secret, pds.password);
- iax2_tmpfmt = ast_cap_to_old_bitfield(c->nativeformats);
+ iax2_tmpfmt = ast_format_cap_to_old_bitfield(c->nativeformats);
iax_ie_append_int(&ied, IAX_IE_FORMAT, (int) iax2_tmpfmt);
iax_ie_append_versioned_uint64(&ied, IAX_IE_FORMAT2, 0, iax2_tmpfmt);
@@ -5806,7 +5806,7 @@
return NULL;
tmp->tech = &iax2_tech;
/* We can support any format by default, until we get restricted */
- ast_cap_from_old_bitfield(tmp->nativeformats, capability);
+ ast_format_cap_from_old_bitfield(tmp->nativeformats, capability);
ast_best_codec(tmp->nativeformats, &tmpfmt);
ast_format_copy(&tmp->readformat, &tmpfmt);
@@ -10368,17 +10368,17 @@
iax2_lock_owner(fr->callno);
if (iaxs[fr->callno]) {
if (iaxs[fr->callno]->owner) {
- struct ast_cap *orignative = ast_cap_copy(iaxs[fr->callno]->owner->nativeformats);
- struct ast_cap *native = iaxs[fr->callno]->owner->nativeformats;
+ struct ast_format_cap *orignative = ast_format_cap_copy(iaxs[fr->callno]->owner->nativeformats);
+ struct ast_format_cap *native = iaxs[fr->callno]->owner->nativeformats;
if (orignative) {
- ast_cap_remove_all(native);
- ast_cap_add(native, &f.subclass.format);
+ ast_format_cap_remove_all(native);
+ ast_format_cap_add(native, &f.subclass.format);
if (iaxs[fr->callno]->owner->readformat.id) {
ast_set_read_format(iaxs[fr->callno]->owner, &iaxs[fr->callno]->owner->readformat);
}
- ast_cap_copy2(native, orignative);
+ ast_format_cap_copy2(native, orignative);
ast_channel_unlock(iaxs[fr->callno]->owner);
- orignative = ast_cap_destroy(orignative);
+ orignative = ast_format_cap_destroy(orignative);
}
}
} else {
@@ -10847,7 +10847,7 @@
iaxs[fr->callno]->peerformat = ies.format;
} else {
if (iaxs[fr->callno]->owner)
- iaxs[fr->callno]->peerformat = ast_cap_to_old_bitfield(iaxs[fr->callno]->owner->nativeformats);
+ iaxs[fr->callno]->peerformat = ast_format_cap_to_old_bitfield(iaxs[fr->callno]->owner->nativeformats);
else
iaxs[fr->callno]->peerformat = iaxs[fr->callno]->capability;
}
@@ -10873,7 +10873,7 @@
if (iaxs[fr->callno] && iaxs[fr->callno]->owner) {
char tmp[256];
/* Switch us to use a compatible format */
- ast_cap_from_old_bitfield(iaxs[fr->callno]->owner->nativeformats, iaxs[fr->callno]->peerformat);
+ ast_format_cap_from_old_bitfield(iaxs[fr->callno]->owner->nativeformats, iaxs[fr->callno]->peerformat);
ast_verb(3, "Format for call is %s\n", ast_getformatname_multiple(tmp, sizeof(tmp), iaxs[fr->callno]->owner->nativeformats));
/* Setup read/write formats properly. */
@@ -12105,7 +12105,7 @@
}
}
-static struct ast_channel *iax2_request(const char *type, struct ast_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *iax2_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
{
int callno;
int res;
@@ -12160,12 +12160,12 @@
ast_mutex_unlock(&iaxsl[callno]);
if (c) {
- struct ast_cap *joint;
+ struct ast_format_cap *joint;
/* Choose a format we can live with */
- if ((joint = ast_cap_joint(c->nativeformats, cap))) {
- ast_cap_copy2(c->nativeformats, joint);
- joint = ast_cap_destroy(joint);
+ if ((joint = ast_format_cap_joint(c->nativeformats, cap))) {
+ ast_format_cap_copy2(c->nativeformats, joint);
+ joint = ast_format_cap_destroy(joint);
} else {
struct ast_format best_fmt_cap;
struct ast_format best_fmt_native;
@@ -12176,8 +12176,8 @@
ast_hangup(c);
return NULL;
}
- ast_cap_remove_all(c->nativeformats);
- ast_cap_add(c->nativeformats, &best_fmt_native);
+ ast_format_cap_remove_all(c->nativeformats);
+ ast_format_cap_add(c->nativeformats, &best_fmt_native);
}
ast_best_codec(c->nativeformats, &c->readformat);
ast_format_copy(&c->writeformat, &c->readformat);
@@ -14398,7 +14398,7 @@
ast_context_destroy(con, "IAX2");
ast_unload_realtime("iaxpeers");
- iax2_tech.capabilities = ast_cap_destroy(iax2_tech.capabilities);
+ iax2_tech.capabilities = ast_format_cap_destroy(iax2_tech.capabilities);
return 0;
}
@@ -14702,10 +14702,10 @@
int x = 0;
struct iax2_registry *reg = NULL;
- if (!(iax2_tech.capabilities = ast_cap_alloc())) {
+ if (!(iax2_tech.capabilities = ast_format_cap_alloc())) {
return AST_MODULE_LOAD_FAILURE;
}
- ast_cap_add_all(iax2_tech.capabilities);
+ ast_format_cap_add_all(iax2_tech.capabilities);
if (load_objects()) {
return AST_MODULE_LOAD_FAILURE;
Modified: team/dvossel/fixtheworld_phase1_step3/channels/chan_local.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/channels/chan_local.c?view=diff&rev=302163&r1=302162&r2=302163
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/channels/chan_local.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/channels/chan_local.c Mon Jan 17 14:54:27 2011
@@ -88,7 +88,7 @@
.target_extra = -1,
};
-static struct ast_channel *local_request(const char *type, struct ast_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
+static struct ast_channel *local_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause);
static int local_digit_begin(struct ast_channel *ast, char digit);
static int local_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
static int local_call(struct ast_channel *ast, char *dest, int timeout);
@@ -140,7 +140,7 @@
unsigned int flags; /*!< Private flags */
char context[AST_MAX_CONTEXT]; /*!< Context to call */
char exten[AST_MAX_EXTENSION]; /*!< Extension to call */
- struct ast_cap *reqcap; /*!< Requested format capabilities */
+ struct ast_format_cap *reqcap; /*!< Requested format capabilities */
struct ast_jb_conf jb_conf; /*!< jitterbuffer configuration for this local channel */
struct ast_channel *owner; /*!< Master Channel - Bridging happens here */
struct ast_channel *chan; /*!< Outbound channel - PBX is run here */
@@ -954,7 +954,7 @@
}
/*! \brief Create a call structure */
-static struct local_pvt *local_alloc(const char *data, struct ast_cap *cap)
+static struct local_pvt *local_alloc(const char *data, struct ast_format_cap *cap)
{
struct local_pvt *tmp = NULL;
char *c = NULL, *opts = NULL;
@@ -962,7 +962,7 @@
if (!(tmp = ao2_alloc(sizeof(*tmp), NULL))) {
return NULL;
}
- if (!(tmp->reqcap = ast_cap_copy(cap))) {
+ if (!(tmp->reqcap = ast_format_cap_copy(cap))) {
ao2_ref(tmp, -1);
return NULL;
}
@@ -1046,8 +1046,8 @@
tmp2->tech = tmp->tech = &local_tech;
- ast_cap_append(tmp->nativeformats, p->reqcap);
- ast_cap_append(tmp2->nativeformats, p->reqcap);
+ ast_format_cap_append(tmp->nativeformats, p->reqcap);
+ ast_format_cap_append(tmp2->nativeformats, p->reqcap);
/* Determine our read/write format and set it on each channel */
ast_best_codec(p->reqcap, &fmt);
@@ -1080,7 +1080,7 @@
}
/*! \brief Part of PBX interface */
-static struct ast_channel *local_request(const char *type, struct ast_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *local_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
{
struct local_pvt *p = NULL;
struct ast_channel *chan = NULL;
@@ -1198,13 +1198,13 @@
/*! \brief Load module into PBX, register channel */
static int load_module(void)
{
- if (!(local_tech.capabilities = ast_cap_alloc())) {
+ if (!(local_tech.capabilities = ast_format_cap_alloc())) {
return AST_MODULE_LOAD_FAILURE;
}
- ast_cap_add_all(local_tech.capabilities);
+ ast_format_cap_add_all(local_tech.capabilities);
if (!(locals = ao2_container_alloc(BUCKET_SIZE, NULL, locals_cmp_cb))) {
- ast_cap_destroy(local_tech.capabilities);
+ ast_format_cap_destroy(local_tech.capabilities);
return AST_MODULE_LOAD_FAILURE;
}
@@ -1212,7 +1212,7 @@
if (ast_channel_register(&local_tech)) {
ast_log(LOG_ERROR, "Unable to register channel class 'Local'\n");
ao2_ref(locals, -1);
[... 3793 lines stripped ...]
More information about the asterisk-commits
mailing list