7 #define ACODEC_VBRMP3 2
10 #define ACODEC_TOOLAME 5
12 #define ACODEC_TWOLAME 7
14 #define AE_NEEDS_COMPRESSED_INPUT 1
20 int samples_per_frame
;
22 } audio_encoding_params_t
;
24 typedef struct audio_encoder_s
{
27 muxer_stream_t
*stream
;
28 audio_encoding_params_t params
;
29 int audio_preload
; //in ms
31 int min_buffer_size
, max_buffer_size
; //for init_audio_filters
32 unsigned char *decode_buffer
;
33 int decode_buffer_size
;
34 int decode_buffer_len
;
36 int (*bind
)(struct audio_encoder_s
*, muxer_stream_t
*);
37 int (*get_frame_size
)(struct audio_encoder_s
*);
38 int (*set_decoded_len
)(struct audio_encoder_s
*encoder
, int len
);
39 int (*encode
)(struct audio_encoder_s
*encoder
, uint8_t *dest
, void *src
, int nsamples
, int max_size
);
40 void (*fixup
)(struct audio_encoder_s
*encoder
);
41 int (*close
)(struct audio_encoder_s
*encoder
);
44 audio_encoder_t
*new_audio_encoder(muxer_stream_t
*stream
, audio_encoding_params_t
*params
);