4 #include "libmpdemux/muxer.h"
8 #define ACODEC_VBRMP3 2
11 #define ACODEC_TOOLAME 5
13 #define ACODEC_TWOLAME 7
15 #define AE_NEEDS_COMPRESSED_INPUT 1
21 int samples_per_frame
;
23 } audio_encoding_params_t
;
25 typedef struct audio_encoder_s
{
28 muxer_stream_t
*stream
;
29 audio_encoding_params_t params
;
30 int audio_preload
; //in ms
32 int min_buffer_size
, max_buffer_size
; //for init_audio_filters
33 unsigned char *decode_buffer
;
34 int decode_buffer_size
;
35 int decode_buffer_len
;
37 int (*bind
)(struct audio_encoder_s
*, muxer_stream_t
*);
38 int (*get_frame_size
)(struct audio_encoder_s
*);
39 int (*set_decoded_len
)(struct audio_encoder_s
*encoder
, int len
);
40 int (*encode
)(struct audio_encoder_s
*encoder
, uint8_t *dest
, void *src
, int nsamples
, int max_size
);
41 void (*fixup
)(struct audio_encoder_s
*encoder
);
42 int (*close
)(struct audio_encoder_s
*encoder
);
45 audio_encoder_t
*new_audio_encoder(muxer_stream_t
*stream
, audio_encoding_params_t
*params
);
47 #endif /* MPLAYER_AE_H */