removed CC_NEW_CODEC_FORMATS, because it is not used in any
asterisk version and breaks compilation anyway.
This commit is contained in:
parent
68686fc241
commit
c522111bf3
23
chan_capi.c
23
chan_capi.c
|
@ -1925,12 +1925,7 @@ static struct ast_channel *capi_new(struct capi_pvt *i, int state)
|
||||||
CC_CHANNEL_PVT(tmp) = i;
|
CC_CHANNEL_PVT(tmp) = i;
|
||||||
|
|
||||||
tmp->callgroup = i->callgroup;
|
tmp->callgroup = i->callgroup;
|
||||||
#ifndef CC_NEW_CODEC_FORMATS
|
|
||||||
tmp->nativeformats = capi_capability;
|
tmp->nativeformats = capi_capability;
|
||||||
#else
|
|
||||||
ast_codec_pref_init(&tmp->nativeformats);
|
|
||||||
ast_codec_pref_append(&tmp->nativeformats, capi_capability);
|
|
||||||
#endif
|
|
||||||
i->bproto = CC_BPROTO_TRANSPARENT;
|
i->bproto = CC_BPROTO_TRANSPARENT;
|
||||||
if ((i->rtpcodec = (capi_controllers[i->controller]->rtpcodec & i->capability))) {
|
if ((i->rtpcodec = (capi_controllers[i->controller]->rtpcodec & i->capability))) {
|
||||||
if (capi_alloc_rtp(i)) {
|
if (capi_alloc_rtp(i)) {
|
||||||
|
@ -1938,20 +1933,11 @@ static struct ast_channel *capi_new(struct capi_pvt *i, int state)
|
||||||
i->rtpcodec = 0;
|
i->rtpcodec = 0;
|
||||||
} else {
|
} else {
|
||||||
/* start with rtp */
|
/* start with rtp */
|
||||||
#ifndef CC_NEW_CODEC_FORMATS
|
|
||||||
tmp->nativeformats = i->rtpcodec;
|
tmp->nativeformats = i->rtpcodec;
|
||||||
#else
|
|
||||||
ast_codec_pref_init(&tmp->nativeformats);
|
|
||||||
ast_codec_pref_append(&tmp->nativeformats, i->rtpcodec);
|
|
||||||
#endif
|
|
||||||
i->bproto = CC_BPROTO_RTP;
|
i->bproto = CC_BPROTO_RTP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef CC_NEW_CODEC_FORMATS
|
|
||||||
fmt = ast_best_codec(tmp->nativeformats);
|
fmt = ast_best_codec(tmp->nativeformats);
|
||||||
#else
|
|
||||||
fmt = ast_best_codec(tmp->nativeformats.bits);
|
|
||||||
#endif
|
|
||||||
i->codec = fmt;
|
i->codec = fmt;
|
||||||
tmp->readformat = fmt;
|
tmp->readformat = fmt;
|
||||||
tmp->writeformat = fmt;
|
tmp->writeformat = fmt;
|
||||||
|
@ -1976,11 +1962,7 @@ static struct ast_channel *capi_new(struct capi_pvt *i, int state)
|
||||||
cc_verbose(3, 1, VERBOSE_PREFIX_2 "%s: setting format %s - %s%s\n",
|
cc_verbose(3, 1, VERBOSE_PREFIX_2 "%s: setting format %s - %s%s\n",
|
||||||
i->name, ast_getformatname(fmt),
|
i->name, ast_getformatname(fmt),
|
||||||
ast_getformatname_multiple(alloca(80), 80,
|
ast_getformatname_multiple(alloca(80), 80,
|
||||||
#ifndef CC_NEW_CODEC_FORMATS
|
|
||||||
tmp->nativeformats),
|
tmp->nativeformats),
|
||||||
#else
|
|
||||||
tmp->nativeformats.bits),
|
|
||||||
#endif
|
|
||||||
(i->rtp) ? " (RTP)" : "");
|
(i->rtp) ? " (RTP)" : "");
|
||||||
cc_copy_string(tmp->context, i->context, sizeof(tmp->context));
|
cc_copy_string(tmp->context, i->context, sizeof(tmp->context));
|
||||||
#ifdef CC_AST_CHANNEL_HAS_CID
|
#ifdef CC_AST_CHANNEL_HAS_CID
|
||||||
|
@ -2038,16 +2020,11 @@ static struct ast_channel *capi_new(struct capi_pvt *i, int state)
|
||||||
*/
|
*/
|
||||||
static struct ast_channel *
|
static struct ast_channel *
|
||||||
|
|
||||||
#ifndef CC_NEW_CODEC_FORMATS
|
|
||||||
#ifdef CC_AST_HAVE_TECH_PVT
|
#ifdef CC_AST_HAVE_TECH_PVT
|
||||||
capi_request(const char *type, int format, void *data, int *cause)
|
capi_request(const char *type, int format, void *data, int *cause)
|
||||||
#else
|
#else
|
||||||
capi_request(char *type, int format, void *data)
|
capi_request(char *type, int format, void *data)
|
||||||
#endif
|
#endif
|
||||||
#else
|
|
||||||
capi_request(const char *type, const struct ast_codec_pref *formats,
|
|
||||||
void *data, int *cause)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
struct capi_pvt *i;
|
struct capi_pvt *i;
|
||||||
struct ast_channel *tmp = NULL;
|
struct ast_channel *tmp = NULL;
|
||||||
|
|
|
@ -34,14 +34,6 @@ echo "#ifndef CHAN_CAPI_CONFIG_H" >>$CONFIGFILE
|
||||||
echo "#define CHAN_CAPI_CONFIG_H" >>$CONFIGFILE
|
echo "#define CHAN_CAPI_CONFIG_H" >>$CONFIGFILE
|
||||||
echo >>$CONFIGFILE
|
echo >>$CONFIGFILE
|
||||||
|
|
||||||
if grep -q "struct ast_codec_pref" $INCLUDEDIR/channel.h; then
|
|
||||||
echo "#define CC_NEW_CODEC_FORMATS" >>$CONFIGFILE
|
|
||||||
echo " * found 'struct ast_codec_pref'"
|
|
||||||
else
|
|
||||||
echo "#undef CC_NEW_CODEC_FORMATS" >>$CONFIGFILE
|
|
||||||
echo " * no 'struct ast_codec_pref'"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if grep -q "struct ast_channel_tech" $INCLUDEDIR/channel.h; then
|
if grep -q "struct ast_channel_tech" $INCLUDEDIR/channel.h; then
|
||||||
echo "#define CC_AST_HAVE_TECH_PVT" >>$CONFIGFILE
|
echo "#define CC_AST_HAVE_TECH_PVT" >>$CONFIGFILE
|
||||||
echo " * found 'struct ast_channel_tech'"
|
echo " * found 'struct ast_channel_tech'"
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
#define ASTERISKVERSION OPBX_VERSION_INFO
|
#define ASTERISKVERSION OPBX_VERSION_INFO
|
||||||
|
|
||||||
#define CC_AST_HAS_TYPE_IN_CHANNEL
|
#define CC_AST_HAS_TYPE_IN_CHANNEL
|
||||||
#undef CC_NEW_CODEC_FORMATS
|
|
||||||
#undef CC_AST_HAS_STRINGFIELD_IN_CHANNEL
|
#undef CC_AST_HAS_STRINGFIELD_IN_CHANNEL
|
||||||
#define CC_AST_HAVE_TECH_PVT
|
#define CC_AST_HAVE_TECH_PVT
|
||||||
#define CC_AST_HAS_BRIDGE_RESULT
|
#define CC_AST_HAS_BRIDGE_RESULT
|
||||||
|
|
Loading…
Reference in New Issue