enum ast_format_id ast_format_id_from_old_bitfield(uint64_t src) { struct ast_format dst; if (ast_format_from_old_bitfield(&dst, src)) { return dst.id; } return 0; }
void ast_format_cap_from_old_bitfield(struct ast_format_cap *dst, uint64_t src) { uint64_t tmp = 0; int x; struct ast_format tmp_format = { 0, }; ast_format_cap_remove_all(dst); for (x = 0; x < 64; x++) { tmp = (1ULL << x); if (tmp & src) { ast_format_cap_add(dst, ast_format_from_old_bitfield(&tmp_format, tmp)); } } }