|
|
@ -219,7 +219,6 @@ static void zap_destroy(struct ast_trans_pvt *pvt)
|
|
|
|
if (ioctl(ztp->fd, ZT_TRANSCODE_OP, &x))
|
|
|
|
if (ioctl(ztp->fd, ZT_TRANSCODE_OP, &x))
|
|
|
|
ast_log(LOG_WARNING, "Failed to release transcoder channel: %s\n", strerror(errno));
|
|
|
|
ast_log(LOG_WARNING, "Failed to release transcoder channel: %s\n", strerror(errno));
|
|
|
|
|
|
|
|
|
|
|
|
ast_atomic_fetchadd_int(&channels.total, -1);
|
|
|
|
|
|
|
|
switch (ztp->hdr->dstfmt) {
|
|
|
|
switch (ztp->hdr->dstfmt) {
|
|
|
|
case AST_FORMAT_G729A:
|
|
|
|
case AST_FORMAT_G729A:
|
|
|
|
case AST_FORMAT_G723_1:
|
|
|
|
case AST_FORMAT_G723_1:
|
|
|
@ -281,7 +280,6 @@ static int zap_translate(struct ast_trans_pvt *pvt, int dest, int source)
|
|
|
|
ztp->fd = fd;
|
|
|
|
ztp->fd = fd;
|
|
|
|
ztp->hdr = hdr;
|
|
|
|
ztp->hdr = hdr;
|
|
|
|
|
|
|
|
|
|
|
|
ast_atomic_fetchadd_int(&channels.total, +1);
|
|
|
|
|
|
|
|
switch (hdr->dstfmt) {
|
|
|
|
switch (hdr->dstfmt) {
|
|
|
|
case AST_FORMAT_G729A:
|
|
|
|
case AST_FORMAT_G729A:
|
|
|
|
case AST_FORMAT_G723_1:
|
|
|
|
case AST_FORMAT_G723_1:
|
|
|
@ -438,6 +436,7 @@ static int find_transcoders(void)
|
|
|
|
for (info.tcnum = 0; !(res = ioctl(fd, ZT_TRANSCODE_OP, &info)); info.tcnum++) {
|
|
|
|
for (info.tcnum = 0; !(res = ioctl(fd, ZT_TRANSCODE_OP, &info)); info.tcnum++) {
|
|
|
|
ast_verb(2, "Found transcoder '%s'.\n", info.name);
|
|
|
|
ast_verb(2, "Found transcoder '%s'.\n", info.name);
|
|
|
|
build_translators(&map, info.dstfmts, info.srcfmts);
|
|
|
|
build_translators(&map, info.dstfmts, info.srcfmts);
|
|
|
|
|
|
|
|
ast_atomic_fetchadd_int(&channels.total, info.numchannels / 2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
close(fd);
|
|
|
|
close(fd);
|
|
|
|
|
|
|
|
|
|
|
|