src/platform/ffmpeg/ffmpeg-encoder.h (view raw)
1#ifndef FFMPEG_ENCODER
2#define FFMPEG_ENCODER
3
4#include "gba-thread.h"
5
6#include <libavcodec/avcodec.h>
7#include <libavformat/avformat.h>
8
9struct FFmpegEncoder {
10 struct GBAAVStream d;
11 AVFormatContext* context;
12
13 AVCodecContext* audio;
14 uint16_t* audioBuffer;
15 size_t audioBufferSize;
16 AVFrame* audioFrame;
17 size_t currentAudioSample;
18 int64_t currentAudioFrame;
19 AVStream* audioStream;
20
21 AVCodecContext* video;
22 AVFrame* videoFrame;
23 int64_t currentVideoFrame;
24 AVStream* videoStream;
25};
26
27bool FFmpegEncoderCreate(struct FFmpegEncoder*);
28void FFmpegEncoderDestroy(struct FFmpegEncoder*);
29
30#endif