mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Missed these two channel drivers on the codec_bits merge
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@228616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -71,7 +71,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
#define DEVICE_FRAME_FORMAT AST_FORMAT_SLINEAR
|
#define DEVICE_FRAME_FORMAT AST_FORMAT_SLINEAR
|
||||||
#define CHANNEL_FRAME_SIZE 320
|
#define CHANNEL_FRAME_SIZE 320
|
||||||
|
|
||||||
static int prefformat = DEVICE_FRAME_FORMAT;
|
static format_t prefformat = DEVICE_FRAME_FORMAT;
|
||||||
|
|
||||||
static int discovery_interval = 60; /* The device discovery interval, default 60 seconds. */
|
static int discovery_interval = 60; /* The device discovery interval, default 60 seconds. */
|
||||||
static pthread_t discovery_thread = AST_PTHREADT_NULL; /* The discovery thread */
|
static pthread_t discovery_thread = AST_PTHREADT_NULL; /* The discovery thread */
|
||||||
@@ -196,7 +196,7 @@ static char *mblsendsms_desc =
|
|||||||
|
|
||||||
static struct ast_channel *mbl_new(int state, struct mbl_pvt *pvt, char *cid_num,
|
static struct ast_channel *mbl_new(int state, struct mbl_pvt *pvt, char *cid_num,
|
||||||
const struct ast_channel *requestor);
|
const struct ast_channel *requestor);
|
||||||
static struct ast_channel *mbl_request(const char *type, int format,
|
static struct ast_channel *mbl_request(const char *type, format_t format,
|
||||||
const struct ast_channel *requestor, void *data, int *cause);
|
const struct ast_channel *requestor, void *data, int *cause);
|
||||||
static int mbl_call(struct ast_channel *ast, char *dest, int timeout);
|
static int mbl_call(struct ast_channel *ast, char *dest, int timeout);
|
||||||
static int mbl_hangup(struct ast_channel *ast);
|
static int mbl_hangup(struct ast_channel *ast);
|
||||||
@@ -862,7 +862,7 @@ e_return:
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct ast_channel *mbl_request(const char *type, int format,
|
static struct ast_channel *mbl_request(const char *type, format_t format,
|
||||||
const struct ast_channel *requestor, void *data, int *cause)
|
const struct ast_channel *requestor, void *data, int *cause)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -870,7 +870,8 @@ static struct ast_channel *mbl_request(const char *type, int format,
|
|||||||
struct mbl_pvt *pvt;
|
struct mbl_pvt *pvt;
|
||||||
char *dest_dev = NULL;
|
char *dest_dev = NULL;
|
||||||
char *dest_num = NULL;
|
char *dest_num = NULL;
|
||||||
int oldformat, group = -1;
|
format_t oldformat;
|
||||||
|
int group = -1;
|
||||||
|
|
||||||
if (!data) {
|
if (!data) {
|
||||||
ast_log(LOG_WARNING, "Channel requested with no data\n");
|
ast_log(LOG_WARNING, "Channel requested with no data\n");
|
||||||
@@ -881,7 +882,7 @@ static struct ast_channel *mbl_request(const char *type, int format,
|
|||||||
oldformat = format;
|
oldformat = format;
|
||||||
format &= (AST_FORMAT_SLINEAR);
|
format &= (AST_FORMAT_SLINEAR);
|
||||||
if (!format) {
|
if (!format) {
|
||||||
ast_log(LOG_WARNING, "Asked to get a channel of unsupported format '%d'\n", oldformat);
|
ast_log(LOG_WARNING, "Asked to get a channel of unsupported format '%s'\n", ast_getformatname(oldformat));
|
||||||
*cause = AST_CAUSE_FACILITY_NOT_IMPLEMENTED;
|
*cause = AST_CAUSE_FACILITY_NOT_IMPLEMENTED;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1089,7 +1090,7 @@ static struct ast_frame *mbl_read(struct ast_channel *ast)
|
|||||||
|
|
||||||
memset(&pvt->fr, 0x00, sizeof(struct ast_frame));
|
memset(&pvt->fr, 0x00, sizeof(struct ast_frame));
|
||||||
pvt->fr.frametype = AST_FRAME_VOICE;
|
pvt->fr.frametype = AST_FRAME_VOICE;
|
||||||
pvt->fr.subclass = DEVICE_FRAME_FORMAT;
|
pvt->fr.subclass.codec = DEVICE_FRAME_FORMAT;
|
||||||
pvt->fr.src = "Mobile";
|
pvt->fr.src = "Mobile";
|
||||||
pvt->fr.offset = AST_FRIENDLY_OFFSET;
|
pvt->fr.offset = AST_FRIENDLY_OFFSET;
|
||||||
pvt->fr.mallocd = 0;
|
pvt->fr.mallocd = 0;
|
||||||
|
@@ -50,7 +50,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
|||||||
static const char tdesc[] = "Network Broadcast Sound Driver";
|
static const char tdesc[] = "Network Broadcast Sound Driver";
|
||||||
|
|
||||||
/* Only linear is allowed */
|
/* Only linear is allowed */
|
||||||
static int prefformat = AST_FORMAT_SLINEAR;
|
static format_t prefformat = AST_FORMAT_SLINEAR;
|
||||||
|
|
||||||
static char context[AST_MAX_EXTENSION] = "default";
|
static char context[AST_MAX_EXTENSION] = "default";
|
||||||
static const char type[] = "NBS";
|
static const char type[] = "NBS";
|
||||||
@@ -66,7 +66,7 @@ struct nbs_pvt {
|
|||||||
struct ast_module_user *u; /*! for holding a reference to this module */
|
struct ast_module_user *u; /*! for holding a reference to this module */
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ast_channel *nbs_request(const char *type, int format, const struct ast_channel *requestor, void *data, int *cause);
|
static struct ast_channel *nbs_request(const char *type, format_t format, const struct ast_channel *requestor, void *data, int *cause);
|
||||||
static int nbs_call(struct ast_channel *ast, char *dest, int timeout);
|
static int nbs_call(struct ast_channel *ast, char *dest, int timeout);
|
||||||
static int nbs_hangup(struct ast_channel *ast);
|
static int nbs_hangup(struct ast_channel *ast);
|
||||||
static struct ast_frame *nbs_xread(struct ast_channel *ast);
|
static struct ast_frame *nbs_xread(struct ast_channel *ast);
|
||||||
@@ -205,9 +205,9 @@ static int nbs_xwrite(struct ast_channel *ast, struct ast_frame *frame)
|
|||||||
ast_log(LOG_WARNING, "Don't know what to do with frame type '%d'\n", frame->frametype);
|
ast_log(LOG_WARNING, "Don't know what to do with frame type '%d'\n", frame->frametype);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (!(frame->subclass &
|
if (!(frame->subclass.codec &
|
||||||
(AST_FORMAT_SLINEAR))) {
|
(AST_FORMAT_SLINEAR))) {
|
||||||
ast_log(LOG_WARNING, "Cannot handle frames in %d format\n", frame->subclass);
|
ast_log(LOG_WARNING, "Cannot handle frames in %s format\n", ast_getformatname(frame->subclass.codec));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (ast->_state != AST_STATE_UP) {
|
if (ast->_state != AST_STATE_UP) {
|
||||||
@@ -251,16 +251,16 @@ static struct ast_channel *nbs_new(struct nbs_pvt *i, int state, const char *lin
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static struct ast_channel *nbs_request(const char *type, int format, const struct ast_channel *requestor, void *data, int *cause)
|
static struct ast_channel *nbs_request(const char *type, format_t format, const struct ast_channel *requestor, void *data, int *cause)
|
||||||
{
|
{
|
||||||
int oldformat;
|
format_t oldformat;
|
||||||
struct nbs_pvt *p;
|
struct nbs_pvt *p;
|
||||||
struct ast_channel *tmp = NULL;
|
struct ast_channel *tmp = NULL;
|
||||||
|
|
||||||
oldformat = format;
|
oldformat = format;
|
||||||
format &= (AST_FORMAT_SLINEAR);
|
format &= (AST_FORMAT_SLINEAR);
|
||||||
if (!format) {
|
if (!format) {
|
||||||
ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format '%d'\n", oldformat);
|
ast_log(LOG_NOTICE, "Asked to get a channel of unsupported format '%s'\n", ast_getformatname(oldformat));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
p = nbs_alloc(data);
|
p = nbs_alloc(data);
|
||||||
|
Reference in New Issue
Block a user