Asterisk - The Open Source Telephony Project
18.5.0
|
Media Format Bitfield Compatibility API. More...
#include "asterisk.h"
#include "asterisk/logger.h"
#include "asterisk/astobj2.h"
#include "asterisk/codec.h"
#include "asterisk/format.h"
#include "asterisk/format_compatibility.h"
#include "asterisk/format_cache.h"
Go to the source code of this file.
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 main/format_compatibility.c.
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)
Raw mu-law data (G.711)
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 173 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_TESTLAW, ast_format_testlaw, 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 106 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_TESTLAW, ast_format_testlaw, 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_TESTLAW, ast_format_testlaw, 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(), phone_write(), and socket_process_helper().