summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/ae.h
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-04-22 06:59:59 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-04-22 06:59:59 +0000
commit3faa5ea6fdf5033150b3235f20b18cd5815ff260 (patch)
tree031e2f33866350d46186edb9d59f800f075f2417 /libmpcodecs/ae.h
parentaa33945a1991f66b1cc453319ba314800f71406f (diff)
downloadmpv-3faa5ea6fdf5033150b3235f20b18cd5815ff260.tar.bz2
mpv-3faa5ea6fdf5033150b3235f20b18cd5815ff260.tar.xz
audio encoding reworked
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15235 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/ae.h')
-rw-r--r--libmpcodecs/ae.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/libmpcodecs/ae.h b/libmpcodecs/ae.h
new file mode 100644
index 0000000000..bcac7a0dee
--- /dev/null
+++ b/libmpcodecs/ae.h
@@ -0,0 +1,44 @@
+
+#ifndef __MPAE_H__
+#define __MPAE_H__
+
+#define ACODEC_COPY 0
+#define ACODEC_PCM 1
+#define ACODEC_VBRMP3 2
+#define ACODEC_NULL 3
+#define ACODEC_LAVC 4
+#define ACODEC_TOOLAME 5
+
+#define AE_NEEDS_COMPRESSED_INPUT 1
+
+typedef struct {
+ int channels;
+ int sample_rate;
+ int bitrate;
+ int samples_per_frame;
+ int audio_preload;
+} audio_encoding_params_t;
+
+typedef struct {
+ int codec;
+ int flags;
+ muxer_stream_t *stream;
+ audio_encoding_params_t params;
+ int audio_preload; //in ms
+ int input_format;
+ int min_buffer_size, max_buffer_size; //for init_audio_filters
+ int *decode_buffer;
+ int decode_buffer_size;
+ int decode_buffer_len;
+ void *priv;
+ int (*bind)(void*, muxer_stream_t*);
+ int (*get_frame_size)(void*);
+ int (*set_decoded_len)(void *encoder, int len);
+ int (*encode)(void *encoder, uint8_t *dest, void *src, int nsamples, int max_size);
+ int (*fixup)();
+ int (*close)();
+} audio_encoder_t;
+
+audio_encoder_t *new_audio_encoder(muxer_stream_t *stream, audio_encoding_params_t *params);
+
+#endif