summaryrefslogtreecommitdiff
path: root/audio/decoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'audio/decoder.h')
-rw-r--r--audio/decoder.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/audio/decoder.h b/audio/decoder.h
new file mode 100644
index 0000000..bb7f7b1
--- /dev/null
+++ b/audio/decoder.h
@@ -0,0 +1,16 @@
+#ifndef AUDIO_DECODER_H_
+#define AUDIO_DECODER_H_
+
+#include <libavcodec/avcodec.h>
+#include <libavformat/avformat.h>
+#include <libavutil/dict.h>
+
+struct Decoder { AVCodecContext *avctx; };
+
+int decoder_init (struct Decoder *decoder, const AVCodecParameters *codecpar, AVDictionary **opts);
+int decoder_send (struct Decoder *decoder, const AVPacket *pkt);
+int decoder_convert (struct Decoder *decoder, AVFrame *out);
+void decoder_free (struct Decoder *decoder);
+int decoder_init_for_stream (struct Decoder *decoder, const AVStream *stream, AVDictionary **opts);
+
+#endif // AUDIO_DECODER_H_