aboutsummaryrefslogtreecommitdiff
path: root/src/recorder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/recorder.h')
-rw-r--r--src/recorder.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/recorder.h b/src/recorder.h
index 62458ad..2ef0d47 100644
--- a/src/recorder.h
+++ b/src/recorder.h
@@ -2,21 +2,33 @@
#define __RECORDER_H
#include <SDL.h>
-#include <SDL/SDL_ffmpeg.h>
+
+extern "C" {
+#include <libavformat/avformat.h>
+#include <libavcodec/avcodec.h>
+#include <libswscale/swscale.h>
+}
#include "osc_graphics.h"
class Recorder : Mutex {
- SDL_ffmpegFile *file;
+ AVFormatContext *ffmpeg;
+ AVStream *stream;
+ SwsContext *sws_context;
+ AVFrame *encodeFrame;
+ int encodeFrameBufferSize;
+ uint8_t *encodeFrameBuffer;
+ AVPacket pkt;
+
Uint32 start_time;
public:
- Recorder() : Mutex(), file(NULL) {}
+ Recorder();
~Recorder();
void register_methods();
- void start(const char *filename);
+ void start(const char *filename, const char *codecname = NULL);
void stop();
void record(SDL_Surface *surf);