summaryrefslogtreecommitdiff
path: root/audio/encoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'audio/encoder.h')
-rw-r--r--audio/encoder.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/audio/encoder.h b/audio/encoder.h
new file mode 100644
index 0000000..b42f862
--- /dev/null
+++ b/audio/encoder.h
@@ -0,0 +1,15 @@
+#ifndef AUDIO_ENCODER_H_
+#define AUDIO_ENCODER_H_
+
+#include <libavcodec/avcodec.h>
+#include <libavformat/avformat.h>
+
+struct Encoder { AVCodecContext *avctx; int pts; };
+
+int encoder_init (struct Encoder *encoder, const AVCodecParameters *codecpar, AVDictionary **opts);
+int encoder_send (struct Encoder *encoder, const AVFrame *pkt);
+int encoder_convert (struct Encoder *encoder, AVPacket *out);
+void encoder_free (struct Encoder *encoder);
+int encoder_init_for_stream (struct Encoder *encoder, const AVStream *stream, AVDictionary **opts);
+
+#endif // AUDIO_ENCODER_H_