9 #include "libmpdemux/aviheader.h"
10 #include "libmpdemux/ms_hdr.h"
11 #include "stream/stream.h"
12 #include "libmpdemux/muxer.h"
18 #include "ae_toolame.h"
25 #ifdef CONFIG_LIBAVCODEC
34 #include "ae_twolame.h"
37 audio_encoder_t
*new_audio_encoder(muxer_stream_t
*stream
, audio_encoding_params_t
*params
)
40 audio_encoder_t
*encoder
;
44 encoder
= (audio_encoder_t
*) calloc(1, sizeof(audio_encoder_t
));
45 memcpy(&encoder
->params
, params
, sizeof(audio_encoding_params_t
));
46 encoder
->stream
= stream
;
51 ris
= mpae_init_pcm(encoder
);
55 ris
= mpae_init_toolame(encoder
);
58 #ifdef CONFIG_LIBAVCODEC
60 ris
= mpae_init_lavc(encoder
);
65 ris
= mpae_init_lame(encoder
);
70 ris
= mpae_init_faac(encoder
);
75 ris
= mpae_init_twolame(encoder
);
88 encoder
->bind(encoder
, stream
);
89 encoder
->decode_buffer
= malloc(encoder
->decode_buffer_size
);
90 if(! encoder
->decode_buffer
)
96 encoder
->codec
= stream
->codec
;