17 #ifndef MPF_CODEC_DESCRIPTOR_H
18 #define MPF_CODEC_DESCRIPTOR_H
25 #include <apr_tables.h>
32 #define CODEC_FRAME_TIME_BASE 10
34 #define BYTES_PER_SAMPLE 2
36 #define BITS_PER_SAMPLE 16
40 MPF_SAMPLE_RATE_NONE = 0x00,
41 MPF_SAMPLE_RATE_8000 = 0x01,
42 MPF_SAMPLE_RATE_16000 = 0x02,
43 MPF_SAMPLE_RATE_32000 = 0x04,
44 MPF_SAMPLE_RATE_48000 = 0x08,
46 MPF_SAMPLE_RATE_SUPPORTED = MPF_SAMPLE_RATE_8000 | MPF_SAMPLE_RATE_16000 |
47 MPF_SAMPLE_RATE_32000 | MPF_SAMPLE_RATE_48000
119 apt_string_reset(&descriptor->
name);
122 apt_string_reset(&descriptor->
format);
130 mpf_codec_descriptor_init(descriptor);
148 static APR_INLINE apr_size_t mpf_codec_linear_frame_size_calculate(apr_uint16_t sampling_rate, apr_byte_t channel_count)
164 static APR_INLINE
void mpf_codec_list_init(
mpf_codec_list_t *codec_list, apr_size_t initial_count, apr_pool_t *pool)
181 mpf_codec_descriptor_init(descriptor);
218 static APR_INLINE
void mpf_codec_capabilities_init(
mpf_codec_capabilities_t *capabilities, apr_size_t initial_count, apr_pool_t *pool)
220 capabilities->attrib_arr = apr_array_make(pool,(
int)initial_count,
sizeof(
mpf_codec_attribs_t));
221 capabilities->allow_named_events = TRUE;
245 apt_string_assign(&attribs->
name,codec_name,capabilities->
attrib_arr->pool);
257 if(apr_is_empty_array(capabilities->attrib_arr) == TRUE) {
apt_bool_t mpf_codec_descriptors_match(const mpf_codec_descriptor_t *descriptor1, const mpf_codec_descriptor_t *descriptor2)
Definition: mpf_codec_descriptor.h:79
apt_str_t format
Definition: mpf_codec_descriptor.h:73
apt_bool_t mpf_codec_lists_intersect(mpf_codec_list_t *codec_list1, mpf_codec_list_t *codec_list2)
Definition: mpf_codec_descriptor.h:89
mpf_codec_descriptor_t * mpf_codec_list_descriptor_find(const mpf_codec_list_t *codec_list, const mpf_codec_descriptor_t *descriptor)
mpf_sample_rates_e
Definition: mpf_codec_descriptor.h:39
#define APT_END_EXTERN_C
Definition: apt.h:38
apr_array_header_t * attrib_arr
Definition: mpf_codec_descriptor.h:101
apt_bool_t mpf_codec_descriptor_match_by_attribs(mpf_codec_descriptor_t *descriptor, const mpf_codec_descriptor_t *static_descriptor, const mpf_codec_attribs_t *attribs)
apt_bool_t mpf_codec_lists_compare(const mpf_codec_list_t *codec_list1, const mpf_codec_list_t *codec_list2)
int apt_bool_t
Definition: apt.h:57
mpf_codec_descriptor_t * mpf_codec_descriptor_create_by_capabilities(const mpf_codec_capabilities_t *capabilities, const mpf_codec_descriptor_t *peer, apr_pool_t *pool)
apr_array_header_t * descriptor_arr
Definition: mpf_codec_descriptor.h:81
int mpf_sample_rate_mask_get(apr_uint16_t sampling_rate)
apt_bool_t mpf_codec_list_match(mpf_codec_list_t *codec_list, const mpf_codec_capabilities_t *capabilities)
#define BYTES_PER_SAMPLE
Definition: mpf_codec_descriptor.h:34
#define MPF_DECLARE(type)
Definition: mpf.h:40
#define APT_BEGIN_EXTERN_C
Definition: apt.h:36
apt_str_t name
Definition: mpf_codec_descriptor.h:91
Definition: mpf_codec_descriptor.h:107
#define CODEC_FRAME_TIME_BASE
Definition: mpf_codec_descriptor.h:32
apr_size_t size
Definition: mpf_codec_descriptor.h:111
apr_byte_t payload_type
Definition: mpf_codec_descriptor.h:65
apt_bool_t allow_named_events
Definition: mpf_codec_descriptor.h:103
apr_byte_t bits_per_sample
Definition: mpf_codec_descriptor.h:93
void * buffer
Definition: mpf_codec_descriptor.h:109
apr_uint16_t sampling_rate
Definition: mpf_codec_descriptor.h:69
Media Processing Framework Definitions.
apt_bool_t mpf_codec_lpcm_descriptor_match(const mpf_codec_descriptor_t *descriptor)
Definition: apt_string.h:36
mpf_codec_descriptor_t * mpf_codec_lpcm_descriptor_create(apr_uint16_t sampling_rate, apr_byte_t channel_count, apr_pool_t *pool)
Definition: mpf_codec_descriptor.h:99
int sample_rates
Definition: mpf_codec_descriptor.h:95
mpf_codec_descriptor_t * primary_descriptor
Definition: mpf_codec_descriptor.h:83
apt_str_t name
Definition: mpf_codec_descriptor.h:67
mpf_codec_descriptor_t * event_descriptor
Definition: mpf_codec_descriptor.h:85
apr_byte_t channel_count
Definition: mpf_codec_descriptor.h:71
apt_bool_t mpf_codec_default_capabilities_add(mpf_codec_capabilities_t *capabilities)
Definition: mpf_codec_descriptor.h:63
apt_bool_t enabled
Definition: mpf_codec_descriptor.h:75