37 faacEncConfigurationPtr faac_cfg;
38 unsigned long samples_input, max_bytes_output;
48 &samples_input, &max_bytes_output);
51 faac_cfg = faacEncGetCurrentConfiguration(s->
faac_handle);
52 if (faac_cfg->version != FAAC_CFG_VERSION) {
53 av_log(avctx,
AV_LOG_ERROR,
"wrong libfaac version (compiled for: %d, using %d)\n", FAAC_CFG_VERSION, faac_cfg->version);
61 faac_cfg->aacObjectType =
MAIN;
65 faac_cfg->aacObjectType = LOW;
68 faac_cfg->aacObjectType = SSR;
71 faac_cfg->aacObjectType = LTP;
78 faac_cfg->mpegVersion = MPEG4;
80 faac_cfg->allowMidside = 1;
82 faac_cfg->bandWidth = avctx->
cutoff;
84 faac_cfg->bitRate = 0;
87 faac_cfg->outputFormat = 1;
88 faac_cfg->inputFormat = FAAC_INPUT_16BIT;
100 unsigned long decoder_specific_info_size;
102 if (!faacEncGetDecoderSpecificInfo(s->
faac_handle, &buffer,
103 &decoder_specific_info_size)) {
107 faac_cfg->outputFormat = 0;
111 #define free please_use_av_free
114 if (!faacEncSetConfiguration(s->
faac_handle, faac_cfg)) {
123 unsigned char *frame,
int buf_size,
void *
data)
127 int num_samples = data ? avctx->
frame_size : 0;
135 return bytes_written;