[asterisk-commits] branch oej/codecnegotiation r15320 - in
/team/oej/codecnegotiation: ./ channe...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Mar 27 14:36:08 MST 2006
Author: oej
Date: Mon Mar 27 15:36:05 2006
New Revision: 15320
URL: http://svn.digium.com/view/asterisk?rev=15320&view=rev
Log:
Update
Modified:
team/oej/codecnegotiation/README.codecnegotiation-branch
team/oej/codecnegotiation/app.c
team/oej/codecnegotiation/channel.c
team/oej/codecnegotiation/channels/chan_h323.c
team/oej/codecnegotiation/cli.c
team/oej/codecnegotiation/include/asterisk/channel.h
team/oej/codecnegotiation/pbx.c
team/oej/codecnegotiation/res/res_adsi.c
team/oej/codecnegotiation/res/res_agi.c
team/oej/codecnegotiation/res/res_features.c
Modified: team/oej/codecnegotiation/README.codecnegotiation-branch
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/README.codecnegotiation-branch?rev=15320&r1=15319&r2=15320&view=diff
==============================================================================
--- team/oej/codecnegotiation/README.codecnegotiation-branch (original)
+++ team/oej/codecnegotiation/README.codecnegotiation-branch Mon Mar 27 15:36:05 2006
@@ -44,4 +44,4 @@
Discussions are best done on the asterisk-dev mailing list.
-Bugs are reported to the bug tracker, issue #4825
+Bugs are reported to the bug tracker, issue #6725
Modified: team/oej/codecnegotiation/app.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/app.c?rev=15320&r1=15319&r2=15320&view=diff
==============================================================================
--- team/oej/codecnegotiation/app.c (original)
+++ team/oej/codecnegotiation/app.c Mon Mar 27 15:36:05 2006
@@ -166,7 +166,7 @@
if (res < 0)
return res;
}
- rfmt = c->readformat;
+ rfmt = ast_get_read_format(c);
res = ast_set_read_format(c, AST_FORMAT_SLINEAR);
if (res < 0) {
ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n");
@@ -621,7 +621,7 @@
return -1;
}
ast_dsp_set_threshold(sildet, silencethreshold);
- rfmt = chan->readformat;
+ rfmt = ast_get_read_format(chan);
res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
if (res < 0) {
ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n");
@@ -848,7 +848,7 @@
ast_dsp_set_threshold(sildet, silencethreshold);
if (maxsilence > 0) {
- rfmt = chan->readformat;
+ rfmt = ast_get_read_format(chan);
res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
if (res < 0) {
ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n");
Modified: team/oej/codecnegotiation/channel.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/channel.c?rev=15320&r1=15319&r2=15320&view=diff
==============================================================================
--- team/oej/codecnegotiation/channel.c (original)
+++ team/oej/codecnegotiation/channel.c Mon Mar 27 15:36:05 2006
@@ -2912,8 +2912,8 @@
void *t_pvt;
struct ast_callerid tmpcid;
struct ast_channel *clone = original->masq;
- int rformat = original->readformat;
- int wformat = original->writeformat;
+ int rformat = ast_get_read_format(original);
+ int wformat = ast_get_write_format(original);
char newn[100];
char orig[100];
char masqn[100];
@@ -3556,7 +3556,8 @@
}
}
- if (((c0->writeformat != c1->readformat) || (c0->readformat != c1->writeformat) ||
+ if (((ast_get_write_format(c0) != ast_get_read_format(c1)) ||
+ (ast_get_read_format(c0) != ast_get_write_format(c1)) ||
(c0->nativeformats != o0nativeformats) || (c1->nativeformats != o1nativeformats)) &&
!(c0->generator || c1->generator)) {
if (ast_channel_make_compatible(c0, c1)) {
Modified: team/oej/codecnegotiation/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/channels/chan_h323.c?rev=15320&r1=15319&r2=15320&view=diff
==============================================================================
--- team/oej/codecnegotiation/channels/chan_h323.c (original)
+++ team/oej/codecnegotiation/channels/chan_h323.c Mon Mar 27 15:36:05 2006
@@ -232,8 +232,8 @@
if (h323debug)
ast_log(LOG_DEBUG, "Preparing %s for new native format\n", c->name);
c->nativeformats = pvt->nativeformats;
- ast_set_read_format(c, c->readformat);
- ast_set_write_format(c, c->writeformat);
+ ast_set_read_format(c, ast_get_read_format(c));
+ ast_set_write_format(c, ast_get_write_format(c));
}
if (pvt->needhangup) {
if (h323debug)
@@ -567,8 +567,8 @@
ast_log(LOG_DEBUG, "Oooh, format changed to %d\n", f->subclass);
pvt->owner->nativeformats = f->subclass;
pvt->nativeformats = f->subclass;
- ast_set_read_format(pvt->owner, pvt->owner->readformat);
- ast_set_write_format(pvt->owner, pvt->owner->writeformat);
+ ast_set_read_format(pvt->owner, ast_get_read_format(pvt->owner));
+ ast_set_write_format(pvt->owner, ast_get_write_format(pvt->owner));
ast_mutex_unlock(&pvt->owner->lock);
}
/* Do in-band DTMF detection */
@@ -613,7 +613,7 @@
} else {
if (!(frame->subclass & c->nativeformats)) {
ast_log(LOG_WARNING, "Asked to transmit frame type %d, while native formats is %d (read/write = %d/%d)\n",
- frame->subclass, c->nativeformats, c->readformat, c->writeformat);
+ frame->subclass, c->nativeformats, ast_get_read_format(c), ast_get_write_format(c));
return 0;
}
}
@@ -1201,8 +1201,8 @@
pvt->nativeformats = rtptype.code;
if (pvt->owner && !ast_mutex_trylock(&pvt->owner->lock)) {
pvt->owner->nativeformats = pvt->nativeformats;
- ast_set_read_format(pvt->owner, pvt->owner->readformat);
- ast_set_write_format(pvt->owner, pvt->owner->writeformat);
+ ast_set_read_format(pvt->owner, ast_get_read_format(pvt->owner));
+ ast_set_write_format(pvt->owner, ast_get_write_format(pvt->owner));
if (pvt->options.progress_audio)
ast_queue_control(pvt->owner, AST_CONTROL_PROGRESS);
ast_mutex_unlock(&pvt->owner->lock);
Modified: team/oej/codecnegotiation/cli.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/cli.c?rev=15320&r1=15319&r2=15320&view=diff
==============================================================================
--- team/oej/codecnegotiation/cli.c (original)
+++ team/oej/codecnegotiation/cli.c Mon Mar 27 15:36:05 2006
@@ -740,8 +740,8 @@
(c->cid.cid_name ? c->cid.cid_name : "(N/A)"),
(c->cid.cid_dnid ? c->cid.cid_dnid : "(N/A)" ), ast_state2str(c->_state), c->_state, c->rings,
ast_getformatname_multiple(nf, sizeof(nf), c->nativeformats),
- ast_getformatname_multiple(wf, sizeof(wf), c->writeformat),
- ast_getformatname_multiple(rf, sizeof(rf), c->readformat),
+ ast_getformatname_multiple(wf, sizeof(wf), ast_get_write_format(c)),
+ ast_getformatname_multiple(rf, sizeof(rf), ast_get_read_format(c)),
c->fds[0], c->fin & 0x7fffffff, (c->fin & 0x80000000) ? " (DEBUGGED)" : "",
c->fout & 0x7fffffff, (c->fout & 0x80000000) ? " (DEBUGGED)" : "", (long)c->whentohangup,
cdrtime, c->_bridge ? c->_bridge->name : "<none>", ast_bridged_channel(c) ? ast_bridged_channel(c)->name : "<none>",
Modified: team/oej/codecnegotiation/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/include/asterisk/channel.h?rev=15320&r1=15319&r2=15320&view=diff
==============================================================================
--- team/oej/codecnegotiation/include/asterisk/channel.h (original)
+++ team/oej/codecnegotiation/include/asterisk/channel.h Mon Mar 27 15:36:05 2006
@@ -804,8 +804,7 @@
*/
int ast_set_read_format(struct ast_channel *chan, int format);
-/*! Gets read format from channel chan */
-/*!
+/*! \brief Gets read format from channel chan
* \param chan channel to get info
* Get read format for channel
* Returns read format
Modified: team/oej/codecnegotiation/pbx.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/pbx.c?rev=15320&r1=15319&r2=15320&view=diff
==============================================================================
--- team/oej/codecnegotiation/pbx.c (original)
+++ team/oej/codecnegotiation/pbx.c Mon Mar 27 15:36:05 2006
@@ -4300,8 +4300,8 @@
ast_string_field_build(tmpchan, name, "AsyncGoto/%s", chan->name);
ast_setstate(tmpchan, chan->_state);
/* Make formats okay */
- tmpchan->readformat = chan->readformat;
- tmpchan->writeformat = chan->writeformat;
+ tmpchan->readformat = ast_get_read_format(chan);
+ tmpchan->writeformat = ast_get_write_format(chan);
/* Setup proper location */
ast_explicit_goto(tmpchan,
(!ast_strlen_zero(context)) ? context : chan->context,
Modified: team/oej/codecnegotiation/res/res_adsi.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/res/res_adsi.c?rev=15320&r1=15319&r2=15320&view=diff
==============================================================================
--- team/oej/codecnegotiation/res/res_adsi.c (original)
+++ team/oej/codecnegotiation/res/res_adsi.c Mon Mar 27 15:36:05 2006
@@ -360,8 +360,8 @@
int writeformat, readformat;
int waitforswitch = 0;
- writeformat = chan->writeformat;
- readformat = chan->readformat;
+ writeformat = ast_get_write_format(chan);
+ readformat = ast_get_read_format(chan);
newdatamode = chan->adsicpe & ADSI_FLAG_DATAMODE;
Modified: team/oej/codecnegotiation/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/res/res_agi.c?rev=15320&r1=15319&r2=15320&view=diff
==============================================================================
--- team/oej/codecnegotiation/res/res_agi.c (original)
+++ team/oej/codecnegotiation/res/res_agi.c Mon Mar 27 15:36:05 2006
@@ -908,7 +908,7 @@
}
if (silence > 0) {
- rfmt = chan->readformat;
+ rfmt = ast_get_read_format(chan);
res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
if (res < 0) {
ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n");
@@ -2045,7 +2045,7 @@
if (chan->_softhangup)
ast_log(LOG_WARNING, "If you want to run AGI on hungup channels you should use DeadAGI!\n");
- readformat = chan->readformat;
+ readformat = ast_get_read_format(chan);
if (ast_set_read_format(chan, AST_FORMAT_SLINEAR)) {
ast_log(LOG_WARNING, "Unable to set channel '%s' to linear mode\n", chan->name);
return -1;
Modified: team/oej/codecnegotiation/res/res_features.c
URL: http://svn.digium.com/view/asterisk/team/oej/codecnegotiation/res/res_features.c?rev=15320&r1=15319&r2=15320&view=diff
==============================================================================
--- team/oej/codecnegotiation/res/res_features.c (original)
+++ team/oej/codecnegotiation/res/res_features.c Mon Mar 27 15:36:05 2006
@@ -174,8 +174,8 @@
*x = '|';
ast_string_field_set(xferchan, name, chan->name);
/* Make formats okay */
- xferchan->readformat = chan->readformat;
- xferchan->writeformat = chan->writeformat;
+ xferchan->readformat = ast_get_read_format(chan);
+ xferchan->writeformat = ast_get_write_format(chan);
ast_channel_masquerade(xferchan, chan);
ast_parseable_goto(xferchan, goto_on_transfer);
xferchan->_state = AST_STATE_UP;
@@ -386,8 +386,8 @@
ast_string_field_build(chan, name, "Parked/%s",rchan->name);
/* Make formats okay */
- chan->readformat = rchan->readformat;
- chan->writeformat = rchan->writeformat;
+ chan->readformat = ast_get_read_format(rchan);
+ chan->writeformat = ast_get_write_format(rchan);
ast_channel_masquerade(chan, rchan);
/* Setup the extensions and such */
@@ -758,8 +758,8 @@
if ((xferchan = ast_channel_alloc(0))) {
ast_string_field_build(xferchan, name, "Transfered/%s", transferee->name);
/* Make formats okay */
- xferchan->readformat = transferee->readformat;
- xferchan->writeformat = transferee->writeformat;
+ xferchan->readformat = ast_get_read_format(transferee);
+ xferchan->writeformat = ast_get_write_format(transferee);
ast_channel_masquerade(xferchan, transferee);
ast_explicit_goto(xferchan, transferee->context, transferee->exten, transferee->priority);
xferchan->_state = AST_STATE_UP;
More information about the asterisk-commits
mailing list