summaryrefslogtreecommitdiff
path: root/audio/decoder.h
blob: bb7f7b17bf507d6f05572f9b2ffc1b1825894947 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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_