Asterisk - The Open Source Telephony Project  21.4.1
Data Fields
ast_codec Struct Reference

Represents a media codec within Asterisk. More...

#include <codec.h>

Data Fields

unsigned int default_ms
 Default length of media carried (in milliseconds) in a frame.
 
const char * description
 Brief description.
 
int(* get_length )(unsigned int samples)
 Retrieve the length of media from number of samples. More...
 
unsigned int id
 Internal unique identifier for this codec, set at registration time (starts at 1)
 
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 minimum_ms
 Minimum length of media that can be carried (in milliseconds) in a frame.
 
struct ast_modulemod
 The module that registered this codec.
 
const char * name
 Name for this codec.
 
unsigned int quality
 Format quality, on scale from 0 to 150 (100 is ulaw, the reference). This allows better format to be used, ceterus paribus.
 
unsigned int sample_rate
 Sample rate (number of samples carried in a second)
 
int(* samples_count )(struct ast_frame *frame)
 Retrieve the number of samples in a frame. More...
 
unsigned int smooth
 Whether the media can be smoothed or not.
 
unsigned int smoother_flags
 Flags to be passed to the smoother.
 
enum ast_media_type type
 Type of media this codec contains.
 

Detailed Description

Represents a media codec within Asterisk.

Definition at line 42 of file codec.h.

Field Documentation

int(* get_length) (unsigned int samples)

Retrieve the length of media from number of samples.

Parameters
samplesThe number of samples
Returns
The length of media in milliseconds

Definition at line 76 of file codec.h.

Referenced by ast_codec_determine_length().

int(* samples_count) (struct ast_frame *frame)

Retrieve the number of samples in a frame.

Parameters
frameThe frame to examine
Returns
the number of samples

Definition at line 68 of file codec.h.

Referenced by ast_codec_samples_count().


The documentation for this struct was generated from the following file: