107 const char *kvp = attributes;
122 if (!strncmp(kvp,
name, strlen(
name)) && kvp[strlen(
name)] ==
'=') {
123 if (sscanf(kvp,
"%*[^=]=%30d", &
val) == 1) {
130 kvp = strchr(kvp,
';');
153 for (attrib = attribs; *attrib; ++attrib) {
154 *attrib = tolower(*attrib);
268 attr_res->
dtx = attr1->
dtx || attr2->
dtx ? 1 : 0;
272 attr_res->
fec = attr1->
fec && attr2->
fec ? 1 : 0;
274 attr_res->
cbr = attr1->
cbr || attr2->
cbr ? 1 : 0;
314 if (sscanf(
value,
"%30d", &
val) != 1) {
Asterisk main include file. File version handling, generic pbx functions.
#define ast_strdupa(s)
duplicate a string in memory from the stack
#define ast_malloc(len)
A wrapper for malloc()
#define ao2_ref(o, delta)
Reference/unreference an object and return the old refcount.
#define ao2_bump(obj)
Bump refcount on an AO2 object by one, returning the object.
Support for logging to various files, console and syslog Configuration in file logger....
Asterisk module definitions.
@ AST_MODFLAG_GLOBAL_SYMBOLS
#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...)
@ AST_MODPRI_REALTIME_DRIVER
@ AST_MODULE_SUPPORT_CORE
#define ASTERISK_GPL_KEY
The text the key() function should return.
@ AST_MODULE_LOAD_SUCCESS
@ AST_MODULE_LOAD_DECLINE
Module has failed to load, may be in an inconsistent state.
Codec opus externals and format attributes.
#define CODEC_OPUS_ATTR_CBR
Decoder prefers a constant (1) vs variable (0) bitrate.
#define CODEC_OPUS_ATTR_MAX_AVERAGE_BITRATE
Maximum average received bit rate (in bits per second)
#define CODEC_OPUS_ATTR_MAX_PLAYBACK_RATE
Maximum sampling rate an endpoint is capable of receiving.
#define CODEC_OPUS_DEFAULT_SAMPLE_RATE
Default attribute values.
#define CODEC_OPUS_ATTR_MAX_CODED_AUDIO_BANDWIDTH
An alias for maxplaybackrate (used in older versions)
#define CODEC_OPUS_ATTR_DTX
Use discontinuous transmission (1) or not (0)
#define CODEC_OPUS_DEFAULT_STEREO
#define CODEC_OPUS_ATTR_STEREO
Decode stereo (1) vs mono (0)
#define CODEC_OPUS_DEFAULT_BITRATE
#define CODEC_OPUS_DEFAULT_FEC
#define CODEC_OPUS_DEFAULT_DTX
#define CODEC_OPUS_DEFAULT_MAX_PTIME
#define CODEC_OPUS_DEFAULT_PTIME
#define CODEC_OPUS_ATTR_SPROP_STEREO
Likeliness of sender producing stereo (1) vs mono (0)
#define CODEC_OPUS_ATTR_SPROP_MAX_CAPTURE_RATE
Maximum sampling rate an endpoint is capable of sending.
#define CODEC_OPUS_ATTR_FEC
Use forward error correction (1) or not (0)
#define CODEC_OPUS_DEFAULT_CBR
#define CODEC_OPUS_ATTR_PTIME
Duration of packet (in milliseconds)
#define CODEC_OPUS_ATTR_MAX_PTIME
Maximum duration of packet (in milliseconds)
#define CODEC_OPUS_ATTR_DATA
Custom data object.
String manipulation functions.
char * ast_str_truncate(struct ast_str *buf, ssize_t len)
Truncates the enclosed string to the given length.
int ast_str_append(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Append to a thread local dynamic string.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
size_t ast_str_strlen(const struct ast_str *buf)
Returns the current length of the string stored within buf.
char * ast_skip_blanks(const char *str)
Gets a pointer to the first non-whitespace character in a string.
Support for dynamic strings.
Opus attribute structure.