19 #ifndef MPF_CODEC_DESCRIPTOR_H
20 #define MPF_CODEC_DESCRIPTOR_H
27 #include <apr_tables.h>
34 #define CODEC_FRAME_TIME_BASE 10
36 #define BYTES_PER_SAMPLE 2
38 #define BITS_PER_SAMPLE 16
42 MPF_SAMPLE_RATE_NONE = 0x00,
43 MPF_SAMPLE_RATE_8000 = 0x01,
44 MPF_SAMPLE_RATE_16000 = 0x02,
45 MPF_SAMPLE_RATE_32000 = 0x04,
46 MPF_SAMPLE_RATE_48000 = 0x08,
48 MPF_SAMPLE_RATE_SUPPORTED = MPF_SAMPLE_RATE_8000 | MPF_SAMPLE_RATE_16000 |
49 MPF_SAMPLE_RATE_32000 | MPF_SAMPLE_RATE_48000
121 apt_string_reset(&descriptor->
name);
124 apt_string_reset(&descriptor->
format);
132 mpf_codec_descriptor_init(descriptor);
150 static APR_INLINE apr_size_t mpf_codec_linear_frame_size_calculate(apr_uint16_t sampling_rate, apr_byte_t channel_count)
166 static APR_INLINE
void mpf_codec_list_init(
mpf_codec_list_t *codec_list, apr_size_t initial_count, apr_pool_t *pool)
183 mpf_codec_descriptor_init(descriptor);
220 static APR_INLINE
void mpf_codec_capabilities_init(
mpf_codec_capabilities_t *capabilities, apr_size_t initial_count, apr_pool_t *pool)
222 capabilities->attrib_arr = apr_array_make(pool,(
int)initial_count,
sizeof(
mpf_codec_attribs_t));
223 capabilities->allow_named_events = TRUE;
247 apt_string_assign(&attribs->
name,codec_name,capabilities->
attrib_arr->pool);
259 if(apr_is_empty_array(capabilities->attrib_arr) == TRUE) {