Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Media Format Bitfield Compatibility API. More...
Go to the source code of this file.
Macros | |
#define | AST_FORMAT_ADPCM (1ULL << 5) |
#define | AST_FORMAT_ALAW (1ULL << 3) |
#define | AST_FORMAT_G719 (1ULL << 32) |
#define | AST_FORMAT_G722 (1ULL << 12) |
#define | AST_FORMAT_G723 (1ULL << 0) |
#define | AST_FORMAT_G726 (1ULL << 11) |
#define | AST_FORMAT_G726_AAL2 (1ULL << 4) |
#define | AST_FORMAT_G729 (1ULL << 8) |
#define | AST_FORMAT_GSM (1ULL << 1) |
#define | AST_FORMAT_H261 (1ULL << 18) |
#define | AST_FORMAT_H263 (1ULL << 19) |
#define | AST_FORMAT_H263P (1ULL << 20) |
#define | AST_FORMAT_H264 (1ULL << 21) |
#define | AST_FORMAT_ILBC (1ULL << 10) |
#define | AST_FORMAT_JPEG (1ULL << 16) |
#define | AST_FORMAT_LPC10 (1ULL << 7) |
#define | AST_FORMAT_MP4 (1ULL << 22) |
#define | AST_FORMAT_OPUS (1ULL << 34) |
#define | AST_FORMAT_PNG (1ULL << 17) |
#define | AST_FORMAT_SIREN14 (1ULL << 14) |
#define | AST_FORMAT_SIREN7 (1ULL << 13) |
#define | AST_FORMAT_SLIN (1ULL << 6) |
#define | AST_FORMAT_SLIN16 (1ULL << 15) |
#define | AST_FORMAT_SPEEX (1ULL << 9) |
#define | AST_FORMAT_SPEEX16 (1ULL << 33) |
#define | AST_FORMAT_T140 (1ULL << 27) |
#define | AST_FORMAT_T140_RED (1ULL << 26) |
#define | AST_FORMAT_ULAW (1ULL << 2) |
#define | AST_FORMAT_VP8 (1ULL << 23) |
Functions | |
struct ast_format * | ast_format_compatibility_bitfield2format (uint64_t bitfield) |
Convert a bitfield to its respective format structure. More... | |
uint64_t | ast_format_compatibility_codec2bitfield (const struct ast_codec *codec) |
Convert a codec structure to its respective bitfield. More... | |
uint64_t | ast_format_compatibility_format2bitfield (const struct ast_format *format) |
Convert a format structure to its respective bitfield. More... | |
Media Format Bitfield Compatibility API.
Definition in file include/asterisk/format_compatibility.h.
#define AST_FORMAT_ADPCM (1ULL << 5) |
ADPCM (IMA)
Definition at line 47 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_ALAW (1ULL << 3) |
Raw A-law data (G.711)
Definition at line 43 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_G719 (1ULL << 32) |
G.719 (64 kbps assumed)
Definition at line 69 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_G722 (1ULL << 12) |
G.722
Definition at line 61 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_G723 (1ULL << 0) |
G.723.1 compression
Definition at line 37 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_G726 (1ULL << 11) |
ADPCM (G.726, 32kbps, RFC3551 codeword packing)
Definition at line 59 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_G726_AAL2 (1ULL << 4) |
ADPCM (G.726, 32kbps, AAL2 codeword packing)
Definition at line 45 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_G729 (1ULL << 8) |
G.729A audio
Definition at line 53 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_GSM (1ULL << 1) |
GSM compression
Definition at line 39 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_H261 (1ULL << 18) |
Raw testing-law data (G.711)
H.261 Video
Definition at line 77 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_H263 (1ULL << 19) |
H.263 Video
Definition at line 79 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_H263P (1ULL << 20) |
H.263+ Video
Definition at line 81 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_H264 (1ULL << 21) |
H.264 Video
Definition at line 83 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_ILBC (1ULL << 10) |
iLBC Free Compression
Definition at line 57 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_JPEG (1ULL << 16) |
JPEG Images
Definition at line 89 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_LPC10 (1ULL << 7) |
LPC10, 180 samples/frame
Definition at line 51 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_MP4 (1ULL << 22) |
MPEG4 Video
Definition at line 85 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_OPUS (1ULL << 34) |
Opus audio (8kHz, 16kHz, 24kHz, 48Khz)
Definition at line 73 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_PNG (1ULL << 17) |
PNG Images
Definition at line 91 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_SIREN14 (1ULL << 14) |
G.722.1 Annex C (also known as Siren14, 48kbps assumed)
Definition at line 65 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_SIREN7 (1ULL << 13) |
G.722.1 (also known as Siren7, 32kbps assumed)
Definition at line 63 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_SLIN (1ULL << 6) |
Raw 16-bit Signed Linear (8000 Hz) PCM
Definition at line 49 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_SLIN16 (1ULL << 15) |
Raw 16-bit Signed Linear (16000 Hz) PCM
Definition at line 67 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_SPEEX (1ULL << 9) |
SpeeX Free Compression
Definition at line 55 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_SPEEX16 (1ULL << 33) |
SpeeX Wideband (16kHz) Free Compression
Definition at line 71 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_T140 (1ULL << 27) |
T.140 Text format - ITU T.140, RFC 4103
Definition at line 95 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_T140_RED (1ULL << 26) |
T.140 RED Text format RFC 4103
Definition at line 93 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_ULAW (1ULL << 2) |
Raw mu-law data (G.711)
Definition at line 41 of file include/asterisk/format_compatibility.h.
#define AST_FORMAT_VP8 (1ULL << 23) |
VP8 Video
Definition at line 87 of file include/asterisk/format_compatibility.h.
struct ast_format * ast_format_compatibility_bitfield2format | ( | uint64_t | bitfield | ) |
Convert a bitfield to its respective format structure.
bitfield | The bitfield for the media format |
non-NULL | success |
NULL | failure (The format bitfield value is not supported) |
G.723.1 compression
GSM compression
Raw mu-law data (G.711)
Raw A-law data (G.711)
ADPCM (G.726, 32kbps, AAL2 codeword packing)
ADPCM (IMA)
Raw 16-bit Signed Linear (8000 Hz) PCM
LPC10, 180 samples/frame
G.729A audio
SpeeX Free Compression
iLBC Free Compression
ADPCM (G.726, 32kbps, RFC3551 codeword packing)
G.722
G.722.1 (also known as Siren7, 32kbps assumed)
G.722.1 Annex C (also known as Siren14, 48kbps assumed)
Raw 16-bit Signed Linear (16000 Hz) PCM
G.719 (64 kbps assumed)
SpeeX Wideband (16kHz) Free Compression
Opus audio (8kHz, 16kHz, 24kHz, 48Khz)
H.261 Video
H.263 Video
H.263+ Video
H.264 Video
MPEG4 Video
VP8 Video
JPEG Images
PNG Images
T.140 RED Text format RFC 4103
T.140 Text format - ITU T.140, RFC 4103
Definition at line 169 of file main/format_compatibility.c.
References ast_format_adpcm, AST_FORMAT_ADPCM, ast_format_alaw, AST_FORMAT_ALAW, ast_format_g719, AST_FORMAT_G719, ast_format_g722, AST_FORMAT_G722, ast_format_g723, AST_FORMAT_G723, ast_format_g726, AST_FORMAT_G726, ast_format_g726_aal2, AST_FORMAT_G726_AAL2, ast_format_g729, AST_FORMAT_G729, ast_format_gsm, AST_FORMAT_GSM, ast_format_h261, AST_FORMAT_H261, ast_format_h263, AST_FORMAT_H263, ast_format_h263p, AST_FORMAT_H263P, ast_format_h264, AST_FORMAT_H264, ast_format_ilbc, AST_FORMAT_ILBC, ast_format_jpeg, AST_FORMAT_JPEG, ast_format_lpc10, AST_FORMAT_LPC10, ast_format_mp4, AST_FORMAT_MP4, ast_format_opus, AST_FORMAT_OPUS, ast_format_png, AST_FORMAT_PNG, ast_format_siren14, AST_FORMAT_SIREN14, ast_format_siren7, AST_FORMAT_SIREN7, ast_format_slin, AST_FORMAT_SLIN, ast_format_slin16, AST_FORMAT_SLIN16, ast_format_speex, AST_FORMAT_SPEEX, ast_format_speex16, AST_FORMAT_SPEEX16, ast_format_t140, AST_FORMAT_T140, ast_format_t140_red, AST_FORMAT_T140_RED, ast_format_ulaw, AST_FORMAT_ULAW, ast_format_vp8, AST_FORMAT_VP8, and NULL.
Referenced by __get_from_jb(), codec_choose_from_prefs(), decode_frame(), iax2_codec_pref_best_bitfield2cap(), iax2_codec_pref_from_bitfield(), iax2_codec_pref_index(), iax2_codec_pref_to_cap(), iax2_format_compatibility_bitfield2cap(), iax2_getformatname(), iax2_send(), socket_process_helper(), and socket_process_meta().
uint64_t ast_format_compatibility_codec2bitfield | ( | const struct ast_codec * | codec | ) |
Convert a codec structure to its respective bitfield.
codec | The media codec |
non-zero | success |
zero | format not supported |
Definition at line 104 of file main/format_compatibility.c.
References ast_format_adpcm, AST_FORMAT_ADPCM, ast_format_alaw, AST_FORMAT_ALAW, ast_format_g719, AST_FORMAT_G719, ast_format_g722, AST_FORMAT_G722, ast_format_g723, AST_FORMAT_G723, ast_format_g726, AST_FORMAT_G726, ast_format_g726_aal2, AST_FORMAT_G726_AAL2, ast_format_g729, AST_FORMAT_G729, ast_format_get_codec_id(), ast_format_gsm, AST_FORMAT_GSM, ast_format_h261, AST_FORMAT_H261, ast_format_h263, AST_FORMAT_H263, ast_format_h263p, AST_FORMAT_H263P, ast_format_h264, AST_FORMAT_H264, ast_format_ilbc, AST_FORMAT_ILBC, ast_format_jpeg, AST_FORMAT_JPEG, ast_format_lpc10, AST_FORMAT_LPC10, ast_format_mp4, AST_FORMAT_MP4, ast_format_opus, AST_FORMAT_OPUS, ast_format_png, AST_FORMAT_PNG, ast_format_siren14, AST_FORMAT_SIREN14, ast_format_siren7, AST_FORMAT_SIREN7, ast_format_slin, AST_FORMAT_SLIN, ast_format_slin16, AST_FORMAT_SLIN16, ast_format_speex, AST_FORMAT_SPEEX, ast_format_speex16, AST_FORMAT_SPEEX16, ast_format_t140, AST_FORMAT_T140, ast_format_t140_red, AST_FORMAT_T140_RED, ast_format_ulaw, AST_FORMAT_ULAW, ast_format_vp8, AST_FORMAT_VP8, and ast_codec::id.
uint64_t ast_format_compatibility_format2bitfield | ( | const struct ast_format * | format | ) |
Convert a format structure to its respective bitfield.
format | The media format |
non-zero | success |
zero | format not supported |
Definition at line 39 of file main/format_compatibility.c.
References ast_format_adpcm, AST_FORMAT_ADPCM, ast_format_alaw, AST_FORMAT_ALAW, ast_format_cmp(), AST_FORMAT_CMP_EQUAL, ast_format_g719, AST_FORMAT_G719, ast_format_g722, AST_FORMAT_G722, ast_format_g723, AST_FORMAT_G723, ast_format_g726, AST_FORMAT_G726, ast_format_g726_aal2, AST_FORMAT_G726_AAL2, ast_format_g729, AST_FORMAT_G729, ast_format_gsm, AST_FORMAT_GSM, ast_format_h261, AST_FORMAT_H261, ast_format_h263, AST_FORMAT_H263, ast_format_h263p, AST_FORMAT_H263P, ast_format_h264, AST_FORMAT_H264, ast_format_ilbc, AST_FORMAT_ILBC, ast_format_jpeg, AST_FORMAT_JPEG, ast_format_lpc10, AST_FORMAT_LPC10, ast_format_mp4, AST_FORMAT_MP4, ast_format_opus, AST_FORMAT_OPUS, ast_format_png, AST_FORMAT_PNG, ast_format_siren14, AST_FORMAT_SIREN14, ast_format_siren7, AST_FORMAT_SIREN7, ast_format_slin, AST_FORMAT_SLIN, ast_format_slin16, AST_FORMAT_SLIN16, ast_format_speex, AST_FORMAT_SPEEX, ast_format_speex16, AST_FORMAT_SPEEX16, ast_format_t140, AST_FORMAT_T140, ast_format_t140_red, AST_FORMAT_T140_RED, ast_format_ulaw, AST_FORMAT_ULAW, ast_format_vp8, and AST_FORMAT_VP8.
Referenced by conf_run(), iax2_codec_choose(), iax2_codec_pref_append(), iax2_codec_pref_prepend(), iax2_format_compatibility_cap2bitfield(), iax2_send(), iax_template_parse(), and socket_process_helper().