113 cap->framing = UINT_MAX;
118 const char *tag,
const char *
file,
int line,
const char *func)
123 tag, file, line, func);
210 __ao2_ref(format, +1, tag, file, line, func);
246 if (codec != codec2) {
275 for (idx = 0; (idx <
AST_VECTOR_SIZE(&src->preference_order)) && !res; ++idx) {
311 for (idx = 0; (idx <
AST_VECTOR_SIZE(&src->preference_order)); ++idx) {
322 int res = 0, all = 0, iter_allowing;
335 if (parse[0] ==
'(' && parse[strlen(parse) - 1] ==
')') {
337 parse[strlen(parse) - 1] =
'\0';
351 iter_allowing = allowing;
354 iter_allowing = !allowing;
356 if ((psize = strrchr(
this,
':'))) {
358 ast_debug(1,
"Packetization for codec: %s is %s\n",
this, psize);
359 if (!sscanf(psize,
"%30d", &framems) || (framems < 0)) {
366 all = strcasecmp(
this,
"all") ? 0 : 1;
369 ast_log(
LOG_WARNING,
"Cannot %s unknown format '%s'\n", iter_allowing ?
"allow" :
"disallow",
this);
440 return (cap->framing != UINT_MAX) ? cap->framing : 0;
470 if (result && result->
framing) {
486 #define FORMAT_CAP_FRAMED_ELEM_CMP(elem, value) ((elem)->format == (value)) 495 #define FORMAT_CAP_FRAMED_ELEM_CLEANUP(elem) ao2_cleanup((elem)) 726 i < AST_VECTOR_SIZE(&cap->preference_order) - 1 ?
"|" :
"");
#define AST_VECTOR_FREE(vec)
Deallocates this vector.
Asterisk main include file. File version handling, generic pbx functions.
String manipulation functions.
static struct formats formats
struct ast_codec * ast_codec_get_by_id(int id)
Retrieve a codec given the unique identifier.
char * ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
#define AST_VECTOR_APPEND(vec, elem)
Append an element to a vector, growing the vector if needed.
void * __ao2_alloc(size_t data_size, ao2_destructor_fn destructor_fn, unsigned int options, const char *tag, const char *file, int line, const char *func) attribute_warn_unused_result
#define ao2_t_replace(dst, src, tag)
Replace one object reference with another cleaning up the original.
int ast_str_append(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Append to a thread local dynamic string.
#define ao2_alloc_options(data_size, destructor_fn, options)
#define AST_LIST_TRAVERSE_SAFE_END
Closes a safe loop traversal block.
int ast_codec_get_max(void)
Retrieve the current maximum identifier for codec iteration.
#define ast_strlen_zero(foo)
static struct ast_codec codec2
int ast_str_set(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Set a dynamic string using variable arguments.
int __ao2_ref(void *o, int delta, const char *tag, const char *file, int line, const char *func)
#define ast_debug(level,...)
Log a DEBUG message.
#define AST_VECTOR_INIT(vec, size)
Initialize a vector.
#define AST_VECTOR_GET_ADDR(vec, idx)
Get an address of element in a vector.
char * ast_strip(char *s)
Strip leading/trailing whitespace from a string.
#define AST_LIST_REMOVE_CURRENT(field)
Removes the current entry from a list during a traversal.
#define ao2_ref(o, delta)
#define ast_strdupa(s)
duplicate a string in memory from the stack
A set of macros to manage forward-linked lists.
#define AST_VECTOR(name, type)
Define a vector structure.
#define AST_LIST_REMOVE_HEAD(head, field)
Removes and returns the head entry from a list.
AST_LIST_HEAD_NOLOCK(contactliststruct, contact)
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
#define AST_LIST_TRAVERSE(head, var, field)
Loops over (traverses) the entries in a list.
#define AST_LIST_ENTRY(type)
Declare a forward link structure inside a list entry.
#define AST_LIST_INSERT_HEAD(head, elm, field)
Inserts a list entry at the head of a list.
static void parse(struct mgcp_request *req)
Vector container support.
#define AST_VECTOR_REMOVE_CMP_ORDERED(vec, value, cmp, cleanup)
Remove an element from a vector that matches the given comparison while maintaining order...
#define AST_LIST_HEAD_NOLOCK_INIT_VALUE
Defines initial values for a declaration of AST_LIST_HEAD_NOLOCK.
Support for logging to various files, console and syslog Configuration in file logger.conf.
#define AST_VECTOR_GET(vec, idx)
Get an element from a vector.
char * strsep(char **str, const char *delims)
#define AST_VECTOR_REPLACE(vec, idx, elem)
Replace an element at a specific position in a vector, growing the vector if needed.
enum ast_media_type type
Type of media this codec contains.
ast_media_type
Types of media.
#define AST_LIST_TRAVERSE_SAFE_BEGIN(head, var, field)
Loops safely over (traverses) the entries in a list.
Represents a media codec within Asterisk.
#define AST_VECTOR_SIZE(vec)
Get the number of elements in a vector.