17 #include "ae_toolame.h"
33 #include "ae_twolame.h"
36 audio_encoder_t
*new_audio_encoder(muxer_stream_t
*stream
, audio_encoding_params_t
*params
)
39 audio_encoder_t
*encoder
;
43 encoder
= (audio_encoder_t
*) calloc(1, sizeof(audio_encoder_t
));
44 memcpy(&encoder
->params
, params
, sizeof(audio_encoding_params_t
));
45 encoder
->stream
= stream
;
50 ris
= mpae_init_pcm(encoder
);
54 ris
= mpae_init_toolame(encoder
);
59 ris
= mpae_init_lavc(encoder
);
64 ris
= mpae_init_lame(encoder
);
69 ris
= mpae_init_faac(encoder
);
74 ris
= mpae_init_twolame(encoder
);
87 encoder
->bind(encoder
, stream
);
88 encoder
->decode_buffer
= malloc(encoder
->decode_buffer_size
);
89 if(! encoder
->decode_buffer
)
95 encoder
->codec
= stream
->codec
;