mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 11:58:40 +00:00
Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -87,6 +87,17 @@ static struct ast_translator ulawtolin = {
|
||||
.plc_samples = 160,
|
||||
};
|
||||
|
||||
static struct ast_translator testlawtolin = {
|
||||
.name = "testlawtolin",
|
||||
.srcfmt = AST_FORMAT_TESTLAW,
|
||||
.dstfmt = AST_FORMAT_SLINEAR,
|
||||
.framein = ulawtolin_framein,
|
||||
.sample = ulaw_sample,
|
||||
.buffer_samples = BUFFER_SAMPLES,
|
||||
.buf_size = BUFFER_SAMPLES * 2,
|
||||
.plc_samples = 160,
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief The complete translator for LinToulaw.
|
||||
*/
|
||||
@@ -101,6 +112,16 @@ static struct ast_translator lintoulaw = {
|
||||
.buffer_samples = BUFFER_SAMPLES,
|
||||
};
|
||||
|
||||
static struct ast_translator lintotestlaw = {
|
||||
.name = "lintotestlaw",
|
||||
.srcfmt = AST_FORMAT_SLINEAR,
|
||||
.dstfmt = AST_FORMAT_TESTLAW,
|
||||
.framein = lintoulaw_framein,
|
||||
.sample = slin8_sample,
|
||||
.buf_size = BUFFER_SAMPLES,
|
||||
.buffer_samples = BUFFER_SAMPLES,
|
||||
};
|
||||
|
||||
static int parse_config(int reload)
|
||||
{
|
||||
struct ast_variable *var;
|
||||
@@ -131,6 +152,8 @@ static int unload_module(void)
|
||||
|
||||
res = ast_unregister_translator(&lintoulaw);
|
||||
res |= ast_unregister_translator(&ulawtolin);
|
||||
res |= ast_unregister_translator(&testlawtolin);
|
||||
res |= ast_unregister_translator(&lintotestlaw);
|
||||
|
||||
return res;
|
||||
}
|
||||
@@ -142,9 +165,11 @@ static int load_module(void)
|
||||
if (parse_config(0))
|
||||
return AST_MODULE_LOAD_DECLINE;
|
||||
res = ast_register_translator(&ulawtolin);
|
||||
if (!res)
|
||||
if (!res) {
|
||||
res = ast_register_translator(&lintoulaw);
|
||||
else
|
||||
res |= ast_register_translator(&lintotestlaw);
|
||||
res |= ast_register_translator(&testlawtolin);
|
||||
} else
|
||||
ast_unregister_translator(&ulawtolin);
|
||||
if (res)
|
||||
return AST_MODULE_LOAD_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user