40#define FORMAT_INTERFACE_BUCKETS 53
120 ast_verb(5,
"Registered format interface for codec '%s'\n",
codec);
167 format->
name = format_name;
205 if (format1 ==
NULL || format2 ==
NULL) {
209 if (format1 == format2) {
217 interface = format1->interface ? format1->interface : format2->interface;
219 if (interface && interface->format_cmp) {
220 return interface->
format_cmp(format1, format2);
242 interface = format1->interface ? format1->interface : format2->interface;
245 return interface->format_get_joint(format1, format2);
Asterisk main include file. File version handling, generic pbx functions.
int ast_register_cleanup(void(*func)(void))
Register a function to be executed before Asterisk gracefully exits.
@ AO2_ALLOC_OPT_LOCK_NOLOCK
@ AO2_ALLOC_OPT_LOCK_RWLOCK
#define AO2_STRING_FIELD_CMP_FN(stype, field)
Creates a compare function for a structure string field.
#define ao2_link_flags(container, obj, flags)
Add an object to a container.
#define ao2_t_alloc_options(data_size, destructor_fn, options, debug_msg)
Allocate and initialize an object.
#define ao2_find(container, arg, flags)
#define ao2_ref(o, delta)
Reference/unreference an object and return the old refcount.
#define ao2_alloc_options(data_size, destructor_fn, options)
#define ao2_bump(obj)
Bump refcount on an AO2 object by one, returning the object.
#define AO2_STRING_FIELD_HASH_FN(stype, field)
Creates a hash function for a structure string field.
@ OBJ_NOLOCK
Assume that the ao2_container is already locked.
@ OBJ_SEARCH_KEY
The arg parameter is a search key, but is not an object.
#define ao2_container_alloc_hash(ao2_options, container_options, n_buckets, hash_fn, sort_fn, cmp_fn)
Allocate and initialize a hash container with the desired number of buckets.
unsigned int ast_codec_determine_length(const struct ast_codec *codec, unsigned int samples)
Get the length of media (in milliseconds) given a number of samples.
ast_media_type
Types of media.
Support for logging to various files, console and syslog Configuration in file logger....
#define ast_verb(level,...)
#define SCOPED_AO2WRLOCK(varname, obj)
scoped lock specialization for ao2 write locks.
Asterisk module definitions.
#define ast_module_shutdown_ref(mod)
Prevent unload of the module before shutdown.
String manipulation functions.
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one.
Represents a media codec within Asterisk.
unsigned int sample_rate
Sample rate (number of samples carried in a second)
unsigned int maximum_ms
Maximum length of media that can be carried (in milliseconds) in a frame.
unsigned int minimum_bytes
Length in bytes of the data payload of a minimum_ms frame.
unsigned int smoother_flags
Flags to be passed to the smoother.
unsigned int default_ms
Default length of media carried (in milliseconds) in a frame.
enum ast_media_type type
Type of media this codec contains.
unsigned int minimum_ms
Minimum length of media that can be carried (in milliseconds) in a frame.
unsigned int smooth
Whether the media can be smoothed or not.
const char * name
Name for this codec.
unsigned int id
Internal unique identifier for this codec, set at registration time (starts at 1)
Support for dynamic strings.