blob: e0c2818dd044a915d32898ff56955689304e9753 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#ifndef __RECORDER_H
#define __RECORDER_H
#include <stdint.h>
#include <SDL.h>
#include "osc_graphics.h"
class Recorder : Mutex {
struct AVFormatContext *ffmpeg;
struct AVStream *stream;
struct SwsContext *sws_context;
struct AVFrame *encodeFrame;
int encodeFrameBufferSize;
uint8_t *encodeFrameBuffer;
struct AVPacket *pkt;
Uint32 start_time;
public:
Recorder();
~Recorder();
void register_methods();
void start(const char *filename, const char *codecname = NULL);
void stop();
void record(SDL_Surface *surf);
};
#endif
|