for (x=-1;x<SHOW_TRANS; x++) {
strcpy(line, " ");
for (y=-1;y<SHOW_TRANS;y++) {
- /* Skip MP3 (y = 4) as Destination format */
- if (y != 4 && x >= 0 && y >= 0 && tr_matrix[x][y].step)
- snprintf(line + strlen(line), sizeof(line) - strlen(line), " %6d", tr_matrix[x][y].cost);
+ if (x >= 0 && y >= 0 && tr_matrix[x][y].step)
+ snprintf(line + strlen(line), sizeof(line) - strlen(line), " %5d", tr_matrix[x][y].cost >= 99999 ? tr_matrix[x][y].cost-99999 : tr_matrix[x][y].cost);
else
- if ((y != 4) && ((x == -1 && y >= 0) || (y == -1 && x >= 0))) {
+ if (((x == -1 && y >= 0) || (y == -1 && x >= 0))) {
snprintf(line + strlen(line), sizeof(line) - strlen(line),
- " %6s", ast_getformatname(1<<(x+y+1)) );
- } else if (x != -1 && y != -1 && y != 4) {
- snprintf(line + strlen(line), sizeof(line) - strlen(line), " -");
- } else if (y != 4) {
- snprintf(line + strlen(line), sizeof(line) - strlen(line), " ");
+ " %5s", ast_getformatname(1<<(x+y+1)) );
+ } else if (x != -1 && y != -1) {
+ snprintf(line + strlen(line), sizeof(line) - strlen(line), " -");
+ } else {
+ snprintf(line + strlen(line), sizeof(line) - strlen(line), " ");
}
}
snprintf(line + strlen(line), sizeof(line) - strlen(line), "\n");
}
calc_cost(t);
if (option_verbose > 1)
- ast_verbose(VERBOSE_PREFIX_2 "Registered translator '%s' from format %s to %s, cost %d\n", term_color(tmp, t->name, COLOR_MAGENTA, COLOR_BLACK, sizeof(tmp)), ast_getformatname(t->srcfmt), ast_getformatname(t->dstfmt), t->cost);
+ ast_verbose(VERBOSE_PREFIX_2 "Registered translator '%s' from format %s to %s, cost %d\n", term_color(tmp, t->name, COLOR_MAGENTA, COLOR_BLACK, sizeof(tmp)), ast_getformatname(1 << t->srcfmt), ast_getformatname(1 << t->dstfmt), t->cost);
ast_mutex_lock(&list_lock);
if (!added_cli) {
ast_cli_register(&show_trans);