Asterisk - The Open Source Telephony Project
18.5.0
|
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 | testlaw |
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 914 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
#define CODEC_REGISTER_AND_CACHE_NAMED | ( | fmt_name, | |
codec | |||
) |
Definition at line 928 of file codec_builtin.c.
Referenced by ast_codec_builtin_init().
#define TYPE_MASK 0x3 |
Definition at line 51 of file codec_builtin.c.
Referenced by g723_len().
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 277 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, 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 942 of file codec_builtin.c.
References CODEC_REGISTER_AND_CACHE, and CODEC_REGISTER_AND_CACHE_NAMED.
Referenced by asterisk_daemon().
|
static |
Definition at line 115 of file codec_builtin.c.
|
static |
|
static |
Definition at line 724 of file codec_builtin.c.
|
static |
|
static |
Definition at line 53 of file codec_builtin.c.
References ast_log, 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 223 of file codec_builtin.c.
|
static |
|
static |
Definition at line 443 of file codec_builtin.c.
|
static |
|
static |
Definition at line 462 of file codec_builtin.c.
Referenced by speex_get_wb_sz_at(), and speex_samples().
|
static |
Definition at line 199 of file codec_builtin.c.
|
static |
|
static |
Definition at line 622 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 415 of file codec_builtin.c.
References ast_frame::data, and ast_frame::ptr.
|
static |
Definition at line 139 of file codec_builtin.c.
|
static |
|
static |
Definition at line 742 of file codec_builtin.c.
References ast_format_get_sample_rate(), ast_frame_subclass::format, and ast_frame::subclass.
|
static |
Definition at line 855 of file codec_builtin.c.
References ast_format_get_sample_rate(), ast_frame_subclass::format, and ast_frame::subclass.
|
static |
Definition at line 687 of file codec_builtin.c.
|
static |
|
static |
Definition at line 664 of file codec_builtin.c.
|
static |
|
static |
Definition at line 275 of file codec_builtin.c.
|
static |
|
static |
Definition at line 588 of file codec_builtin.c.
References ast_frame::data, ast_frame::datalen, ast_frame::ptr, and speex_samples().
|
static |
Definition at line 605 of file codec_builtin.c.
References ast_frame::data, ast_frame::datalen, ast_frame::ptr, and speex_samples().
|
static |
Definition at line 571 of file codec_builtin.c.
References ast_frame::data, ast_frame::datalen, ast_frame::ptr, and speex_samples().
|
static |
Definition at line 481 of file codec_builtin.c.
References ast_log, c, get_n_bits_at(), and LOG_WARNING.
Referenced by speex_samples().
|
static |
Definition at line 511 of file codec_builtin.c.
References ast_log, c, get_n_bits_at(), LOG_WARNING, and speex_get_wb_sz_at().
Referenced by speex16_samples(), speex32_samples(), and speex8_samples().
|
static |
Definition at line 161 of file codec_builtin.c.
|
static |
|
static |
Definition at line 256 of file codec_builtin.c.
|
static |
Definition at line 180 of file codec_builtin.c.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 120 of file codec_builtin.c.
Referenced by ast_format_cap_append_by_type().
|
static |
Definition at line 729 of file codec_builtin.c.
|
static |
Definition at line 645 of file codec_builtin.c.
|
static |
Definition at line 97 of file codec_builtin.c.
|
static |
Definition at line 242 of file codec_builtin.c.
|
static |
Definition at line 228 of file codec_builtin.c.
|
static |
Definition at line 448 of file codec_builtin.c.
Definition at line 204 of file codec_builtin.c.
|
static |
Definition at line 781 of file codec_builtin.c.
|
static |
Definition at line 788 of file codec_builtin.c.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 795 of file codec_builtin.c.
|
static |
Definition at line 802 of file codec_builtin.c.
|
static |
Definition at line 809 of file codec_builtin.c.
|
static |
Definition at line 632 of file codec_builtin.c.
|
static |
Definition at line 769 of file codec_builtin.c.
|
static |
Definition at line 425 of file codec_builtin.c.
|
static |
Definition at line 816 of file codec_builtin.c.
|
static |
Definition at line 143 of file codec_builtin.c.
|
static |
Definition at line 757 of file codec_builtin.c.
|
static |
Definition at line 775 of file codec_builtin.c.
|
static |
Definition at line 878 of file codec_builtin.c.
|
static |
Definition at line 890 of file codec_builtin.c.
|
static |
Definition at line 902 of file codec_builtin.c.
|
static |
Definition at line 866 of file codec_builtin.c.
|
static |
Definition at line 692 of file codec_builtin.c.
|
static |
Definition at line 669 of file codec_builtin.c.
|
static |
Definition at line 295 of file codec_builtin.c.
|
static |
Definition at line 310 of file codec_builtin.c.
|
static |
Definition at line 400 of file codec_builtin.c.
|
static |
Definition at line 325 of file codec_builtin.c.
|
static |
Definition at line 340 of file codec_builtin.c.
|
static |
Definition at line 355 of file codec_builtin.c.
|
static |
Definition at line 370 of file codec_builtin.c.
|
static |
Definition at line 280 of file codec_builtin.c.
|
static |
Definition at line 385 of file codec_builtin.c.
|
static |
Definition at line 593 of file codec_builtin.c.
|
static |
Definition at line 610 of file codec_builtin.c.
|
static |
Definition at line 576 of file codec_builtin.c.
|
static |
Definition at line 843 of file codec_builtin.c.
|
static |
Definition at line 837 of file codec_builtin.c.
|
static |
Definition at line 849 of file codec_builtin.c.
|
static |
Definition at line 705 of file codec_builtin.c.
|
static |
Definition at line 166 of file codec_builtin.c.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 823 of file codec_builtin.c.
|
static |
Definition at line 830 of file codec_builtin.c.