Asterisk - The Open Source Telephony Project GIT-master-754dea3
|
Built-in supported codecs. More...
#include "asterisk.h"
#include "asterisk/ilbc.h"
#include "asterisk/logger.h"
#include "asterisk/astobj2.h"
#include "asterisk/codec.h"
#include "asterisk/format.h"
#include "asterisk/format_cache.h"
#include "asterisk/frame.h"
#include "asterisk/smoother.h"
Go to the source code of this file.
Macros | |
#define | CODEC_REGISTER_AND_CACHE(codec) |
#define | CODEC_REGISTER_AND_CACHE_NAMED(fmt_name, codec) |
#define | TYPE_MASK 0x3 |
Enumerations | |
enum | frame_type { TYPE_HIGH , TYPE_LOW , TYPE_SILENCE , TYPE_DONTSEND } |
Functions | |
int | __ast_codec_register_with_format (struct ast_codec *codec, const char *format_name, struct ast_module *mod) |
int | ast_codec_builtin_init (void) |
Initialize built-in codecs within the core. More... | |
static int | codec2_length (unsigned int samples) |
static int | codec2_samples (struct ast_frame *frame) |
static int | g719_length (unsigned int samples) |
static int | g719_samples (struct ast_frame *frame) |
static int | g723_len (unsigned char buf) |
static int | g723_length (unsigned int samples) |
static int | g723_samples (struct ast_frame *frame) |
static int | g726_length (unsigned int samples) |
static int | g726_samples (struct ast_frame *frame) |
static int | g729_length (unsigned int samples) |
static int | g729_samples (struct ast_frame *frame) |
static unsigned char | get_n_bits_at (unsigned char *data, int n, int bit) |
static int | gsm_length (unsigned int samples) |
static int | gsm_samples (struct ast_frame *frame) |
static int | ilbc_samples (struct ast_frame *frame) |
static int | lpc10_samples (struct ast_frame *frame) |
static int | none_length (unsigned int samples) |
static int | none_samples (struct ast_frame *frame) |
static int | opus_samples (struct ast_frame *frame) |
static int | silk_samples (struct ast_frame *frame) |
static int | siren14_length (unsigned int samples) |
static int | siren14_samples (struct ast_frame *frame) |
static int | siren7_length (unsigned int samples) |
static int | siren7_samples (struct ast_frame *frame) |
static int | slin_length (unsigned int samples) |
static int | slin_samples (struct ast_frame *frame) |
static int | speex16_samples (struct ast_frame *frame) |
static int | speex32_samples (struct ast_frame *frame) |
static int | speex8_samples (struct ast_frame *frame) |
static int | speex_get_wb_sz_at (unsigned char *data, int len, int bit) |
static int | speex_samples (unsigned char *data, int len) |
static int | ulaw_length (unsigned int samples) |
static int | ulaw_samples (struct ast_frame *frame) |
Variables | |
static struct ast_codec | adpcm |
static struct ast_codec | alaw |
static struct ast_codec | codec2 |
static struct ast_codec | g719 |
static struct ast_codec | g722 |
static struct ast_codec | g723 |
static struct ast_codec | g726aal2 |
static struct ast_codec | g726rfc3551 |
static struct ast_codec | g729a |
static struct ast_codec | gsm |
static struct ast_codec | h261 |
static struct ast_codec | h263 |
static struct ast_codec | h263p |
static struct ast_codec | h264 |
static struct ast_codec | h265 |
static struct ast_codec | ilbc |
static struct ast_codec | jpeg |
static struct ast_codec | lpc10 |
static struct ast_codec | mpeg4 |
static struct ast_codec | none |
static struct ast_codec | opus |
static struct ast_codec | png |
static struct ast_codec | silk12 |
static struct ast_codec | silk16 |
static struct ast_codec | silk24 |
static struct ast_codec | silk8 |
static struct ast_codec | siren14 |
static struct ast_codec | siren7 |
static struct ast_codec | slin12 |
static struct ast_codec | slin16 |
static struct ast_codec | slin192 |
static struct ast_codec | slin24 |
static struct ast_codec | slin32 |
static struct ast_codec | slin44 |
static struct ast_codec | slin48 |
static struct ast_codec | slin8 |
static struct ast_codec | slin96 |
static struct ast_codec | speex16 |
static struct ast_codec | speex32 |
static struct ast_codec | speex8 |
static struct ast_codec | t140 |
static struct ast_codec | t140red |
static struct ast_codec | t38 |
static struct ast_codec | ulaw |
static struct ast_codec | vp8 |
static struct ast_codec | vp9 |
Built-in supported codecs.
Definition in file codec_builtin.c.
#define CODEC_REGISTER_AND_CACHE | ( | codec | ) |
Definition at line 928 of file codec_builtin.c.
#define CODEC_REGISTER_AND_CACHE_NAMED | ( | fmt_name, | |
codec | |||
) |
Definition at line 942 of file codec_builtin.c.
#define TYPE_MASK 0x3 |
Definition at line 51 of file codec_builtin.c.
enum frame_type |
Enumerator | |
---|---|
TYPE_HIGH | |
TYPE_LOW | |
TYPE_SILENCE | |
TYPE_DONTSEND |
Definition at line 44 of file codec_builtin.c.
int __ast_codec_register_with_format | ( | struct ast_codec * | codec, |
const char * | format_name, | ||
struct ast_module * | mod | ||
) |
Definition at line 278 of file codec.c.
References AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_find, ao2_link_flags, ao2_ref, ao2_t_alloc_options, ast_codec_media_type2str(), ast_log, AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_UNKNOWN, ast_module_shutdown_ref, ast_verb, codec_dtor(), codec_id, codecs, ast_codec::description, internal_ast_codec::external, internal_ast_codec::format_name, ast_codec::id, lock, LOG_ERROR, ast_codec::name, OBJ_NOLOCK, OBJ_SEARCH_OBJECT, S_OR, ast_codec::sample_rate, SCOPED_AO2WRLOCK, and ast_codec::type.
Referenced by __ast_codec_register().
int ast_codec_builtin_init | ( | void | ) |
Initialize built-in codecs within the core.
0 | success |
-1 | failure |
Definition at line 956 of file codec_builtin.c.
References adpcm, alaw, codec2, CODEC_REGISTER_AND_CACHE, CODEC_REGISTER_AND_CACHE_NAMED, g719, g722, g723, g726aal2, g726rfc3551, g729a, h261, h263, h263p, h264, h265, ilbc, jpeg, lpc10, mpeg4, none, opus, png, silk12, silk16, silk24, silk8, siren14, siren7, slin12, slin16, slin192, slin24, slin32, slin44, slin48, slin8, slin96, speex16, speex32, speex8, t140, t140red, t38, ulaw, vp8, and vp9.
Referenced by asterisk_daemon().
|
static |
Definition at line 116 of file codec_builtin.c.
|
static |
|
static |
Definition at line 736 of file codec_builtin.c.
|
static |
Definition at line 731 of file codec_builtin.c.
References ast_frame::datalen.
|
static |
Definition at line 53 of file codec_builtin.c.
References ast_log, buf, LOG_WARNING, type, TYPE_DONTSEND, TYPE_HIGH, TYPE_LOW, TYPE_MASK, and TYPE_SILENCE.
Referenced by g723_samples().
|
static |
Definition at line 92 of file codec_builtin.c.
|
static |
Definition at line 76 of file codec_builtin.c.
References buf, ast_frame::data, g723_len(), and ast_frame::ptr.
|
static |
Definition at line 227 of file codec_builtin.c.
|
static |
Definition at line 222 of file codec_builtin.c.
References ast_frame::datalen.
|
static |
Definition at line 460 of file codec_builtin.c.
|
static |
Definition at line 455 of file codec_builtin.c.
References ast_frame::datalen.
|
static |
Definition at line 481 of file codec_builtin.c.
Referenced by speex_get_wb_sz_at(), and speex_samples().
|
static |
Definition at line 202 of file codec_builtin.c.
|
static |
Definition at line 197 of file codec_builtin.c.
References ast_frame::datalen.
|
static |
Definition at line 644 of file codec_builtin.c.
References ast_format_get_attribute_data(), ast_format_get_sample_rate(), ast_frame::datalen, ast_frame_subclass::format, ilbc_attr::mode, and ast_frame::subclass.
|
static |
Definition at line 431 of file codec_builtin.c.
References ast_frame::data, and ast_frame::ptr.
|
static |
Definition at line 140 of file codec_builtin.c.
|
static |
Definition at line 135 of file codec_builtin.c.
References ast_frame::datalen.
|
static |
Definition at line 755 of file codec_builtin.c.
References ast_format_get_sample_rate(), ast_frame_subclass::format, and ast_frame::subclass.
|
static |
Definition at line 869 of file codec_builtin.c.
References ast_format_get_sample_rate(), ast_frame_subclass::format, and ast_frame::subclass.
|
static |
Definition at line 712 of file codec_builtin.c.
|
static |
Definition at line 707 of file codec_builtin.c.
References ast_frame::datalen.
|
static |
Definition at line 688 of file codec_builtin.c.
|
static |
Definition at line 683 of file codec_builtin.c.
References ast_frame::datalen.
|
static |
Definition at line 282 of file codec_builtin.c.
|
static |
Definition at line 277 of file codec_builtin.c.
References ast_frame::datalen.
|
static |
Definition at line 608 of file codec_builtin.c.
References ast_frame::data, ast_frame::datalen, ast_frame::ptr, and speex_samples().
|
static |
Definition at line 626 of file codec_builtin.c.
References ast_frame::data, ast_frame::datalen, ast_frame::ptr, and speex_samples().
|
static |
Definition at line 590 of file codec_builtin.c.
References ast_frame::data, ast_frame::datalen, ast_frame::ptr, and speex_samples().
|
static |
Definition at line 500 of file codec_builtin.c.
References ast_log, c, get_n_bits_at(), len(), and LOG_WARNING.
Referenced by speex_samples().
|
static |
Definition at line 530 of file codec_builtin.c.
References ast_log, c, get_n_bits_at(), len(), LOG_WARNING, and speex_get_wb_sz_at().
Referenced by speex16_samples(), speex32_samples(), and speex8_samples().
|
static |
Definition at line 162 of file codec_builtin.c.
|
static |
Definition at line 157 of file codec_builtin.c.
References ast_frame::datalen.
|
static |
Definition at line 262 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 182 of file codec_builtin.c.
Referenced by alaw2linear(), ast_codec_builtin_init(), and AST_TEST_DEFINE().
|
static |
Definition at line 121 of file codec_builtin.c.
Referenced by ast_codec_builtin_init(), and ast_format_cap_append_by_type().
|
static |
Definition at line 741 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 668 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 97 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 247 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 232 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 465 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
Definition at line 207 of file codec_builtin.c.
|
static |
Definition at line 795 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 802 of file codec_builtin.c.
Referenced by ast_codec_builtin_init(), and AST_TEST_DEFINE().
|
static |
Definition at line 809 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 816 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 823 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 654 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 783 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 441 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 830 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 144 of file codec_builtin.c.
Referenced by ast_codec_builtin_init(), and AST_TEST_DEFINE().
|
static |
Definition at line 770 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 789 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 892 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 904 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 916 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 880 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 717 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 693 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 303 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 319 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 415 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 335 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 351 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 367 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 383 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 287 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 399 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 613 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 631 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 595 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 857 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 851 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 863 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 167 of file codec_builtin.c.
Referenced by ast_codec_builtin_init(), and AST_TEST_DEFINE().
|
static |
Definition at line 837 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
|
static |
Definition at line 844 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().