26 #ifndef _IAX2_CODEC_PREF_H_ 27 #define _IAX2_CODEC_PREF_H_ 33 #define IAX2_CODEC_PREF_SIZE 64 126 int only_if_existing);
int iax2_codec_pref_best_bitfield2cap(uint64_t bitfield, struct iax2_codec_pref *prefs, struct ast_format_cap *cap)
Convert a bitfield to a format capabilities structure in the "best" order.
#define IAX2_CODEC_PREF_SIZE
void iax2_codec_pref_append(struct iax2_codec_pref *pref, struct ast_format *format, unsigned int framing)
Append a audio codec to a preference list, removing it first if it was already there.
uint64_t iax2_codec_pref_order_value_to_format_bitfield(int order_value)
Convert an iax2_codec_pref order value into a format bitfield.
void iax2_codec_pref_remove_missing(struct iax2_codec_pref *pref, uint64_t bitfield)
Removes format from the pref list that aren't in the bitfield.
int iax2_codec_pref_to_cap(struct iax2_codec_pref *pref, struct ast_format_cap *cap)
Convert a preference structure to a capabilities structure.
uint64_t iax2_codec_pref_from_bitfield(struct iax2_codec_pref *pref, uint64_t bitfield)
Create codec preference list from the given bitfield formats.
unsigned int framing[IAX2_CODEC_PREF_SIZE]
void iax2_codec_pref_convert(struct iax2_codec_pref *pref, char *buf, size_t size, int right)
Shift an audio codec preference list up or down 65 bytes so that it becomes an ASCII string...
char order[IAX2_CODEC_PREF_SIZE]
struct ast_format * iax2_codec_pref_index(struct iax2_codec_pref *pref, int index, struct ast_format **result)
Codec located at a particular place in the preference index.
int iax2_codec_pref_string(struct iax2_codec_pref *pref, char *buf, size_t size)
Dump audio codec preference list into a string.
static snd_pcm_format_t format
void iax2_codec_pref_prepend(struct iax2_codec_pref *pref, struct ast_format *format, unsigned int framing, int only_if_existing)
Prepend an audio codec to a preference list, removing it first if it was already there.
int iax2_codec_pref_format_bitfield_to_order_value(uint64_t bitfield)
Convert a format bitfield into an iax2_codec_pref order value.
Represents a media codec within Asterisk.